Skip to contentSkip to conversation

Makefile: Add *.[ch].inc files to cscope/ctags/TAGS

PATCH Applied Greg Kurz 3 participants 3 messages Oct 13, 2020 – Oct 26, 2020 Kbuild

lore
Share & tools
lore

Greg Kurz

author
#0 lore raw

PATCH v2 1/1 Makefile: Add *.[ch].inc files to cscope/ctags/TAGS

The code base has some C source and header files that don't get indexed because their name ends with .inc:

$ git ls-files "*.[ch].inc" | wc -l
66

Add them to the list.

--
v2: add the missing \( and \)

---
 Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index c37e513431fe..3c5a0b0f7a11 100644
@@ -190,7 +190,7 @@ distclean: clean ninja-distclean
 	rm -f linux-headers/asm
 	rm -Rf .sdk
 
-find-src-path = find "$(SRC_PATH)/" -path "$(SRC_PATH)/meson" -prune -o -name "*.[chsS]"
+find-src-path = find "$(SRC_PATH)/" -path "$(SRC_PATH)/meson" -prune -o \( -name "*.[chsS]" -o -name "*.[ch].inc" \)
 
 .PHONY: ctags
 ctags:
#1 lore raw
Quoted 22 lines · Greg Kurz

The code base has some C source and header files that don't get indexed because their name ends with .inc:

$ git ls-files "*.[ch].inc" | wc -l
66

Add them to the list.

--
v2: add the missing \( and \)

---
 Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +0 -0
index c37e513431fe..3c5a0b0f7a11 100644

Makefile distclean: clean ninja-distclean · line 196

Quoted 8 lines
Makefile +1 -1
@@ -190,7 +190,7 @@ distclean: clean ninja-distclean
 	rm -f linux-headers/asm
 	rm -Rf .sdk
 
-find-src-path = find "$(SRC_PATH)/" -path "$(SRC_PATH)/meson" -prune -o -name "*.[chsS]"
+find-src-path = find "$(SRC_PATH)/" -path "$(SRC_PATH)/meson" -prune -o \( -name "*.[chsS]" -o -name "*.[ch].inc" \)
 
 .PHONY: ctags
 ctags:
#2 lore raw

Le 13/10/2020 à 12:57, Paolo Bonzini a écrit :

Quoted 27 lines · Greg Kurz
Quoted 26 lines

The code base has some C source and header files that don't get indexed because their name ends with .inc:

$ git ls-files "*.[ch].inc" | wc -l
66

Add them to the list.

--
v2: add the missing \( and \)

---
 Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index c37e513431fe..3c5a0b0f7a11 100644
@@ -190,7 +190,7 @@ distclean: clean ninja-distclean
 	rm -f linux-headers/asm
 	rm -Rf .sdk
 
-find-src-path = find "$(SRC_PATH)/" -path "$(SRC_PATH)/meson" -prune -o -name "*.[chsS]"
+find-src-path = find "$(SRC_PATH)/" -path "$(SRC_PATH)/meson" -prune -o \( -name "*.[chsS]" -o -name "*.[ch].inc" \)
 
Quoted 8 lines

Makefile distclean: clean ninja-distclean · line 196

Quoted 4 lines
Makefile +0 -0
 .PHONY: ctags
 ctags:

Applied to my trivial-patches branch.

Thanks,
Laurent