From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Ramsay Jones" <ramsay@ramsayjones.plus.com>,
"Denton Liu" <liu.denton@gmail.com>, "Jeff King" <peff@peff.net>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 3/3] Makefile: make the "hdr-check" target non-.PHONY
Date: Wed, 22 Sep 2021 00:55:15 +0200 [thread overview]
Message-ID: <patch-3.3-e2ad1700f9e-20210921T224944Z-avarab@gmail.com> (raw)
In-Reply-To: <cover-0.3-00000000000-20210921T224944Z-avarab@gmail.com>
For the same reason as the preceding commit (which made "sparse"
non-.PHONY), let's make the "hdr-check" target non-.PHONY.
We could also change this to do "-o $@" instead of creating an empty
file, but there would be no point, and it would just waste I/O and
disk space, we're not interested in the compilation output, just
whether or not we had an error.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
.gitignore | 1 +
Makefile | 7 ++++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/.gitignore b/.gitignore
index b02250a50c4..4579985e2f4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -220,6 +220,7 @@
/cscope*
/compile_commands.json
*.hcc
+*.hco
*.obj
*.lib
*.res
diff --git a/Makefile b/Makefile
index ce4063a031a..7980e69955a 100644
--- a/Makefile
+++ b/Makefile
@@ -2919,10 +2919,11 @@ HCC = $(HCO:hco=hcc)
echo '#include "$<"'; \
} >$@
-$(HCO): %.hco: %.hcc FORCE
- $(QUIET_HDR)$(CC) $(ALL_CFLAGS) -o /dev/null -c -xc $<
+$(HCO): %.hco: %.hcc
+ $(QUIET_HDR)$(CC) $(ALL_CFLAGS) -o /dev/null -c -xc $< && \
+ >$@
-.PHONY: hdr-check $(HCO)
+.PHONY: hdr-check
hdr-check: $(HCO)
.PHONY: style
--
2.33.0.1098.gf02a64c1a2d
next prev parent reply other threads:[~2021-09-21 22:55 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-21 22:55 [PATCH 0/3] Makefile: make "sparse" and "hdr-check" non-.PHONY Ævar Arnfjörð Bjarmason
2021-09-21 22:55 ` [PATCH 1/3] Makefile: make the "sparse" target non-.PHONY Ævar Arnfjörð Bjarmason
2021-09-22 2:24 ` Jeff King
2021-09-21 22:55 ` [PATCH 2/3] Makefile: do one append in %.hcc rule Ævar Arnfjörð Bjarmason
2021-09-21 22:55 ` Ævar Arnfjörð Bjarmason [this message]
2021-09-22 2:11 ` [PATCH 0/3] Makefile: make "sparse" and "hdr-check" non-.PHONY Jeff King
2021-09-22 16:58 ` Ramsay Jones
2021-09-22 17:53 ` Jeff King
2021-09-22 19:17 ` Ramsay Jones
2021-09-22 23:28 ` Junio C Hamano
2021-09-23 1:07 ` Ævar Arnfjörð Bjarmason
2021-09-23 1:23 ` Junio C Hamano
2021-09-23 2:17 ` Ævar Arnfjörð Bjarmason
2021-09-22 19:24 ` Junio C Hamano
2021-09-23 0:07 ` [PATCH v2] Makefile: make the "sparse" target non-.PHONY Ævar Arnfjörð Bjarmason
2021-09-23 16:24 ` Jeff King
2021-09-23 17:06 ` Ævar Arnfjörð Bjarmason
2021-09-23 17:17 ` Jeff King
2021-09-23 17:39 ` Junio C Hamano
2021-09-23 23:28 ` Ramsay Jones
2021-09-24 1:16 ` Ævar Arnfjörð Bjarmason
2021-09-24 16:38 ` Ramsay Jones
2021-09-24 1:30 ` Ævar Arnfjörð Bjarmason
2021-09-24 19:37 ` Junio C Hamano
2021-09-28 1:15 ` [PATCH v3] Makefile: add a non-.PHONY "sparse-incr" target Ævar Arnfjörð Bjarmason
2021-09-28 1:43 ` [PATCH v4] " Ævar Arnfjörð Bjarmason
2021-09-28 17:44 ` Junio C Hamano
2021-09-28 19:45 ` Æ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=patch-3.3-e2ad1700f9e-20210921T224944Z-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=liu.denton@gmail.com \
--cc=peff@peff.net \
--cc=ramsay@ramsayjones.plus.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.
Code repositories for project(s) associated with this public 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).