[PATCH] rt-tests: Makefile: Restore support for Exuberant Ctags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit 974241c78a6f ("rt-tests: Makefile: ctags: Change obsolete extra
to extras") is Universal Ctags specific and broke Exuberant Ctags.

Restore support for Exuberant Ctags by automatically detecting which
variant to use.

Signed-off-by: Mathias Krause <minipli@xxxxxxxxxxxxxx>
---
 Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 223a839151ec..8d3268d19901 100644
--- a/Makefile
+++ b/Makefile
@@ -251,6 +251,11 @@ help:
 	@echo "    tarball   :  make a rt-tests tarball suitable for release"
 	@echo "    help      :  print this message"
 
+# Universal Ctags warns about the backward compatible option '--extra' and
+# wants it to be called '--extras'.
+CTAGS_BIN = ctags
+CTAGS_EXTRA := $(shell $(CTAGS_BIN) --version 2>&1 | grep -iq universal && echo extras || echo extra)
+
 .PHONY: tags
 tags:
-	ctags -R --extras=+f --c-kinds=+p --exclude=tmp --exclude=BUILD *
+	$(CTAGS_BIN) -R --$(CTAGS_EXTRA)=+f --c-kinds=+p --exclude=tmp --exclude=BUILD *
-- 
2.30.2





[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux