git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>, git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	Denton Liu <liu.denton@gmail.com>,
	Felipe Contreras <felipe.contreras@gmail.com>,
	Kristof Provost <Kristof@provost-engineering.be>,
	Taylor Blau <me@ttaylorr.com>, Jeff King <peff@peff.net>
Subject: Re: [PATCH v2 4/5] Makefile: don't use "FORCE" for tags targets
Date: Wed, 30 Jun 2021 01:05:31 +0100	[thread overview]
Message-ID: <67c45b13-df8f-8065-377a-fbd2f80992ee@ramsayjones.plus.com> (raw)
In-Reply-To: <patch-4.5-b924cc3f56-20210629T110837Z-avarab@gmail.com>



On 29/06/2021 12:12, Ævar Arnfjörð Bjarmason wrote:
> Remove the "FORCE" dependency from the "tags", "TAGS" and "cscope.out"
> targets, instead make them depend on whether or not the relevant
> source files have changed.
> 
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
>  Makefile | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 2e3b257164..7b0d9773b0 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2727,19 +2727,21 @@ FIND_SOURCE_FILES = ( \
>  		| sed -e 's|^\./||' \
>  	)
>  
> -$(ETAGS_TARGET): FORCE
> +FOUND_SOURCE_FILES = $(shell $(FIND_SOURCE_FILES))
> +
> +$(ETAGS_TARGET): $(FOUND_SOURCE_FILES)
>  	$(QUIET_GEN)$(RM) "$(ETAGS_TARGET)+" && \
>  	$(FIND_SOURCE_FILES) | xargs etags -a -o "$(ETAGS_TARGET)+" && \
>  	mv "$(ETAGS_TARGET)+" "$(ETAGS_TARGET)"
>  
> -tags: FORCE
> +tags: $(FOUND_SOURCE_FILES)
>  	$(QUIET_GEN)$(RM) tags+ && \
>  	$(FIND_SOURCE_FILES) | xargs ctags -a -o tags+ && \
>  	mv tags+ tags

I was expecting to see the above targets to be changed, similarly to ...

>  
> -cscope.out:
> +cscope.out: $(FOUND_SOURCE_FILES)
>  	$(QUIET_GEN)$(RM) cscope.out && \
> -	$(FIND_SOURCE_FILES) | xargs cscope -f$@ -b
> +	echo $(FOUND_SOURCE_FILES) | xargs cscope -f$@ -b

... this hunk (ie. 'an "echo <list> | xargs" pattern')
Indeed, the above phrase was taken from the commit message of
the next patch (5/5), which implies that this change had already
happened (presumably in this patch).

ATB,
Ramsay Jones

