[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Common Dependences
From: |
Paul D. Smith |
Subject: |
Re: Common Dependences |
Date: |
17 Jul 2005 21:32:05 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
%% Rolf Magnus <ramagnus@t-online.de> 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 <psmith@gnu.org> 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