[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Target-specific variables in implicit rules
From: |
Boris Kolpackov |
Subject: |
Re: Target-specific variables in implicit rules |
Date: |
Thu, 20 Oct 2005 18:30:14 +0000 (UTC) |
User-agent: |
nn/6.6.5+RFC1522 |
Dario Teixeira <address@hidden> 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