Project

General

Profile

1 3697 aaronmk
##### Subdir forwarding
2
3
subdirs := $(wildcard */)
4
5
define subdirTargets
6
$(subdir): _always
7
	+$$(subMake)
8
9
$(subdir)%: _always
10
	+$$(subMake)
11
.PRECIOUS: $(subdir)% # let subdir's Makefile decide whether to delete on error
12
endef
13
$(foreach subdir,$(subdirs),$(eval $(subdirTargets)))
14
15
Makefile: ;
16
17
%: $(addsuffix %,$(subdirs)) _always ;