|
From: | Maxim Yegorushkin |
Subject: | Re: %.ext as prerequisite |
Date: | Fri, 14 Jul 2006 06:50:27 +0100 |
User-agent: | Thunderbird 1.5.0.4 (X11/20060614) |
Tobias contreras wrote:
Ive read the help make archive, "*Using the target of a *pattern* rule as a *prerequisite * <http://lists.gnu.org/archive/html/help-make/2004-06/msg00015.html>* " but no luckHow can I have %.o as a prerequisite for another target like: buildme: $(otherstuff) %.o command1 command2 %.o : %.c echo $<Do i need a var that contains all the *.o files like $(obj): %.o: %.c then use $(obj) as the prequisite, or is there a quicker way?thanks
You may like secondary expansion feature (make 3.81). http://www.gnu.org/software/make/manual/make.html.gz#Secondary-Expansion
.SECONDEXPANSION: main_OBJS := main.o try.o test.o lib_OBJS := lib.o api.o main lib: $$(address@hidden)
[Prev in Thread] | Current Thread | [Next in Thread] |