Handle the html target in compiler/ and ghc/
[ghc-hetmet.git] / compiler / Makefile
index 67d4e3f..cd6b295 100644 (file)
@@ -199,7 +199,9 @@ build.stage.%:
        $(MAKE) -C ../ghc stage=$*
 
 doc.stage.%:
-       $(CABAL) haddock --distpref dist-stage$*
+       $(CABAL) haddock --distpref dist-stage$* \
+                        --haddock-option=--optghc=-DSTAGE=$* \
+                        --with-haddock=$(FPTOOLS_TOP_ABS)/utils/haddock/install-inplace/bin/haddock
 
 # XXX We ought to actually install the (stage 2) library
 install:
@@ -450,6 +452,9 @@ primop-primop-info.hs-incl: prelude/primops.txt
 primop-usage.hs-incl: prelude/primops.txt
        $(GENPRIMOP) --usage              < $< > $@
 
+html:
+       $(MAKE) doc stage=2
+
 install-docs:
        @: