From 51e1c5bc128a61831d03e585a8903f4621fcf2d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 24 Dec 2015 16:51:18 +0100 Subject: Simplify cleaning in the test suite Not only simpler but also faster, especially on Windows. --- test/plugin_bootstrap.mk | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'test/plugin_bootstrap.mk') diff --git a/test/plugin_bootstrap.mk b/test/plugin_bootstrap.mk index 69c7e0a..ebfa6e7 100644 --- a/test/plugin_bootstrap.mk +++ b/test/plugin_bootstrap.mk @@ -2,18 +2,12 @@ BOOTSTRAP_CASES = app lib rel sp tab templates BOOTSTRAP_TARGETS = $(addprefix bootstrap-,$(BOOTSTRAP_CASES)) -BOOTSTRAP_CLEAN_TARGETS = $(addprefix clean-,$(BOOTSTRAP_TARGETS)) -.PHONY: bootstrap $(BOOTSTRAP_TARGETS) clean-bootstrap $(BOOTSTRAP_CLEAN_TARGETS) - -clean-bootstrap: $(BOOTSTRAP_CLEAN_TARGETS) - -$(BOOTSTRAP_CLEAN_TARGETS): - $t rm -rf $(APP_TO_CLEAN) +.PHONY: bootstrap $(BOOTSTRAP_TARGETS) bootstrap: $(BOOTSTRAP_TARGETS) -bootstrap-app: build clean-bootstrap-app +bootstrap-app: build clean $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -44,7 +38,7 @@ endif {module, $(APP)_sup} = code:load_file($(APP)_sup), \ halt()" -bootstrap-lib: build clean-bootstrap-lib +bootstrap-lib: build clean $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ @@ -69,7 +63,7 @@ endif {ok, []} = application:get_key($(APP), modules), \ halt()" -bootstrap-rel: build clean-bootstrap-rel +bootstrap-rel: build clean $i "Bootstrap a new release-enabled OTP application named $(APP)" $t mkdir $(APP)/ @@ -116,7 +110,7 @@ endif $i "Check that there's no erl_crash.dump file" $t test ! -f $(APP)/_rel/$(APP)_release/erl_crash.dump -bootstrap-sp: build clean-bootstrap-sp +bootstrap-sp: build clean $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -155,7 +149,7 @@ endif {module, $(APP)_sup} = code:load_file($(APP)_sup), \ halt()" -bootstrap-tab: build clean-bootstrap-tab +bootstrap-tab: build clean $i "Bootstrap a new OTP application named $(APP)" $t mkdir $(APP)/ @@ -177,7 +171,7 @@ endif $t test "`awk -F "\t" 'NF > 1' $(APP)/src/$(APP)_app.erl`" $t test "`awk -F "\t" 'NF > 1' $(APP)/src/$(APP)_sup.erl`" -bootstrap-templates: build clean-bootstrap-templates +bootstrap-templates: build clean $i "Bootstrap a new OTP library named $(APP)" $t mkdir $(APP)/ -- cgit v1.2.3