Follow-up Comment #2, bug #63125 (project make):

[comment #1 comment #1:]
> Also, recall that $^ shows a set of prerequisites that does NOT include
duplicates.  If you want to see the full set of prerequisites including
duplicates, you need to use $+.

So sorry - my testing, and the output that is shown in my original submission,
indeed uses $+ and not $^ for both make 3.81 and make 4.3. I just copied over
the wrong Makefile when opening the bug report. I re-run the correct Makefile
($+) and I confirm the outputs are correctly reported.

> 
> However even if you use $+ you'll get a different answer because indeed $$<
is not set here.  There seems to be some dissension between the docs and the
code, which we should investigate.
> 
> In general it can be tricky to use automatic variables that contain
prerequisites, in the list of prerequisites, because there's a catch-22 there.
 Resolving it would require that each prerequisite be parsed and all automatic
variables be updated before any subsequent secondary expansion is done and I'm
not sure that's how it works.

Well, it did work that way on Make 3.81. (At least, apparently, with $$< -
that, being limited to representing the first prerequisite, doesn't create any
infinite recursion or paradox if NOT used as the first prerequisite itself.)

> 
> FYI I checked and the behavior you see in 4.3 was the same as in 3.82.
I can also confirm that.


    _______________________________________________________

Reply to this item at:

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

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


Reply via email to