Re: [PATCH v4 01/36] Makefile: mark "check" target as .PHONY
- From
Emily Shaffer <emilyshaffer@google.com>
- Date
- Aug 20, 2021, 00:04 UTC
- Message-ID
- <YR7xftXDd5fJNgu1@google.com>
- In-Reply-To
- <patch-v4-01.36-81fe1ed90d5-20210803T191505Z-avarab@gmail.com>
On Tue, Aug 03, 2021 at 09:38:27PM +0200, Ævar Arnfjörð Bjarmason wrote:
> > Fix a bug in 44c9e8594e (Fix up header file dependencies and add > sparse checking rules, 2005-07-03), we never marked the phony "check" > target as such.
A simple enough change, and it gave me an excuse to go and look up what .PHONY actually does. Thanks ;)
Show 12 quoted lines
> > Perhaps we should just remove it, since as of a combination of > 912f9980d2 (Makefile: help people who run 'make check' by mistake, > 2008-11-11) 0bcd9ae85d (sparse: Fix errors due to missing > target-specific variables, 2011-04-21) we've been suggesting the user > run "make sparse" directly. > > But under that mode it still does something, as well as directing the > user to run "make test" under non-sparse. So let's punt that and > narrowly fix the PHONY bug. > > Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Reviewed-by: Emily Shaffer <emilyshaffer@google.com>
Show 19 quoted lines
> --- > Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Makefile b/Makefile > index c6f6246bf63..2ff038069e8 100644 > --- a/Makefile > +++ b/Makefile > @@ -2931,6 +2931,7 @@ hdr-check: $(HCO) > style: > git clang-format --style file --diff --extensions c,h > > +.PHONY: check > check: config-list.h command-list.h > @if sparse; \ > then \ > -- > 2.33.0.rc0.595.ge31e012651d >