{"thread":{"id":"56567","subject":"[PATCH] Makefile: clean .depend dirs under COMPUTE_HEADER_DEPENDENCIES != yes","startedAt":"2021-09-22T20:17:16Z","lastAt":"2021-09-22T20:31:38Z","messageCount":3,"participants":["Ævar Arnfjörð Bjarmason","Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"436772","messageId":"patch-1.1-b8bde2ee7b7-20210922T201615Z-avarab@gmail.com","threadId":"56567","inReplyTo":null,"subject":"[PATCH] Makefile: clean .depend dirs under COMPUTE_HEADER_DEPENDENCIES != yes","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-09-22T20:17:06Z","receivedAt":"2021-09-22T20:17:16Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Fix a logic error in dfea575017d (Makefile: lazily compute header\ndependencies, 2010-01-26) where we'd make whether we cleaned the\n.depend dirs contingent on the currently configured\nCOMPUTE_HEADER_DEPENDENCIES value. Before this running e.g.:\n\n    make COMPUTE_HEADER_DEPENDENCIES=yes grep.o\n    make COMPUTE_HEADER_DEPENDENCIES=no clean\n\nWould leave behind the .depend directory, now it'll be removed.\n\nNormally we'd need to use another variable, but in this case there's\nno other uses of $(dep_dirs), as opposed to $(dep_args) which is used\nas an argument to $(CC). So just deleting this line makes everything\nwork correctly.\n\nSee http://lore.kernel.org/git/xmqqmto48ufz.fsf@gitster.g for a report\nabout this issue.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n Makefile | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex 9df565f27bb..bc987daf495 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2466,7 +2466,6 @@ dep_args = -MF $(dep_file) -MQ $@ -MMD -MP\n endif\n \n ifneq ($(COMPUTE_HEADER_DEPENDENCIES),yes)\n-dep_dirs =\n missing_dep_dirs =\n dep_args =\n endif\n-- \n2.33.0.1225.g9f062250122\n\n"},{"id":"436777","messageId":"YUuRWT8+Q4ls6BHu@coredump.intra.peff.net","threadId":"56567","inReplyTo":"patch-1.1-b8bde2ee7b7-20210922T201615Z-avarab@gmail.com","subject":"Re: [PATCH] Makefile: clean .depend dirs under COMPUTE_HEADER_DEPENDENCIES != yes","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2021-09-22T20:26:01Z","receivedAt":"2021-09-22T20:26:04Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Sep 22, 2021 at 10:17:06PM +0200, Ævar Arnfjörð Bjarmason wrote:\n\n> Fix a logic error in dfea575017d (Makefile: lazily compute header\n> dependencies, 2010-01-26) where we'd make whether we cleaned the\n> .depend dirs contingent on the currently configured\n> COMPUTE_HEADER_DEPENDENCIES value. Before this running e.g.:\n> \n>     make COMPUTE_HEADER_DEPENDENCIES=yes grep.o\n>     make COMPUTE_HEADER_DEPENDENCIES=no clean\n> \n> Would leave behind the .depend directory, now it'll be removed.\n> \n> Normally we'd need to use another variable, but in this case there's\n> no other uses of $(dep_dirs), as opposed to $(dep_args) which is used\n> as an argument to $(CC). So just deleting this line makes everything\n> work correctly.\n> \n> See http://lore.kernel.org/git/xmqqmto48ufz.fsf@gitster.g for a report\n> about this issue.\n\nThis makes perfect sense to me. Nicely explained, and the patch is\nsimpler than I'd have expected. :)\n\n-Peff\n"},{"id":"436778","messageId":"xmqqpmt05p3t.fsf@gitster.g","threadId":"56567","inReplyTo":"YUuRWT8+Q4ls6BHu@coredump.intra.peff.net","subject":"Re: [PATCH] Makefile: clean .depend dirs under COMPUTE_HEADER_DEPENDENCIES != yes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-09-22T20:31:34Z","receivedAt":"2021-09-22T20:31:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n>> See http://lore.kernel.org/git/xmqqmto48ufz.fsf@gitster.g for a report\n>> about this issue.\n>\n> This makes perfect sense to me. Nicely explained, and the patch is\n> simpler than I'd have expected. :)\n\nFor the record, I did *not* (and I right now do not) consider this\nbehaviour as an \"issue\" when I mentioned it.  It's like building\nwith a setting that requires some compat/ stuff and then cleaning\nwithout the setting, no?  i.e. cruft left behind is something the\nuser deserves to see.\n\nSince there is no other useful purpose for these .depend directories\nto exist, I do not mind if \"make clean\" removed them, though ;-)\n\nThanks.\n"}]}