* [PATCH] Makefile: Ensure cscope.out/tags/TAGS are generated in the source tree
@ 2020-10-15 14:49 Greg Kurz
2020-10-15 15:06 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Greg Kurz @ 2020-10-15 14:49 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Paolo Bonzini
Tools usually expect the index files to be in the source tree, eg. emacs.
This is already the case when doing out-of-tree builds, but with in-tree
builds they end up in the build directory.
Force cscope, ctags and etags to put them in the source tree.
Signed-off-by: Greg Kurz <groug@kaod.org>
---
Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 3c5a0b0f7a11..45f983d9ef08 100644
--- a/Makefile
+++ b/Makefile
@@ -194,19 +194,19 @@ find-src-path = find "$(SRC_PATH)/" -path "$(SRC_PATH)/meson" -prune -o \( -name
.PHONY: ctags
ctags:
- rm -f tags
- $(find-src-path) -exec ctags --append {} +
+ rm -f "$(SRC_PATH)/"tags
+ $(find-src-path) -exec ctags -f "$(SRC_PATH)/"tags --append {} +
.PHONY: TAGS
TAGS:
- rm -f TAGS
- $(find-src-path) -exec etags --append {} +
+ rm -f "$(SRC_PATH)/"TAGS
+ $(find-src-path) -exec etags -f "$(SRC_PATH)/"TAGS --append {} +
.PHONY: cscope
cscope:
rm -f "$(SRC_PATH)"/cscope.*
$(find-src-path) -print | sed -e 's,^\./,,' > "$(SRC_PATH)/cscope.files"
- cscope -b -i"$(SRC_PATH)/cscope.files"
+ cscope -b -i"$(SRC_PATH)/cscope.files" -f"$(SRC_PATH)"/cscope.out
# Needed by "meson install"
export DESTDIR
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Makefile: Ensure cscope.out/tags/TAGS are generated in the source tree
2020-10-15 14:49 [PATCH] Makefile: Ensure cscope.out/tags/TAGS are generated in the source tree Greg Kurz
@ 2020-10-15 15:06 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2020-10-15 15:06 UTC (permalink / raw)
To: Greg Kurz, qemu-devel; +Cc: qemu-trivial
On 15/10/20 16:49, Greg Kurz wrote:
> Tools usually expect the index files to be in the source tree, eg. emacs.
> This is already the case when doing out-of-tree builds, but with in-tree
> builds they end up in the build directory.
>
> Force cscope, ctags and etags to put them in the source tree.
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
> Makefile | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 3c5a0b0f7a11..45f983d9ef08 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -194,19 +194,19 @@ find-src-path = find "$(SRC_PATH)/" -path "$(SRC_PATH)/meson" -prune -o \( -name
>
> .PHONY: ctags
> ctags:
> - rm -f tags
> - $(find-src-path) -exec ctags --append {} +
> + rm -f "$(SRC_PATH)/"tags
> + $(find-src-path) -exec ctags -f "$(SRC_PATH)/"tags --append {} +
>
> .PHONY: TAGS
> TAGS:
> - rm -f TAGS
> - $(find-src-path) -exec etags --append {} +
> + rm -f "$(SRC_PATH)/"TAGS
> + $(find-src-path) -exec etags -f "$(SRC_PATH)/"TAGS --append {} +
>
> .PHONY: cscope
> cscope:
> rm -f "$(SRC_PATH)"/cscope.*
> $(find-src-path) -print | sed -e 's,^\./,,' > "$(SRC_PATH)/cscope.files"
> - cscope -b -i"$(SRC_PATH)/cscope.files"
> + cscope -b -i"$(SRC_PATH)/cscope.files" -f"$(SRC_PATH)"/cscope.out
>
> # Needed by "meson install"
> export DESTDIR
>
>
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-15 15:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-15 14:49 [PATCH] Makefile: Ensure cscope.out/tags/TAGS are generated in the source tree Greg Kurz
2020-10-15 15:06 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).