From 6b84f03683a76f41872637a55914103786a5222a Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Tue, 2 Oct 2012 22:57:51 +0100
Subject: [PATCH] Fixup TAGS generation with newer GHC

Newer GHC refuses to allow "-O" with interactive mode, so let's filter
that out. Furthermore, sometimes you don't have a clean tree exactly
when you need to look up something/update the tags, so let's filter
out the "-Werror" too.

And finally, we need to pass the actual exact flags (including
nocurl, parallel, etc.) that we use for building, so let's add those
too.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 Makefile.am | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index c199d6b44..3def7c4d8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1612,7 +1612,10 @@ hs-apidoc: $(HS_BUILT_SRCS)
 .PHONY: TAGS
 TAGS: $(GENERATED_FILES)
 	rm -f TAGS
-	$(GHC) -e ":etags" -v0 $(HFLAGS) $(HS_LIBTEST_SRCS)
+	$(GHC) -e ":etags" -v0 \
+	  $(filter-out -O -Werror,$(HFLAGS)) \
+	  $(HTOOLS_NOCURL) $(HTOOLS_PARALLEL3) \
+	  $(HS_LIBTEST_SRCS)
 	find . -path './lib/*.py' -o -path './scripts/gnt-*' -o \
 	  -path './daemons/ganeti-*' -o -path './tools/*' -o \
 	  -path './qa/*.py' | \
-- 
GitLab