Skip to contentSkip to conversation

scripts/tags.sh: Fix obsolete parameter for ctags

PATCH New Philip K. Gisslow 1 participant 1 message Sep 5, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/tags.sh: Fix obsolete parameter for ctags

Distros such as Fedora and Arch are using the maintained universal-ctags implementation. This version has replaced the obsolete --extra flag with --extras.

---
 scripts/tags.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
scripts/tags.sh +5 -1
index db8ba411860a..b24bfaec6290 100755
@@ -247,6 +247,10 @@ setup_regex()
 
 exuberant()
 {
+	CTAGS_EXTRA="extra"
+	if $1 --version 2>&1 | grep -iq universal; then
+	    CTAGS_EXTRA="extras"
+	fi
 	setup_regex exuberant asm c
 	all_target_sources | xargs $1 -a                        \
 	-I __initdata,__exitdata,__initconst,__ro_after_init	\
@@ -261,7 +265,7 @@ exuberant()
 	-I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL,ACPI_EXPORT_SYMBOL   \
 	-I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \
 	-I static,const						\
-	--extra=+fq --c-kinds=+px --fields=+iaS --langmap=c:+.h \
+	--$CTAGS_EXTRA=+fq --c-kinds=+px --fields=+iaS --langmap=c:+.h \
 	"${regex[@]}"
 
 	setup_regex exuberant kconfig
Signature · 1 line
2.33.0