* [PATCH 0/2] Makefile: Some more cleanups for cscope/TAGS/ctags
@ 2020-09-03 19:47 Greg Kurz
2020-09-03 19:47 ` [PATCH 1/2] Makefile: Drop extra phony cscope Greg Kurz
2020-09-03 19:47 ` [PATCH 2/2] Makefile: Skip the meson subdir in cscope/TAGS/ctags Greg Kurz
0 siblings, 2 replies; 7+ messages in thread
From: Greg Kurz @ 2020-09-03 19:47 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Laurent Vivier
The first patch is a leftover that could probably go through the trivial
tree. The second one avoids an awkward indexation of the meson code if
the meson submodule is present.
---
Greg Kurz (2):
Makefile: Drop extra phony cscope
Makefile: Skip the meson subdir in cscope/TAGS/ctags
Makefile | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
--
Greg
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] Makefile: Drop extra phony cscope
2020-09-03 19:47 [PATCH 0/2] Makefile: Some more cleanups for cscope/TAGS/ctags Greg Kurz
@ 2020-09-03 19:47 ` Greg Kurz
2020-09-09 13:40 ` Laurent Vivier
2020-09-09 13:43 ` Laurent Vivier
2020-09-03 19:47 ` [PATCH 2/2] Makefile: Skip the meson subdir in cscope/TAGS/ctags Greg Kurz
1 sibling, 2 replies; 7+ messages in thread
From: Greg Kurz @ 2020-09-03 19:47 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Laurent Vivier
Commit d79864058a64 added a dedicated phony line for cscope.
Signed-off-by: Greg Kurz <groug@kaod.org>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index ed354c43b0ba..a9d3e2c4d375 100644
--- a/Makefile
+++ b/Makefile
@@ -127,7 +127,7 @@ generated-files-y += .git-submodule-status
Makefile: ;
configure: ;
-.PHONY: all clean cscope distclean install \
+.PHONY: all clean distclean install \
recurse-all dist msi FORCE
$(call set-vpath, $(SRC_PATH))
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] Makefile: Skip the meson subdir in cscope/TAGS/ctags
2020-09-03 19:47 [PATCH 0/2] Makefile: Some more cleanups for cscope/TAGS/ctags Greg Kurz
2020-09-03 19:47 ` [PATCH 1/2] Makefile: Drop extra phony cscope Greg Kurz
@ 2020-09-03 19:47 ` Greg Kurz
2020-09-03 20:17 ` Paolo Bonzini
2020-09-09 13:45 ` Laurent Vivier
1 sibling, 2 replies; 7+ messages in thread
From: Greg Kurz @ 2020-09-03 19:47 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Laurent Vivier
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>
---
Makefile | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index a9d3e2c4d375..34dd9e6c4c4a 100644
--- a/Makefile
+++ b/Makefile
@@ -229,20 +229,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"
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] Makefile: Skip the meson subdir in cscope/TAGS/ctags
2020-09-03 19:47 ` [PATCH 2/2] Makefile: Skip the meson subdir in cscope/TAGS/ctags Greg Kurz
@ 2020-09-03 20:17 ` Paolo Bonzini
2020-09-09 13:45 ` Laurent Vivier
1 sibling, 0 replies; 7+ messages in thread
From: Paolo Bonzini @ 2020-09-03 20:17 UTC (permalink / raw)
To: Greg Kurz, qemu-devel; +Cc: Laurent Vivier
On 03/09/20 21:47, Greg Kurz wrote:
> 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>
> ---
> Makefile | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index a9d3e2c4d375..34dd9e6c4c4a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -229,20 +229,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"
>
>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
so this can go through the trivial tree as well.
Paolo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Makefile: Drop extra phony cscope
2020-09-03 19:47 ` [PATCH 1/2] Makefile: Drop extra phony cscope Greg Kurz
@ 2020-09-09 13:40 ` Laurent Vivier
2020-09-09 13:43 ` Laurent Vivier
1 sibling, 0 replies; 7+ messages in thread
From: Laurent Vivier @ 2020-09-09 13:40 UTC (permalink / raw)
To: Greg Kurz, qemu-devel; +Cc: Paolo Bonzini
Le 03/09/2020 à 21:47, Greg Kurz a écrit :
> Commit d79864058a64 added a dedicated phony line for cscope.
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index ed354c43b0ba..a9d3e2c4d375 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -127,7 +127,7 @@ generated-files-y += .git-submodule-status
> Makefile: ;
> configure: ;
>
> -.PHONY: all clean cscope distclean install \
> +.PHONY: all clean distclean install \
> recurse-all dist msi FORCE
>
> $(call set-vpath, $(SRC_PATH))
>
>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Makefile: Drop extra phony cscope
2020-09-03 19:47 ` [PATCH 1/2] Makefile: Drop extra phony cscope Greg Kurz
2020-09-09 13:40 ` Laurent Vivier
@ 2020-09-09 13:43 ` Laurent Vivier
1 sibling, 0 replies; 7+ messages in thread
From: Laurent Vivier @ 2020-09-09 13:43 UTC (permalink / raw)
To: Greg Kurz, qemu-devel; +Cc: Paolo Bonzini
Le 03/09/2020 à 21:47, Greg Kurz a écrit :
> Commit d79864058a64 added a dedicated phony line for cscope.
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index ed354c43b0ba..a9d3e2c4d375 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -127,7 +127,7 @@ generated-files-y += .git-submodule-status
> Makefile: ;
> configure: ;
>
> -.PHONY: all clean cscope distclean install \
> +.PHONY: all clean distclean install \
> recurse-all dist msi FORCE
>
> $(call set-vpath, $(SRC_PATH))
>
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] Makefile: Skip the meson subdir in cscope/TAGS/ctags
2020-09-03 19:47 ` [PATCH 2/2] Makefile: Skip the meson subdir in cscope/TAGS/ctags Greg Kurz
2020-09-03 20:17 ` Paolo Bonzini
@ 2020-09-09 13:45 ` Laurent Vivier
1 sibling, 0 replies; 7+ messages in thread
From: Laurent Vivier @ 2020-09-09 13:45 UTC (permalink / raw)
To: Greg Kurz, qemu-devel; +Cc: Paolo Bonzini
Le 03/09/2020 à 21:47, Greg Kurz a écrit :
> 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>
> ---
> Makefile | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index a9d3e2c4d375..34dd9e6c4c4a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -229,20 +229,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"
>
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-09-09 13:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-03 19:47 [PATCH 0/2] Makefile: Some more cleanups for cscope/TAGS/ctags Greg Kurz
2020-09-03 19:47 ` [PATCH 1/2] Makefile: Drop extra phony cscope Greg Kurz
2020-09-09 13:40 ` Laurent Vivier
2020-09-09 13:43 ` Laurent Vivier
2020-09-03 19:47 ` [PATCH 2/2] Makefile: Skip the meson subdir in cscope/TAGS/ctags Greg Kurz
2020-09-03 20:17 ` Paolo Bonzini
2020-09-09 13:45 ` Laurent Vivier
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).