[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: building templates
From: |
Paul D. Smith |
Subject: |
Re: building templates |
Date: |
Thu, 10 Apr 2003 07:21:49 -0400 |
%% Martin Kleinschmidt <address@hidden> writes:
mk> BUT: Replacing warning bey eval:
It's possible you're running into a bug in eval; there are a couple of
them in this initial release of eval.
>> ZOBJS = zaaa.o zbbb.o
>>
>> $(patsubst %.o,%.f,$(ZOBJS)) : %.f : %.F
>> $(CC) -E -P $(ZWHICH) $< -o $@
mk> I don't understand this.
Look up static pattern rules in the GNU make manual.
mk> That's TWO ":" in one line?
Yes. That's what makes it a static pattern rule.
mk> And it lacks the prefix change from z* to x*
Oops, missed that. Well, add that in; the pattern here can be the same
as in a regular pattern rule.
mk> I tried to add the dependence:
mk> $(foreach dummy, $(ZOBJS), $(dummy): $(patsubst z%.o, x%.F, $(dummy)))
mk> Result:
mk> Makefile:96: *** multiple target patterns. Stop.
mk> wrapping a $(warning ) around it makes clear why:
mk> Makefile:96: zaaa.o: xaaa.F zbbb.o: xbbb.F
mk> Any ideas?
You'd have to use eval again here.
But my idea is still as above: use static pattern rules.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist