Makefile: A few fixes to tag generation
v2 cover Makefile: A few fixes to tag generation
I didn't squash patch 1 because they fix different things at different places (patch 1 removes the "meson" dir warning on master branch already for gtags). Patch 2 is the same as posted previous on the list.
Please have a look, thanks.
Peter Xu (2):
Makefile: Fix gtags generation
Makefile: Fix cscope issues on MacOS and soft links
Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
2.31.1
PATCH v2 1/2 Makefile: Fix gtags generation
We should use "-print" or otherwise all "-prone" is ignored.
--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
@@ -250,7 +250,7 @@ gtags: "GTAGS", "Remove old $@ files") $(call quiet-command, \ (cd $(SRC_PATH) && \ - $(find-src-path) | gtags -f -), \ + $(find-src-path) -print | gtags -f -), \ "GTAGS", "Re-index $(SRC_PATH)") .PHONY: TAGS
Signature · 1 line
2.31.1
PATCH v2 2/2 Makefile: Fix cscope issues on MacOS and soft links
In reply to Peter XuThis patch fixes actually two issues with 'make cscope'.
Firstly, it fixes the command for MacOS "find" command as MacOS will append the full path of "$(SRC_PATH)/" before each found entry, then after the final "./" replacement trick it'll look like (e.g., "qapi/qmp-dispatch.c"):
/qapi/qmp-dispatch.c
Which will point to the root directory instead.
Fix it by simply remove the "/" in "$(SRC_PATH)/" of "find-src-path", then it'll work for at least both Linux and MacOS.
The other OS-independent issue is to start proactively ignoring soft links when generating tags, otherwise by default on master branch we'll see this error when "make cscope":
cscope: cannot find file subprojects/libvhost-user/include/atomic.h
This patch should fix the two issues altogether.
--- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Makefile +2 -1
@@ -229,7 +229,8 @@ distclean: clean rm -f linux-headers/asm rm -Rf .sdk -find-src-path = find "$(SRC_PATH)/" -path "$(SRC_PATH)/meson" -prune -o \( -name "*.[chsS]" -o -name "*.[ch].inc" \) +find-src-path = find "$(SRC_PATH)" -path "$(SRC_PATH)/meson" -prune -o \ + -type l -prune -o \( -name "*.[chsS]" -o -name "*.[ch].inc" \) .PHONY: ctags ctags:
Signature · 1 line
2.31.1
Quoted 4 lines · Peter Xu
I didn't squash patch 1 because they fix different things at different places (patch 1 removes the "meson" dir warning on master branch already for gtags). Patch 2 is the same as posted previous on the list.
Quoted 8 lines
Please have a look, thanks.
Peter Xu (2):
Makefile: Fix gtags generation
Makefile: Fix cscope issues on MacOS and soft linksMakefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Ping - Anyone would like to pick this up? Even on linux I still see:
cscope: cannot find file subprojects/libvhost-user/include/atomic.h
Thanks,
Signature · 1 line
Peter Xu
Quoted 11 lines · Peter Xu
Quoted 10 lines · Peter Xu
I didn't squash patch 1 because they fix different things at different places (patch 1 removes the "meson" dir warning on master branch already for gtags). Patch 2 is the same as posted previous on the list.
Please have a look, thanks.
Peter Xu (2):
Makefile: Fix gtags generation
Makefile: Fix cscope issues on MacOS and soft links
Quoted 6 lines
Quoted 2 lines
Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)Ping - Anyone would like to pick this up? Even on linux I still see:
cscope: cannot find file
subprojects/libvhost-user/include/atomic.h
Ping?
Signature · 1 line
Peter Xu
Quoted 5 lines · Peter Xu
I didn't squash patch 1 because they fix different things at different places (patch 1 removes the "meson" dir warning on master branch already for gtags). Patch 2 is the same as posted previous on the list.
Please have a look, thanks.
Ping again.. comments welcomed..
Signature · 1 line
Peter Xu
Paolo Bonzini
AppliedQuoted 4 lines · Peter Xu
I didn't squash patch 1 because they fix different things at different places (patch 1 removes the "meson" dir warning on master branch already for gtags). Patch 2 is the same as posted previous on the list.
Quoted 9 lines
Please have a look, thanks.
Peter Xu (2):
Makefile: Fix gtags generation
Makefile: Fix cscope issues on MacOS and soft linksMakefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Queued, thanks!
Paolo