From 606d0b3ed91d0ffc7a13071174bf44736264534a Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Mon, 26 Sep 2016 00:21:16 -0400 Subject: [PATCH] Makefile: Make sure BIN directory exist when running any test This commit allows to run any test directly after checking out the source code. --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9d4894e..dc932dd 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,6 @@ base: Dockerfile $(DOCKER) build -t $(ORG)/base . base.test: base - mkdir -p $(BIN) $(DOCKER) run --rm dockcross/base > $(BIN)/dockcross-base && chmod +x $(BIN)/dockcross-base # @@ -109,4 +108,12 @@ $(addsuffix .test,$(STANDARD_IMAGES)): $$(basename $$@) $(DOCKER) run --rm dockcross/$(basename $@) > $(BIN)/dockcross-$(basename $@) && chmod +x $(BIN)/dockcross-$(basename $@) $(BIN)/dockcross-$(basename $@) python test/run.py $($@_ARGS) +# +# testing prerequisites implicit rule +# +test.prerequisites: + mkdir -p $(BIN) + +$(addsuffix .test,$(IMAGES)): test.prerequisites + .PHONY: base images $(IMAGES) test %.test