[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (Gnu Make) How to specify *.o depends on common.h?
From: |
Paul D. Smith |
Subject: |
Re: (Gnu Make) How to specify *.o depends on common.h? |
Date: |
19 Jul 2005 13:37:46 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
%% Steven Woody <anti-spam.narkewoody@gmail.com.dont-post-to> writes:
sw> "Paul D. Smith" <psmith@gnu.org> writes:
>> %% Steven Woody <anti-spam.narkewoody@gmail.com.dont-post-to> writes:
sw> in gnu make, can i specify a dependency rule which conducts the
sw> rebuilding of all .o files as long as a common .h file change?
sw> thanks.
>> foo.o bar.o baz.o boz.o biz.o : common.h
sw> i think this is not so ideal. actually, i've already defined
sw> PROGRAM = foo bar baz boz biz
sw> somewhere, so i thing only suffixing an .o to all above programs
sw> is not worthy of such re-typing. some kind of reusing of
sw> $(PROGRAM) is desirable.
Well, if you want an answer to a specific question you have to ask THAT
question, not some other question... we're l33t, but we ain't psychic :-).
If you have a variable PROGRAM containing the names of things without
the .o and you want to avoid retyping, you can do this:
$(PROGRAM:%=%.o): common.h
--
-------------------------------------------------------------------------------
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