Makefile: clean .depend dirs under COMPUTE_HEADER_DEPENDENCIES != yes
PATCH 1/1 Makefile: clean .depend dirs under COMPUTE_HEADER_DEPENDENCIES != yes
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/[email protected] for a report about this issue.
--- Makefile | 1 - 1 file changed, 1 deletion(-)
Makefile +0 -1
@@ -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
Signature · 1 line
2.33.0.1225.g9f062250122
Quoted 10 lines · Ævar Arnfjörð Bjarmason
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 configuredCOMPUTE_HEADER_DEPENDENCIESvalue. Before this running e.g.:make COMPUTE_HEADER_DEPENDENCIES=yes grep.o
make COMPUTE_HEADER_DEPENDENCIES=no cleanWould leave behind the .depend directory, now it'll be removed.
Quoted 7 lines
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/[email protected] for a report about this issue.
This makes perfect sense to me. Nicely explained, and the patch is simpler than I'd have expected. :)
-Peff
Quoted 5 lines · Jeff King
Quoted 2 lines
See http://lore.kernel.org/git/[email protected] for a report about this issue.
This makes perfect sense to me. Nicely explained, and the patch is simpler than I'd have expected. :)
For the record, I did *not* (and I right now do not) consider this behaviour as an "issue" when I mentioned it. It's like building with a setting that requires some compat/ stuff and then cleaning without the setting, no? i.e. cruft left behind is something the user deserves to see.
Since there is no other useful purpose for these .depend directories to exist, I do not mind if "make clean" removed them, though ;-)
Thanks.