Martin d'Anjou <[EMAIL PROTECTED]> writes:

> Hi,
>
> I do not understand why make says "No rule to make target" with this
> makefile when the target is t_two:
>
> $(shell mkdir -p src)
> $(shell touch src/file1.c)
> $(shell touch src/file2.c)
> var_one=file1
> var_two=file1 file2
>
> t_%: $(patsubst %,src/%.o,$$(var_$$*))

This should be

t_%: $$(patsubst %,src/%.o,$$(var_$$*))

because otherwise patsubst is executed when the rule is read instead
of when it is matched.


> This is with 3.81beta3.
>
> With 3.81beta4, in both cases make does not build the targets. Should make
> be able to build these targets?

Note that with 3.81beta4 (and, eventually, with 3.81) you will need to say

.SECONDEXPANSION:

in order to enable the second expansion.

hth,
-boris



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to