qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Greg Kurz <groug@kaod.org>, qemu-devel@nongnu.org
Cc: Laurent Vivier <laurent@vivier.eu>
Subject: Re: [PATCH 2/2] Makefile: Skip the meson subdir in cscope/TAGS/ctags
Date: Thu, 3 Sep 2020 22:17:51 +0200	[thread overview]
Message-ID: <abd5e0e5-a647-2450-06aa-bd6b9f3cd40e@redhat.com> (raw)
In-Reply-To: <159916247553.691541.10480293747685886851.stgit@bahia.lan>

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



  reply	other threads:[~2020-09-03 20:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2020-09-09 13:45   ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=abd5e0e5-a647-2450-06aa-bd6b9f3cd40e@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=groug@kaod.org \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).