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.