From 2db5364598282bafd386627ec5fc4fcc88ad2e4c Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Fri, 6 Jul 2012 12:47:39 +0200
Subject: [PATCH] Also compute Haskell tags in "make tags"

Note however that this won't work correctly with older compilers, due
to ghc issue #4256; however, it's a handy way to build complete a TAGS
file for Emacs.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
---
 Makefile.am | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index c91ca1795..d6e392785 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1466,10 +1466,11 @@ hs-apidoc: $(HS_BUILT_SRCS)
 .PHONY: TAGS
 TAGS: $(BUILT_SOURCES)
 	rm -f TAGS
+	$(GHC) -e ":etags" -v0 $(HFLAGS) $(HS_LIB_SRCS)
 	find . -path './lib/*.py' -o -path './scripts/gnt-*' -o \
 	  -path './daemons/ganeti-*' -o -path './tools/*' -o \
 	  -path './qa/*.py' | \
-	  etags -l python -
+	  etags -l python -a -
 
 .PHONY: coverage
 if WANT_HTOOLS
-- 
GitLab