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

Re: [PATCH v2 3/4] Makefiles: change search through $(MAKEFLAGS) for GNU make 4.4

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 30, 2022, 04:28 UTC
Message-ID
<xmqqk03dyskc.fsf@gitster.g>
In-Reply-To
<patch-v2-3.4-6db7dd74e52-20221129T140159Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
Show 8 quoted lines
> Since GNU make 4.4 the semantics of the $(MAKEFLAGS) variable has
> changed in a backward-incompatible way, as its "NEWS" file notes:
>
>   Previously only simple (one-letter) options were added to the MAKEFLAGS
>   variable that was visible while parsing makefiles.  Now, all options are
>   available in MAKEFLAGS.  If you want to check MAKEFLAGS for a one-letter
>   option, expanding "$(firstword -$(MAKEFLAGS))" is a reliable way to return
>   the set of one-letter options which can be examined via findstring, etc.
Wow.  That's a bold move for GNU make folks to make.
Show 8 quoted lines
> This upstream change meant that e.g.:
>
> 	make man
>
> Would become very noisy, because in shared.mak we rely on extracting
> "s" from the $(MAKEFLAGS), which now contains long options like
> "--jobserver-auth=fifo:<path>", which we'll conflate with the "-s"
> option.

Do our uses of $(MAKEFLAGS) for the $(PRINT_DIR) and the $(QUIET) macros that do not affect correctness? $(QUIET) thing I suspect will merely be annoyance, but $(PRINT_DIR) might affect correctness depending on how $(MAKE) output is being used.

I have to wonder how many projects they have broken with this change ;-).

In any case, this seems like a good thing to do. I am not sure if this is so urgent to add in the -rc period, or can safely wait post release.

Thanks.
Previous: Ævar Arnfjörð BjarmasonNext: Paul Smith
Message 8 of 23 in “Avoid multiple patterns when recipes generate one file”
  1. 0/1 Avoid multiple patterns when recipes generate one filePaul Smith, Nov 27, 2022
  2. 1/1 Avoid multiple patterns when recipes generate one filePaul Smith, Nov 27, 2022
  3. Ævar Arnfjörð BjarmasonNov 28, 2022
  4. Paul SmithNov 28, 2022
  5. Ævar Arnfjörð BjarmasonNov 28, 2022
  6. 0/4 Makefiles: GNU make 4.4 fixesÆvar Arnfjörð Bjarmason, Nov 29, 2022
  7. 3/4 Makefiles: change search through $(MAKEFLAGS) for GNU make 4.4Ævar Arnfjörð Bjarmason, Nov 29, 2022
  8. Junio C HamanoNov 30, 2022
  9. Paul SmithNov 30, 2022
  10. Ævar Arnfjörð BjarmasonDec 1, 2022
  11. 1/4 Documentation/Makefile: de-duplicate *.[157] dependency listÆvar Arnfjörð Bjarmason, Nov 29, 2022
  12. Junio C HamanoNov 30, 2022
  13. 2/4 Documentation/Makefile: avoid multiple patterns when generating one fileÆvar Arnfjörð Bjarmason, Nov 29, 2022
  14. Junio C HamanoNov 30, 2022
  15. 4/4 Documentation/Makefile: narrow wildcard rules to our known filesÆvar Arnfjörð Bjarmason, Nov 29, 2022
  16. Junio C HamanoNov 30, 2022
  17. 0/1 Makefiles: GNU make 4.4 fixesÆvar Arnfjörð Bjarmason, Nov 30, 2022
  18. 1/1 Makefiles: change search through $(MAKEFLAGS) for GNU make 4.4Ævar Arnfjörð Bjarmason, Nov 30, 2022
  19. Paul SmithNov 30, 2022
  20. Junio C HamanoNov 30, 2022
  21. Johannes SchindelinDec 6, 2022
  22. Ævar Arnfjörð BjarmasonDec 6, 2022
  23. Junio C HamanoDec 6, 2022

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.