Project

General

Profile

1 410 aaronmk
# Make
2 623 aaronmk
subMake = $(MAKE) $(@F) --directory=$(@D) --makefile=../input.Makefile
3
# input.Makefile path is relative to subdir
4 410 aaronmk
5
#####
6
7
all:
8
9
.SUFFIXES:
10
11
_always:
12
.PHONY: _always
13
14 623 aaronmk
subdirs := $(wildcard */)
15
16 410 aaronmk
define subdirTargets
17
$(subdir): _always
18
	+$$(subMake)
19
20
$(subdir)%: _always
21
	+$$(subMake)
22
endef
23 623 aaronmk
$(foreach subdir,$(subdirs),$(eval $(subdirTargets)))
24 410 aaronmk
25 416 aaronmk
Makefile: ;
26
27 623 aaronmk
%: $(addsuffix %,$(subdirs)) _always ;