Handle the html target in compiler/ and ghc/
[ghc-hetmet.git] / compiler / Makefile
index eabf9c6..cd6b295 100644 (file)
@@ -80,6 +80,14 @@ CONFIGURE_FLAGS_STAGE2 += --flags=-stage1
 
 CONFIGURE_FLAGS_STAGE1 += --flags=-ghci
 
+ifeq "$(GhcWithNativeCodeGen)" "YES"
+CONFIGURE_FLAGS_STAGE1 += --flags=ncg
+CONFIGURE_FLAGS_STAGE2 += --flags=ncg
+else
+CONFIGURE_FLAGS_STAGE1 += --flags=-ncg
+CONFIGURE_FLAGS_STAGE2 += --flags=-ncg
+endif
+
 ifeq "$(GhcWithInterpreter)" "YES"
 CONFIGURE_FLAGS_STAGE2 += --flags=ghci
 
@@ -191,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:
@@ -442,6 +452,12 @@ primop-primop-info.hs-incl: prelude/primops.txt
 primop-usage.hs-incl: prelude/primops.txt
        $(GENPRIMOP) --usage              < $< > $@
 
+html:
+       $(MAKE) doc stage=2
+
+install-docs:
+       @:
+
 #-----------------------------------------------------------------------------
 # binary-dist
 #