diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-12-05 14:00:09 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-12-05 14:00:09 +0200 |
commit | 97ab577a89eae84f26c60673b9ea14aeacd24bc2 (patch) | |
tree | ac236cd42496bcc4b68388a8158142415b850510 /git | |
parent | 5a76a49019ecf77c9e56a1b14183a25912fa3637 (diff) |
Add clean target to root makefile
Diffstat (limited to 'git')
-rw-r--r-- | git/makefile | 13 |
1 files changed, 12 insertions, 1 deletions
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 |