Paul's interpretation appears to be the same as mine, and seems like the only straightforward interpretation of the OP's message. If that's the case (and Benjamin can tell us if it is not), I believe his message from 3:16 ET entirely explains the difference in behavior between test-% used in pattern rules and test-% used in pattern-specific variable assignments.
Kyle On Wed, Aug 2, 2017 at 4:16 PM, Sven C. Dack <sven.c.d...@sky.com> wrote: > I suggest you turn your attention towards him and ask him what he wants. > > My example does exactly what I say it does. It's just not your place to tell > me I'm wrong when you don't know what he wants his makefile to do and so far > haven't responded to him and only to me. > > Or am I missing something? We are all adults here, right? > > > > > On 02/08/17 20:55, Paul Smith wrote: >> >> On Wed, 2017-08-02 at 20:40 +0100, Sven C. Dack wrote: >>> >>> It's my understanding that we don't actually know what Benjamin wants to >>> do, because nobody has asked. So I don't see how this would make me >>> wrong. >>> >>> From his mail am I assuming he wants his Makefile to print "BAR" for a >>> target "test-stem" as well as "subdir/test-stem", which is what he will >>> get when he uses $(eval ...). >> >> Because he is using a pattern-specific variable assignment instead of >> just assigning the variable globally we can infer that he would like to >> have the "FOO = BAR" assignment only in the context of targets that >> match that pattern but not other targets. >> >> So for this makefile: >> >> test-%: FOO = BAR >> test-%: >> echo $(FOO) >> >> other: >> echo $(FOO) >> >> He would like to see: >> >> $ make test-foo >> echo BAR >> BAR >> >> $ make other >> echo >> >> If we change the pattern-specific variable to use $(eval FOO = BAR) he >> would see: >> >> $ make test-foo >> echo BAR >> BAR >> >> $ make other >> echo BAR >> BAR >> > > > _______________________________________________ > Bug-make mailing list > Bug-make@gnu.org > https://lists.gnu.org/mailman/listinfo/bug-make _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make