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

I wonder if &: makes sense as a pattern rule since regular pattern rules
already support multiple targets.  

Regardless, I have also tested your implicit test without the & and get the
same results:

$ cat ../makefile4
.SECONDEXPANSION:

all: world.z hello.x

%.x %.z: $$(info in prereqs @ = $$@, @< = $$(@<), @^ = $$(@^))
        $(info in recipe @ = $@, @< = $(@<), @^ = $(@^))

$ ./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.

I also tried hello.z and $(@<) is only correct inside the recipe as well.
$ ./make -f ../makefile4 hello.z
in prereqs @ = hello.z, @< = hello.z, @^ = hello.z
in recipe @ = hello.z, @< = hello.x, @^ = hello.x hello.z
make: 'hello.z' is up to date.

The problem appears to be due to second expansion for pattern rules happening
quite some time before also_make is set in pattern_search().

    _______________________________________________________

Reply to this item at:

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

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


Reply via email to