bug-make
[Top][All Lists]
Advanced

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

[bug #48643] Irrelevant targets can confuse make on which pattern rule t


From: Dmitry Goncharov
Subject: [bug #48643] Irrelevant targets can confuse make on which pattern rule to select.
Date: Fri, 10 Dec 2021 23:17:00 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #27, bug #48643 (project make):

i figured this change is still incomplete. There is a case when make marks
this almost-ought-to-exist prerequisite as intermediate incorrectly.

Let us say hello.tsk exists and hello.x is missing and consider

Example 6.

++++
all: hello.tsk
%.tsk: %.x; touch hello.tsk
%.x: ;
unrelated: hello.x
----

make-4.3 does the following
1. Tries rule '%.tsk: %.x' for 'hello.tsk'.
2. Tries prerequisite 'hello.x'.
3. Notices that 'hello.x' is mentioned explicitly on an unrelated rule.
4. Considers 'hello.x' ought-to-exist.
5. Chooses rule '%.tsk: %.x' for 'hello.tsk'. Notice, make-4.3 has not tried
'hello.x' as an intermediate and thus 'hello.x' does not have intermediate
flag set.
6. Remakes 'hello.tsk', because 'hello.x' is not intermediate.

master does the following
1. Tries rule '%.tsk: %.x' for 'hello.tsk'.
2. Tries prerequisite 'hello.x'.
3. Notices that 'hello.x' is mentioned explicitly on an unrelated rule.
4. Considers that 'hello.x' does not qualify as ought-to-exist.
5. Tries 'hello.x' as an intermediate.
6. Chooses rule '%.x' for 'hello.x'.
7. Sets intermediate flag for 'hello.x'.
8. Chooses rule '%.tsk: %.x' for 'hello.tsk'.
9. Fails to remake 'hello.tsk', because 'hello.x' is intermediate.

Please find a fix in sv48643_exp_preqreq_is_not_interm.diff and tests in
sv48643_exp_preqreq_is_not_interm_tests.diff.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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