summaryrefslogtreecommitdiff
path: root/compiler/Makefile
diff options
context:
space:
mode:
authorThomas Schilling <nominolo@googlemail.com>2008-10-13 17:09:27 +0000
committerThomas Schilling <nominolo@googlemail.com>2008-10-13 17:09:27 +0000
commite48d901d2e723c1b24b86c4755b948e70506f990 (patch)
tree1a718aedbaae4281c35375c73b58b7ba5928d3d1 /compiler/Makefile
parent7fb94f753f166563ee3f3b43e7ec5064e82971d3 (diff)
downloadhaskell-e48d901d2e723c1b24b86c4755b948e70506f990.tar.gz
Add 'etags' makefile target.
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.
Diffstat (limited to 'compiler/Makefile')
-rw-r--r--compiler/Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/Makefile b/compiler/Makefile
index 03f09405b2..407cea6017 100644
--- a/compiler/Makefile
+++ b/compiler/Makefile
@@ -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)