aboutsummaryrefslogtreecommitdiffstats
path: root/tools/Rules.mk
diff options
context:
space:
mode:
Diffstat (limited to 'tools/Rules.mk')
-rw-r--r--tools/Rules.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/Rules.mk b/tools/Rules.mk
index ceb616981e..58f6fbf487 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -49,3 +49,13 @@ $(eval $(check-y))
%.o: %.cc
$(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
+.PHONY: subdirs-all subdirs-clean subdirs-install
+.NOTPARALLEL: subdirs-all subdirs-clean subdirs-install
+subdirs-all subdirs-clean subdirs-install:
+ @set -e; for subdir in $(SUBDIRS) $(SUBDIRS-y); do \
+ $(MAKE) subdir-$(patsubst subdirs-%,%,$@)-$$subdir; \
+ done
+
+subdir-all-% subdir-clean-% subdir-install-%:
+ $(MAKE) -C $* $(patsubst subdir-%-$*,%,$@)
+