Dario Teixeira <[EMAIL PROTECTED]> writes:

> all: draft
> draft: PREFIX=before
> draft: SUFFIX=after
> draft: prefix_foobar_suffix.out
>
> $(PREFIX)_%_$(SUFFIX).out : $(PREFIX)_%_$(SUFFIX).in
>          generate $< $@
>
>
> Is this a bug, a feature, or am I missing something?
> Also, is there any other way to achieve what I want?

In GNU make 3.81beta3 or later you can defer until the second
expansion *in the prerequisite list*:

$(PREFIX)_%_$(SUFFIX).out : $$(PREFIX)_%_$$(SUFFIX).in
          generate $< $@

Note that wanting something like this in the target list doesn't
make any sense since the pattern in not know yet to rely on any
pattern-specific variables.


hth,
-boris



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

Reply via email to