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