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

Re: [PATCH 1/4] Makefile: don't re-define PERL_DEFINES

From
Jeff King <peff@peff.net>
Date
May 6, 2021, 16:59 UTC
Message-ID
<YJQgVsKdb+gh5Sep@coredump.intra.peff.net>
In-Reply-To
<87sg30usm9.fsf@evledraar.gmail.com>
On Thu, May 06, 2021 at 11:04:34AM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 28 quoted lines
> > Actually, strictly speaking there was *no* bug because assigning
> > three items with := made sure the previous recursively expanded one
> > to be ineffective.  In other words, there was a valid reason to use
> > ":=" there in the original version.
> 
> Yes, there wasn't any bug with the the eventual value being
> incorrect. I.e. both of these are equivalent in a Makefile:
> 
>     FOO = abc
>     FOO := def
>     FOO += ghi
> 
> And:
> 
>     FOO = abc
>     FOO = def
>     FOO += ghi
> 
> Both will yield "def ghi". They're just different in a case like:
>     
>     X = Y
>     FOO = abc
>     FOO := $(X)
>     X = Z
>     FOO += ghi
> 
> Where using := will echo "Y ghi", and using = will echo "Z ghi". As a
> practical matter the distinction doesn't matter in this case.

Yeah, I don't think the ":=" was impacting the bug or no bug (not to mention that even if we duplicated those entries in the variable, it _still_ wouldn't be a bug, since the whole point of the variable is just to notice when the content changes).

Show 11 quoted lines
> > Now your patch removed the recursively expanded one that was
> > immediately invalidated, there no longer is a reason to use :=
> > there.  So "unrelated to the more narrow bugfix" is a rather lame
> > excuse to do only half a task.  If we remove that extra one (which
> > is a good thing), then we should correct := into = because the
> > original used := only because there was the unwanted extra one, no?
> 
> I don't see how removing the stray line changes the reason to use ":="
> or "=" there. I agree it should be removed, it's just unrelated to
> removing the stay line. Looking at 07d90eadb50 it's clear that it's just
> some copy/pasting error.

Yeah, I'd agree it is truly orthogonal. I don't mind seeing it cleaned up in addition (or am even actively happy to see it cleaned up :) ), but IMHO it would not need to hold up the series.

-Peff
Previous: Ævar Arnfjörð BjarmasonNext: Junio C Hamano
Message 9 of 26 in “Makefile/perl: correctly re-generate build/* + speed up under NO_GETTEXT=Y”
  1. 0/4 Makefile/perl: correctly re-generate build/* + speed up under NO_GETTEXT=YÆvar Arnfjörð Bjarmason, May 5, 2021
  2. 1/4 Makefile: don't re-define PERL_DEFINESÆvar Arnfjörð Bjarmason, May 5, 2021
  3. Jeff KingMay 5, 2021
  4. Junio C HamanoMay 6, 2021
  5. Jeff KingMay 6, 2021
  6. Ævar Arnfjörð BjarmasonMay 6, 2021
  7. Junio C HamanoMay 6, 2021
  8. Ævar Arnfjörð BjarmasonMay 6, 2021
  9. Jeff KingMay 6, 2021
  10. Junio C HamanoMay 7, 2021
  11. 3/4 Makefile: regenerate *.pm on NO_PERL_CPAN_FALLBACKS changeÆvar Arnfjörð Bjarmason, May 5, 2021
  12. 2/4 Makefile: regenerate perl/build/* if GIT-PERL-DEFINES changesÆvar Arnfjörð Bjarmason, May 5, 2021
  13. 4/4 perl: use mock i18n functions under NO_GETTEXT=YÆvar Arnfjörð Bjarmason, May 5, 2021
  14. 0/6 Makefile/perl: correctly re-generate build/* + speed up under NO_GETTEXT=YÆvar Arnfjörð Bjarmason, May 10, 2021
  15. 1/6 Makefile: regenerate perl/build/* if GIT-PERL-DEFINES changesÆvar Arnfjörð Bjarmason, May 10, 2021
  16. 2/6 Makefile: don't re-define PERL_DEFINESÆvar Arnfjörð Bjarmason, May 10, 2021
  17. 4/6 Makefile: split up the deceleration of PERL_DEFINESÆvar Arnfjörð Bjarmason, May 10, 2021
  18. 3/6 Makefile: make PERL_DEFINES recursively expandedÆvar Arnfjörð Bjarmason, May 10, 2021
  19. 6/6 perl: use mock i18n functions under NO_GETTEXT=YÆvar Arnfjörð Bjarmason, May 10, 2021
  20. 5/6 Makefile: regenerate *.pm on NO_PERL_CPAN_FALLBACKS changeÆvar Arnfjörð Bjarmason, May 10, 2021
  21. Junio C HamanoMay 10, 2021
  22. Ævar Arnfjörð BjarmasonMay 11, 2021
  23. Junio C HamanoMay 11, 2021
  24. Makefile: make PERL_DEFINES recursively expandedÆvar Arnfjörð Bjarmason, May 12, 2021
  25. Jeff KingMay 12, 2021
  26. Junio C HamanoMay 12, 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.