$(MAKE) stage=3
ifeq "$(CLEAN_ALL_STAGES)" "YES"
-clean distclean::
+clean distclean maintainer-clean::
$(RM) -f prelude/primops.txt
$(RM) -f $(PRIMOP_BITS)
$(RM) -f $(CONFIG_HS)
endif
ifeq "$(CLEAN_ALL_STAGES)" "YES"
-clean distclean:: clean.stage.1 clean.stage.2 clean.stage.3
+clean distclean maintainer-clean:: clean.stage.1 clean.stage.2 clean.stage.3
else
-clean distclean:: clean.stage.$(stage)
+clean distclean maintainer-clean:: clean.stage.$(stage)
endif
ifeq "$(CLEAN_ALL_STAGES)" "YES"
-distclean::
+distclean maintainer-clean::
$(RM) -f ghc.cabal
endif
doc.stage.%:
$(CABAL) haddock --distpref dist-stage$* \
--haddock-option=--optghc=-DSTAGE=$* \
+ --haddock-option=+RTS --haddock-option=-s --haddock-option=-c --haddock-option=-RTS \
--with-haddock=$(FPTOOLS_TOP_ABS)/utils/haddock/install-inplace/bin/haddock
install:
include $(TOP)/mk/bindist.mk
LIB_DIST_DIR = dist-stage2
+#-----------------------------------------------------------------------------
+# etags generation
+ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
+GHCTAGS = $(TOP)/utils/ghctags/ghctags.exe
+else
+GHCTAGS = $(TOP)/utils/ghctags/ghctags-inplace
+endif
+GHCTAGS_ROOT = main/GHC.hs
+
+# etags for stage2 is actually broken since it requires building
+# ghctags against an older ghc api
+etags: etags.stage.2
+etags.stage.%:
+ $(GHCTAGS) --topdir $(FPTOOLS_TOP_ABS) --etags --use-cabal-config=./dist-stage$* -- -DSTAGE=$* -- $(GHCTAGS_ROOT)