diff options
Diffstat (limited to 'git/makefile')
-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 |