bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #66073] $? is set incorrectly in the case of grouped targets.


From: Masahiro Yamada
Subject: [bug #66073] $? is set incorrectly in the case of grouped targets.
Date: Sat, 10 Aug 2024 00:41:59 -0400 (EDT)

Follow-up Comment #2, bug #66073 (group make):

I am interested in this topic because this affects Linux kernel build system
(Kbuild).

If foo.q does not appear in $?, I do not know how to make the combination of
if_changed and the grouped target working.

foo.p foo.q &: foo.r FORCE
        $(call if_changed,gen_both)

This code works only after GNU Make commit
fabb03eac412b5ea19f1a97be31dc8c6fa7fc047.

But, a pattern rule never works.

%.p %.q : %.r FORCE
        $(call if_changed,gen_both)

This is because $? is used to determine if the build rule should be really
executed.

This code:
https://github.com/torvalds/linux/blob/v6.11-rc2/scripts/Kbuild.include#L188

It is true that FORCE is contained in $?, but it is always filtered out.

When foo.q is missing or outdated and GNU Make is building foo.p,
if_changed skips the recipe.

I do not come up with a solution on Kbuild side. 

Paul, what do you think?
I believe you know what I am saying because you contributed this:
https://github.com/torvalds/linux/commit/4f1933620f57145212cdbb1ac6ce099eeeb21c5a
Oh, It was 18 years ago...


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66073>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]