>  
>  .PHONY: cscope
>  cscope: cscope.out
> @@ -2923,7 +2925,7 @@ check: config-list.h command-list.h
>  		exit 1; \
>  	fi
>  
> -FOUND_C_SOURCES = $(filter %.c,$(shell $(FIND_SOURCE_FILES)))
> +FOUND_C_SOURCES = $(filter %.c,$(FOUND_SOURCE_FILES))
>  COCCI_SOURCES = $(filter-out $(THIRD_PARTY_SOURCES),$(FOUND_C_SOURCES))
>  
>  %.cocci.patch: %.cocci $(COCCI_SOURCES)
> 

  reply	other threads:[~2021-06-30  0:13 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22 14:21 [PATCH 0/3] Makefile: "make tags" fixes & cleanup Ævar Arnfjörð Bjarmason
2021-06-22 14:21 ` [PATCH 1/3] Makefile: move ".PHONY: cscope" near its target Ævar Arnfjörð Bjarmason
2021-06-22 14:21 ` [PATCH 2/3] Makefile: fix "cscope" target to refer to cscope.out Ævar Arnfjörð Bjarmason
2021-06-22 19:25   ` Jeff King
2021-06-22 19:49     ` Chris Torek
2021-06-23 19:54       ` Felipe Contreras
2021-06-23 19:51     ` Felipe Contreras
2021-06-23 19:25   ` Felipe Contreras
2021-06-22 14:21 ` [PATCH 3/3] Makefile: don't use "FORCE" for tags targets Ævar Arnfjörð Bjarmason
2021-06-22 19:28   ` Jeff King
2021-06-23 19:49   ` Felipe Contreras
2021-06-22 15:16 ` [PATCH 0/3] Makefile: "make tags" fixes & cleanup Taylor Blau
2021-06-29  6:29 ` Junio C Hamano
2021-06-29 12:07   ` Ævar Arnfjörð Bjarmason
2021-06-29 11:12 ` [PATCH v2 0/5] " Ævar Arnfjörð Bjarmason
2021-06-29 11:12   ` [PATCH v2 1/5] Makefile: move ".PHONY: cscope" near its target Ævar Arnfjörð Bjarmason
2021-06-29 11:12   ` [PATCH v2 2/5] Makefile: add QUIET_GEN to "cscope" target Ævar Arnfjörð Bjarmason
2021-06-29 11:12   ` [PATCH v2 3/5] Makefile: fix "cscope" target to refer to cscope.out Ævar Arnfjörð Bjarmason
2021-07-01 22:23     ` Jeff King
2021-07-01 22:25       ` Jeff King
2021-06-29 11:12   ` [PATCH v2 4/5] Makefile: don't use "FORCE" for tags targets Ævar Arnfjörð Bjarmason
2021-06-30  0:05     ` Ramsay Jones [this message]
2021-06-29 11:12   ` [PATCH v2 5/5] Makefile: normalize clobbering & xargs " Ævar Arnfjörð Bjarmason
2021-07-21 23:23   ` [PATCH v3 0/5] Makefile: "make tags" fixes & cleanup Ævar Arnfjörð Bjarmason
2021-07-21 23:23     ` [PATCH v3 1/5] Makefile: move ".PHONY: cscope" near its target Ævar Arnfjörð Bjarmason
2021-07-21 23:23     ` [PATCH v3 2/5] Makefile: add QUIET_GEN to "cscope" target Ævar Arnfjörð Bjarmason
2021-07-21 23:23     ` [PATCH v3 3/5] Makefile: don't use "FORCE" for tags targets Ævar Arnfjörð Bjarmason
2021-07-21 23:23     ` [PATCH v3 4/5] Makefile: the "cscope" target always creates a "cscope.out" Ævar Arnfjörð Bjarmason
2021-07-22 16:55       ` Junio C Hamano
2021-07-22 17:58         ` Taylor Blau
2021-07-22 18:50           ` Junio C Hamano
2021-07-22 21:20             ` Ævar Arnfjörð Bjarmason
2021-07-21 23:23     ` [PATCH v3 5/5] Makefile: normalize clobbering & xargs for tags targets Ævar Arnfjörð Bjarmason
2021-07-23 10:43       ` Jeff King
2021-07-23 10:47         ` Jeff King
2021-07-23 10:47     ` [PATCH v3 0/5] Makefile: "make tags" fixes & cleanup Jeff King
2021-07-23 15:25       ` Junio C Hamano
2021-07-23 19:32       ` Felipe Contreras
2021-07-23 19:41     ` Felipe Contreras
2021-08-04 22:54     ` [PATCH v4 " Ævar Arnfjörð Bjarmason
2021-08-04 22:54       ` [PATCH v4 1/5] Makefile: move ".PHONY: cscope" near its target Ævar Arnfjörð Bjarmason
2021-08-04 22:54       ` [PATCH v4 2/5] Makefile: add QUIET_GEN to "cscope" target Ævar Arnfjörð Bjarmason
2021-08-04 22:54       ` [PATCH v4 3/5] Makefile: don't use "FORCE" for tags targets Ævar Arnfjörð Bjarmason
2021-08-04 22:54       ` [PATCH v4 4/5] Makefile: remove "cscope.out", not "cscope*" in cscope.out target Ævar Arnfjörð Bjarmason
2021-08-04 22:54       ` [PATCH v4 5/5] Makefile: normalize clobbering & xargs for tags targets Ævar Arnfjörð Bjarmason

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=67c45b13-df8f-8065-377a-fbd2f80992ee@ramsayjones.plus.com \
    --to=ramsay@ramsayjones.plus.com \
    --cc=Kristof@provost-engineering.be \
    --cc=avarab@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=liu.denton@gmail.com \
    --cc=me@ttaylorr.com \
    --cc=peff@peff.net \
    --subject='Re: [PATCH v2 4/5] Makefile: don'\''t use "FORCE" for tags targets' \
    /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

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).