summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGreg Kurz2020-09-03 21:47:55 +0200
committerLaurent Vivier2020-09-10 16:20:49 +0200
commitc857f9050cff9eb02ff05e901152dc1570f798bd (patch)
treedb1b2a015ccbe9b2b62261048395859ae790c366 /Makefile
parentMakefile: Drop extra phony cscope (diff)
downloadqemu-c857f9050cff9eb02ff05e901152dc1570f798bd.tar.gz
qemu-c857f9050cff9eb02ff05e901152dc1570f798bd.tar.xz
qemu-c857f9050cff9eb02ff05e901152dc1570f798bd.zip
Makefile: Skip the meson subdir in cscope/TAGS/ctags
If the meson submodule is present, we don't really want to index its source code. Consolidate the find command in a single place and use it for cscope, ctags and etags. Note that this now causes ctags and etags to also index assembly files, but this is okay since they both have been supporting assembly since 2001 at least. Signed-off-by: Greg Kurz <groug@kaod.org> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <159916247553.691541.10480293747685886851.stgit@bahia.lan> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 83bc40b255..2ed19310cf 100644
--- a/Makefile
+++ b/Makefile
@@ -221,20 +221,22 @@ 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]"
+
.PHONY: ctags
ctags:
rm -f tags
- find "$(SRC_PATH)" -name '*.[hc]' -exec ctags --append {} +
+ $(find-src-path) -exec ctags --append {} +
.PHONY: TAGS
TAGS:
rm -f TAGS
- find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} +
+ $(find-src-path) -exec etags --append {} +
.PHONY: cscope
cscope:
rm -f "$(SRC_PATH)"/cscope.*
- find "$(SRC_PATH)/" -name "*.[chsS]" -print | sed -e 's,^\./,,' > "$(SRC_PATH)/cscope.files"
+ $(find-src-path) -print | sed -e 's,^\./,,' > "$(SRC_PATH)/cscope.files"
cscope -b -i"$(SRC_PATH)/cscope.files"
# Needed by "meson install"