1234567891011121314151617181920212223242526272829303132333435 |
- include config.mk
- SUBMAKES := $(wildcard ./src/*/Makefile)
- SUBDIRS := $(foreach _,${SUBMAKES},$(call dir,${_}))
- TARGETS := $(foreach _,${SUBDIRS},${_}$(call notdir,$(abspath ${_})))
- SUBMAKE_TARGETS := uninstall clean \
- test_compilers \
- clang-tidy-check clang-format-check check-all
- .PHONY: all
- all: ${TARGETS}
- define submake
- .PHONY: ${1}
- ${1}: ${2}
- { : \
- ; set -ue \
- ; for d in $${SUBDIRS} \
- ; do $$(MAKE) -C "$$$${d}" ${1} \
- ; done \
- }
- endef
- ${TARGETS}:
- ${MAKE} -C $(call dir,${@})
- $(eval $(call submake,install,${TARGETS}))
- $(foreach _,${SUBMAKE_TARGETS},$(eval $(call submake,${_},)))
- .PHONY: metalang
- metalang:
- ${MAKE} -C include ${@}
|