fixeria submitted this change.
Makefile: add global per-project clean target
Change-Id: I434ecbe3f3dd25ea770d8f2d7adfa62c67dc0c1d
---
M Makefile
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index c64e130..7a9ddb8 100644
--- a/Makefile
+++ b/Makefile
@@ -114,6 +114,12 @@
@git clean -fx "$(1)"
endef
+define DIR_clean_template
+.PHONY: $(1)/clean
+$(1)/clean:
+ $(MAKE) -C $(BUILDDIR)/$(1) clean
+endef
+
define DIR_all_template
$(1): $(1)/all
.PHONY: $(1)/all
@@ -126,6 +132,7 @@
$(eval $(call DIR_Makefile_template,$(dir))) \
$(eval $(call DIR_compile_template,$(dir))) \
$(eval $(call DIR_clean_old_template,$(dir))) \
+ $(eval $(call DIR_clean_template,$(dir))) \
$(eval $(call DIR_all_template,$(dir))) \
)
To view, visit change 40409. To unsubscribe, or for help writing mail filters, visit settings.