[Top][All Lists]

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

[bug #63125] Automatic variables in Secondary Expansion don't work as do

From: Riccardo P. Bestetti
Subject: [bug #63125] Automatic variables in Secondary Expansion don't work as documented
Date: Wed, 28 Sep 2022 20:10:21 -0400 (EDT)

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:


Message sent via Savannah

reply via email to

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