<div dir="ltr">I got to the bottom of the problem after some debugging. The short summary is - I was using "devel2" flavor which disables doc targets. The problem was it only disables them partially not fully. So even though I was able to invoke the targets I got these errors and the guide is mostly built except for the flags refs.<br><br>The long story:<br><br><a href="http://devel2.mk">devel2.mk</a> sets: BUILD_SPHINX_HTML  = NO<br><br>But we 'include rules/<a href="http://sphinx.mk">sphinx.mk</a>' in <a href="http://ghc.mk">ghc.mk</a> unconditionally. Now, since BUILD_SPHINX_HTML is not set we filter out mkUserGuidePart from build targets:<br><br>BUILD_DIRS := $(filter-out utils/mkUserGuidePart,$(BUILD_DIRS))<br><br>This results in an inconsistent state of the doc targets being available but not the mkUserGuidePart rules. So even though I was able build the docs partially I was getting these errors.<br><br>-harendra<br><br><br>On 23 August 2016 at 22:31, Harendra Kumar <<a href="mailto:harendra.kumar@gmail.com">harendra.kumar@gmail.com</a>> wrote:<br>><br>> Well, I tried 'make' and 'make all' (I suppose they are both same) but that did not make any difference.<br>><br>> -harendra<br>><br>> On 23 August 2016 at 21:37, Ben Gamari <<a href="mailto:ben@smart-cactus.org">ben@smart-cactus.org</a>> wrote:<br>>><br>>> Harendra Kumar <<a href="mailto:harendra.kumar@gmail.com">harendra.kumar@gmail.com</a>> writes:<br>>><br>>> > I see errors like this when using 'make html' in the topdir of the ghc repo:<br>>> ><br>>> Hmm, it looks like there is a missing dependency in the build system.<br>>> The users guide depends upon a number of ReST source files generated by<br>>> utils/mkUserGuidePart. I'd guess that you haven't built these. I'll look<br>>> in to why this is but in the meantime the workaround is just to `make<br>>> all` before attempting to `make html`. Sorry for the inconvenience!<br>>><br>>> Cheers,<br>>><br>>> - Ben<br>><br>><br></div>