Makefiles: Use .DEFAULT to support arbitrary targets from sub directories.

Taking advantage of the .DEFAULT construct means that we won't need to
explicitly list targets such as "clean", etc. in each sub-Makefile.
This commit is contained in:
Carl Worth 2010-01-05 15:05:57 -08:00
parent 3f32fd8a1c
commit 341d49b061
2 changed files with 6 additions and 4 deletions

View file

@ -1,5 +1,5 @@
all: all:
$(MAKE) -C .. all $(MAKE) -C .. all
clean: .DEFAULT:
$(MAKE) -C .. clean $(MAKE) -C .. $@

View file

@ -1,5 +1,7 @@
# See Makfefile.local for the list of files to be compiled in this
# directory.
all: all:
$(MAKE) -C .. all $(MAKE) -C .. all
clean: .DEFAULT:
$(MAKE) -C .. clean $(MAKE) -C .. $@