#168051 - sgeos - Wed Apr 08, 2009 10:57 am
Given the following Makefile:
I get the following output:
The problem is that when everything is said and done, lib.a does not exist in rng/
This is not the case if I explicitly make rng/lib.a. Why is make doing this?
Code: |
LIBS = librng.a
.PHONY : all all : $(LIBS) Makefile %/lib.a : force_look ls $*/*.a cd $*; $(MAKE) $(MFLAGS) lib.a lib%.a : %/lib.a cp $< $@ ls $*/*.a .PHONY : force_look force_look : true |
I get the following output:
Code: |
$ make
true ls rng/*.a rng/librng.a cd rng; make lib.a make[1]: Entering directory `/home/USER/cpp/maze/lib/rng' rm -f lib.a ar cq lib.a RNG.o make[1]: Leaving directory `/home/USER/cpp/maze/lib/rng' cp rng/lib.a librng.a ls rng/*.a rng/lib.a rng/librng.a |
The problem is that when everything is said and done, lib.a does not exist in rng/
Code: |
$ ls rng/*.a
rng/librng.a |
This is not the case if I explicitly make rng/lib.a. Why is make doing this?