1 .SILENT:
3 # All other examples
4 MFS = $(wildcard */Makefile)
5 DIRS = $(patsubst %/Makefile,%,$(MFS))
7 define make_in_dirs
8 for dir in $(1); do \
9 echo "=============== " $$dir " =================" ; \
10 $(MAKE) --no-print-directory $(MAKEFILE) -C $$dir $(2); \
11 done
12 endef
15 all:
16 $(call make_in_dirs, $(DIRS), )
18 .PHONY: test
19 test:
20 $(call make_in_dirs, $(DIRS), test)
22 .PHONY: cross
23 cross: all
25 .PHONY: clean
26 clean:
27 $(call make_in_dirs, $(DIRS), clean)