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 luck
How 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: $$([EMAIL PROTECTED])
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make