From 6c459dc7468b3f110401d76ef72df9dec3253a9c Mon Sep 17 00:00:00 2001 From: Our Air Quality Date: Sat, 6 Apr 2019 13:09:14 +1100 Subject: [PATCH] examples: add a clean-examples target, to clean all of the examples. --- examples/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/Makefile b/examples/Makefile index 2f816e5..f19c189 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -2,6 +2,7 @@ EXAMPLES = $(shell find $(dir $(lastword $(MAKEFILE_LIST))) -mindepth 2 -name Ma # Generate some dummy .dummybuild/.dummyrebuild target files EXAMPLES_BUILD = $(patsubst %,%.dummybuild,$(EXAMPLES)) EXAMPLES_REBUILD = $(patsubst %,%.dummyrebuild,$(EXAMPLES)) +EXAMPLES_CLEAN = $(patsubst %,%.dummyclean,$(EXAMPLES)) warning: @echo "******************************************************" @@ -21,12 +22,17 @@ build-examples: $(EXAMPLES_BUILD) rebuild-examples: $(EXAMPLES_REBUILD) +clean-examples: $(EXAMPLES_CLEAN) + %.dummybuild: $(MAKE) -C $(dir $@) %.dummyrebuild: $(MAKE) -C $(dir $@) rebuild -.PHONY: warning rebuild-examples build-examples +%.dummyclean: + $(MAKE) -C $(dir $@) clean + +.PHONY: warning rebuild-examples build-examples clean-examples .NOTPARALLEL: .ONESHELL: