From 97ab577a89eae84f26c60673b9ea14aeacd24bc2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 5 Dec 2011 14:00:09 +0200 Subject: Add clean target to root makefile --- git/makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/git/makefile b/git/makefile index 1d07993..3c2430a 100644 --- a/git/makefile +++ b/git/makefile @@ -7,10 +7,11 @@ # db := oracle pgsql sqlite mysql -.PHONY: all test $(db) $(addsuffix -test,$(db)) +.PHONY: all test clean $(db) $(addsuffix -test,$(db)) $(addsuffix -clean,$(db)) all: $(db) test: $(addsuffix -test,$(db)) +test: $(addsuffix -clean,$(db)) define set_dirs edir := $$(wildcard examples-$1-default) @@ -43,6 +44,15 @@ $1-test: @$$(MAKE) -C $$(tdir) test endef +define clean_rule +$1-clean: edir := $$(edir) +$1-clean: tdir := $$(tdir) + +$1-clean: + @$$(MAKE) -C $$(edir) clean + @$$(MAKE) -C $$(tdir) clean +endef + # Note: empty line at the end is important. # # @@ -50,6 +60,7 @@ define rules $(call set_dirs,$1) $(call build_rule,$1) $(call test_rule,$1) +$(call clean_rule,$1) endef -- cgit v1.1