[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: list of targets to make
From: |
Paul D. Smith |
Subject: |
Re: list of targets to make |
Date: |
Thu, 27 Oct 2005 16:05:44 -0400 |
%% Torsten Mohr <address@hidden> writes:
tm> SRC := a.c b.c c.c d.c
tm> OBJ := a.o b.o c.o d.o
tm> %.o : %.c
tm> compiler -o $@ -c $<
tm> With the small example above, "make" calls the compiler for
tm> each target that is not up to date or does not exist.
tm> Is it possible to formulate a rule to hand _all_ the targets
tm> that are not up to date to the compiler?
Yes, but it's not necessarily pretty:
all: .allobjs
.allobjs: $(SRC)
compiler -c $?
@touch $@
--
-------------------------------------------------------------------------------
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