> VARS=a.c b.c
>
> p: $(VARS)
> echo i am using $(VARS) to build
> echo $(VARS) > p
>
> VARS=x.c y.c
>
> Here $(VARS) in the prerequisite list is expanded when make reads that
> line of the file (to "a.c b.c") but the $(VARS) in the recipe on the
> next line is expanded to its value at the end of the makefile (here
> "x.c y.c")
... which is a good reason for using $^ in the rule (it'll be the full
list of prerequisites, so match what $(VARS) was when the rule was
parsed); another thing worth mentioning in your proposed documentation
revision.
Eddy.
_______________________________________________
Bug-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-make