On 06.02.2026 08:53, Bertrand Marquis wrote:
> Hi Jan,
> 
>> On 5 Feb 2026, at 12:59, Bertrand Marquis <[email protected]> wrote:
>>
>> Hi Jan,
>>
>>> On 5 Feb 2026, at 12:45, Jan Beulich <[email protected]> wrote:
>>>
>>> On 05.02.2026 12:33, Bertrand Marquis wrote:
>>>> GNU make 4.4+ exposes variable overrides in MAKEFLAGS after "--" (e.g.
>>>> O=/path, FOO=bar). The silent-mode check searches for "s" and can match
>>>> an override value, forcing silent output even without -s.
>>>>
>>>> Use MFLAGS for short options and filter out any long options before
>>>> searching for "s". This preserves -s detection while avoiding false
>>>> positives from overrides.
>>>>
>>>> Fixes: 4fdb4b71b152 ("xen/build: introduce if_changed and if_changed_rule")
>>>
>>> I don't think this is quite right: make 4.4 post-dates that commit by about
>>> 2.5 years.
>>
>> True, we can remove the fixes tag.
>>
>>>
>>>>
>>>> Signed-off-by: Bertrand Marquis <[email protected]>
>>>
>>> Nit: No blank lines between tags, please.
>>
>> Ack
>>
>>>
>>>> --- a/xen/Makefile
>>>> +++ b/xen/Makefile
>>>> @@ -113,10 +113,11 @@ else
>>>>    Q := @
>>>> endif
>>>>
>>>> -# If the user is running make -s (silent mode), suppress echoing of
>>>> -# commands
>>>> -
>>>> -ifneq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),)
>>>> +# If the user is running make -s (silent mode), suppress echoing of 
>>>> commands.
>>>> +# Use MFLAGS (short options only). MAKEFLAGS may include variable 
>>>> overrides
>>>
>>> Why "short options only"? It looks you mean to describe the macro here, not
>>> what's done in the ifeq(); at the very least it can be read both ways.
>>
>> True should be.
>> Filter short options from MFLAGS.
>>
>>>
>>>> +# after ā€œ--ā€ (GNU make greater than 4.4), which can contain an ā€œsā€ and 
>>>> falsely
>>>
>>> 4.4 and newer really, as 4.4 itself is included in the affected range. I'm
>>> not quite sure anyway whether the comment really needs to go this far. This
>>> kind of detail can be had from the commit message of this change, if needed.
>>>
>>> Happy to make adjustments while committing, yet I'm not sure whether you
>>> agree in all regards.
>>
>> Agree.
>>
>> If you agree and can do that on commit, i would just put:
>>
>> Filter short options from MFLAGS as MAKEFLAGS may include variable overrides.
> 
> Are you ok to give a reviewed-by and do the changes on commit or do you want 
> me to
> push a v2 with those fixes ?

I'm intending to make adjustments while committing. That will now be next week 
only,
though.

Jan

Reply via email to