Add 'etags' makefile target.
authorThomas Schilling <nominolo@googlemail.com>
Mon, 13 Oct 2008 17:09:27 +0000 (17:09 +0000)
committerThomas Schilling <nominolo@googlemail.com>
Mon, 13 Oct 2008 17:09:27 +0000 (17:09 +0000)
This only works with stage2 since `ghctags' is built against stage1
but not against the bootstrapping compiler.  Also note that all of GHC
must typecheck for this target to succeed.  Perhaps we should not
overwrite the old TAGS file by default then.

compiler/Makefile

index 03f0940..407cea6 100644 (file)
@@ -484,3 +484,14 @@ endif
 include $(TOP)/mk/bindist.mk
 LIB_DIST_DIR = dist-stage2
 
+#-----------------------------------------------------------------------------
+# etags generation
+
+GHCTAGS = $(TOP)/utils/ghctags/ghctags
+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)