bug-make
[Top][All Lists]
Advanced

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

[bug #60077] Deterministic $@ for grouped targets patch


From: Dmitry Goncharov
Subject: [bug #60077] Deterministic $@ for grouped targets patch
Date: Wed, 9 Jun 2021 16:37:24 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36

Follow-up Comment #5, bug #60077 (project make):

Todd, thank for your contribution.

Your patch is missing second expansion tests.

i observe the following misbehavior.


$ cat makefile
.SECONDEXPANSION:

hello world&: $$(info in prereqs @ = $$@, @< = $$(@<), @^ = $$(@^))
        $(info in recipe @ = $@, @< = $(@<), @^ = $(@^))
$ ~/src/gmake/make/l64/make -f makefile hello
in prereqs @ = world, @< = hello, @^ = hello world
in prereqs @ = hello, @< = hello, @^ = hello world
in recipe @ = hello, @< = hello, @^ = hello world
make: 'hello' is up to date.
$
$
$ cat makefile4
.SECONDEXPANSION:

all: world.z hello.x

%.x %.z&: $$(info in prereqs @ = $$@, @< = $$(@<), @^ = $$(@^))
        $(info in recipe @ = $@, @< = $(@<), @^ = $(@^))
$ ~/src/gmake/make/l64/make -f makefile4 hello.x
in prereqs @ = hello.x, @< = hello.x, @^ = hello.x
in recipe @ = hello.x, @< = hello.x, @^ = hello.x hello.z
make: 'hello.x' is up to date.


Explicit rules are good.
However, you can see during the 2nd expansion of implicit rules @^ expands to
the 1st target, rather than the whole group.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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