git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Denton Liu <liu.denton@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH 1/7] Makefile: mark 'check-builtins' as a .PHONY target
Date: Wed, 17 Mar 2021 10:47:42 -0700	[thread overview]
Message-ID: <xmqqlfaly8n5.fsf@gitster.g> (raw)
In-Reply-To: <c889973be754336005d0155ce670f16e322df9c3.1615856156.git.liu.denton@gmail.com> (Denton Liu's message of "Mon, 15 Mar 2021 17:56:20 -0700")

Denton Liu <liu.denton@gmail.com> writes:

> Then convention in Git's Makefile is to mark targets which do not
> actually generate any precious files (such as static checking targets).

s/Then/The/ has been pointed out, but I am not sure what "precious"
means here.  I do not think you are referring to the distinction
between ordinary targets and .PRECIOUS targets here, but the use of
the word makes readers wonder if some interaction with the .PRECIOUS
marking was taken into consideration.

> .PHONY enables the target to still run, even if a file is erroneously
> created with the same name as the target.

True.  Another convention is to "build" such a target with
double-colon rule.  The existing code already follows the
convention, so there is nothing the patch text needs to do, but if
we explain the change in the log message to make the code follow
conventions, we probably should mention it as well for completeness.


Thanks.

> Mark 'check-builtins' as a .PHONY target.
>
> Signed-off-by: Denton Liu <liu.denton@gmail.com>
> ---
>  Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Makefile b/Makefile
> index dfb0f1000f..6dbecdb606 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -3236,6 +3236,7 @@ check-docs::
>  
>  ### Make sure built-ins do not have dups and listed in git.c
>  #
> +.PHONY: check-builtins
>  check-builtins::
>  	./check-builtins.sh

  parent reply	other threads:[~2021-03-17 17:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16  0:56 [PATCH 0/7] Sort lists and add static-analysis Denton Liu
2021-03-16  0:56 ` [PATCH 1/7] Makefile: mark 'check-builtins' as a .PHONY target Denton Liu
2021-03-16  4:59   ` Eric Sunshine
2021-03-17 17:47   ` Junio C Hamano [this message]
2021-03-16  0:56 ` [PATCH 2/7] Makefile: ASCII-sort LIB_OBJS Denton Liu
2021-03-16  0:56 ` [PATCH 3/7] builtin.h: ASCII-sort list of functions Denton Liu
2021-03-17 17:51   ` Junio C Hamano
2021-03-16  0:56 ` [PATCH 4/7] test-tool.h: " Denton Liu
2021-03-17 17:54   ` Junio C Hamano
2021-03-16  0:56 ` [PATCH 5/7] Makefile: add 'check-sort' target Denton Liu
2021-03-16  6:37   ` Eric Sunshine
2021-03-17  9:50     ` Denton Liu
2021-03-17 12:47   ` Ævar Arnfjörð Bjarmason
2021-03-17 17:32     ` Jeff King
2021-03-17 17:42       ` Ævar Arnfjörð Bjarmason
2021-03-17 21:48       ` Eric Sunshine
2021-03-17 22:01         ` Jeff King
2021-03-17 18:01     ` Junio C Hamano
2021-03-17 18:16       ` Ævar Arnfjörð Bjarmason
2021-03-17 17:59   ` Junio C Hamano
2021-03-16  0:56 ` [PATCH 6/7] ci/run-static-analysis.sh: make check-builtins Denton Liu
2021-03-16  0:56 ` [PATCH 7/7] ci/run-static-analysis.sh: make check-sort Denton Liu
2021-03-17 11:01 ` [PATCH 0/7] Sort lists and add static-analysis Bagas Sanjaya
2021-03-17 18:05 ` Junio C Hamano

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=xmqqlfaly8n5.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=liu.denton@gmail.com \
    /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).