diff options
author | Peter Xu | 2021-08-04 15:23:28 +0200 |
---|---|---|
committer | Paolo Bonzini | 2021-11-02 15:57:20 +0100 |
commit | af7d106e3e57e0526d571063096e2ba3d7e6ab8a (patch) | |
tree | d45c85915950d5108c6b8b91c3e203168f6e39fa /Makefile | |
parent | Makefile: Fix gtags generation (diff) | |
download | qemu-af7d106e3e57e0526d571063096e2ba3d7e6ab8a.tar.gz qemu-af7d106e3e57e0526d571063096e2ba3d7e6ab8a.tar.xz qemu-af7d106e3e57e0526d571063096e2ba3d7e6ab8a.zip |
Makefile: Fix cscope issues on MacOS and soft links
This 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.
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20210804132328.41353-3-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -235,7 +235,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: |