From e428bb3c0336e57fa220a42dc5d8b4d6d0a7eb8b Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Sun, 25 Sep 2016 14:33:38 -0400 Subject: [PATCH] Makefile: Simplify test rule using "addsuffix" filename function See https://www.gnu.org/software/make/manual/html_node/File-Name-Functions.html#File-Name-Functions To confirm that the Makefiles works as expected after this patch, the list of executed commands before and after is compared: Before: ``` make --dry-run > ../dockcross-make-baseline make test --dry-run > ../dockcross-make-test-baseline ``` After: ``` make --dry-run > ../dockcross-make-current; make test --dry-run > ../dockcross-make-test-current for target in make make-test; do diff ../dockcross-$target-current ../dockcross-$target-baseline > /dev/null 2>&1 [[ $? == 1 ]] && \ echo "" && \ echo "Error: Problem with '${target}' target: Dry-run output before and after this commit do not match." done ``` --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f23ffc7..ef9cc3b 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ IMAGES = android-arm linux-x86 linux-x64 manylinux-x64 manylinux-x86 linux-arm64 images: base $(IMAGES) -test: base.test android-arm.test linux-x86.test linux-x64.test manylinux-x64.test manylinux-x86.test linux-arm64.test linux-armv5.test linux-armv6.test linux-armv7.test windows-x86.test windows-x64.test +test: base.test $(addsuffix .test,$(IMAGES)) android-arm: base android-arm/Dockerfile $(DOCKER) build -t $(ORG)/android-arm android-arm