[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #48643] Irrelevant targets can confuse make on which pattern rule t
[bug #48643] Irrelevant targets can confuse make on which pattern rule to select.
Sun, 12 Dec 2021 20:18:23 -0500 (EST)
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Follow-up Comment #28, bug #48643 (project make):
Let us consider Example 7.
%.tsk: hello.x; $(info $@)
Here 'hello.x' has a target specific variable 'flags' with value 'true'.
Setting a target specific variable causes make to enter 'hello.x' to the
database as a prerequisite. Implicit search then finds 'hello.x' in the
database and knows that 'hello.x' is mentioned explicitly.
make-4.3 would at that point consider 'hello.'x as ought-to-exist.
master figures out that 'hello.x' is not a target and is not a prerequisite of
the current target 'hello.tsk'. master therefore decides that 'hello.x' does
not qualify as ought-to-exit. master proceeds and finds that 'hello.x' can be
built as an intermediate by rule '%.x:;'.
At that point make needs to init the file in the database from the
intermediate (cmds, deps, etc) and it incorrectly wipes out the target
specific variables of the file already stored in the database.
Previously this didn't not matter, because 4.3 treats 'hello.x' as
ought-to-exist and does not even attempt to built it as an intermediate.
Now this matters.
Please find a fix in the attached patch
and related tests in
Reply to this item at:
Message sent via Savannah