%% Rolf Magnus <[EMAIL PROTECTED]> writes:
rm> Steven Woody wrote:
>> hi,
>>
>> if i have many targets which all depend on some common files, which is a
>> easy way to write the rule? i don't like ugly code as below,
>>
>> T1: a b c
>> T2: a b c
>> ...
>> Tn: a b c
rm> I guess you're talking about make?
rm> Just put them in a variable:
rm> COMMON = a b c
rm> T1: $(COMMON)
rm> T2: $(COMMON)
rm> ...
rm> Tn: $(COMMON)
You can do it with _MUCH_ less typing:
TARGETS = T1 T2 ... Tn
$(TARGETS): a b c
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> 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
_______________________________________________
help-gnu-utils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gnu-utils