git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 1/3] Makefile: mark "check" target as .PHONY

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jun 29, 2021, 19:03 UTC
Message-ID
<patch-1.3-27c94247f8-20210629T190137Z-avarab@gmail.com>
In-Reply-To
<cover-0.3-0000000000-20210629T190137Z-avarab@gmail.com>

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.

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>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index c3565fc0f8..7f984bce50 100644
--- a/Makefile
+++ b/Makefile
@@ -2910,6 +2910,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.32.0.615.g90fb4d7369
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 12 of 15 in “Makefile: misc trivial fixes”
  1. 0/3 Makefile: misc trivial fixesÆvar Arnfjörð Bjarmason, Jun 17, 2021
  2. 1/3 Makefile: mark "check" target as .PHONYÆvar Arnfjörð Bjarmason, Jun 17, 2021
  3. Felipe ContrerasJun 17, 2021
  4. 3/3 Makefile: remove an out-of-date commentÆvar Arnfjörð Bjarmason, Jun 17, 2021
  5. Felipe ContrerasJun 17, 2021
  6. 2/3 Makefile: stop hardcoding {command,config}-list.hÆvar Arnfjörð Bjarmason, Jun 17, 2021
  7. Felipe ContrerasJun 17, 2021
  8. Ævar Arnfjörð BjarmasonJun 17, 2021
  9. Felipe ContrerasJun 17, 2021
  10. Ævar Arnfjörð BjarmasonJun 18, 2021
  11. 0/3 Makefile: misc trivial fixesÆvar Arnfjörð Bjarmason, Jun 29, 2021
  12. 1/3 Makefile: mark "check" target as .PHONYÆvar Arnfjörð Bjarmason, Jun 29, 2021
  13. 2/3 Makefile: stop hardcoding {command,config}-list.hÆvar Arnfjörð Bjarmason, Jun 29, 2021
  14. 3/3 Makefile: remove an out-of-date commentÆvar Arnfjörð Bjarmason, Jun 29, 2021
  15. Felipe ContrerasJun 29, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.