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

[PATCH] Makefile: clean .depend dirs under COMPUTE_HEADER_DEPENDENCIES != yes

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 22, 2021, 20:17 UTC
Message-ID
<patch-1.1-b8bde2ee7b7-20210922T201615Z-avarab@gmail.com>

Fix a logic error in dfea575017d (Makefile: lazily compute header dependencies, 2010-01-26) where we'd make whether we cleaned the .depend dirs contingent on the currently configured COMPUTE_HEADER_DEPENDENCIES value. Before this running e.g.:

    make COMPUTE_HEADER_DEPENDENCIES=yes grep.o
    make COMPUTE_HEADER_DEPENDENCIES=no clean
Would leave behind the .depend directory, now it'll be removed.

Normally we'd need to use another variable, but in this case there's no other uses of $(dep_dirs), as opposed to $(dep_args) which is used as an argument to $(CC). So just deleting this line makes everything work correctly.

See http://lore.kernel.org/git/xmqqmto48ufz.fsf@gitster.g for a report about this issue.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 Makefile | 1 -
 1 file changed, 1 deletion(-)
diff --git a/Makefile b/Makefile
index 9df565f27bb..bc987daf495 100644
--- a/Makefile
+++ b/Makefile
@@ -2466,7 +2466,6 @@ dep_args = -MF $(dep_file) -MQ $@ -MMD -MP
 endif
 
 ifneq ($(COMPUTE_HEADER_DEPENDENCIES),yes)
-dep_dirs =
 missing_dep_dirs =
 dep_args =
 endif
-- 
2.33.0.1225.g9f062250122
Next: Jeff King
Message 1 of 3 in “Makefile: clean .depend dirs under COMPUTE_HEADER_DEPENDENCIES != yes”
  1. Makefile: clean .depend dirs under COMPUTE_HEADER_DEPENDENCIES != yesÆvar Arnfjörð Bjarmason, Sep 22, 2021
  2. Jeff KingSep 22, 2021
  3. Junio C HamanoSep 22, 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.