From a000e0c482d90a798e253b270451802e68a98cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 23 Aug 2021 16:32:00 +0300 Subject: [PATCH] simpler generator --- Makefile | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 031200d..42f4246 100644 --- a/Makefile +++ b/Makefile @@ -8,17 +8,13 @@ GOOSARCHS = linux/amd64 \ windows/amd64/.exe define undockertarget -TARGETS += undocker-$(strip $(1))-$(strip $(2))$(firstword $(3)) -undocker-$(strip $(1))-$(strip $(2))$(firstword $(3)): $(GODEPS) - CGO_ENABLED=0 GOOS=$(strip $(1)) GOARCH=$(strip $(2)) go build -o $$@ +TARGETS += undocker-$(1)-$(2)$(firstword $(3)) +undocker-$(1)-$(2)$(firstword $(3)): $(GODEPS) + CGO_ENABLED=0 GOOS=$(1) GOARCH=$(2) go build -o $$@ endef -$(foreach goosarch,$(GOOSARCHS), \ - $(eval $(call undockertarget,\ - $(word 1,$(subst /, ,$(goosarch))),\ - $(word 2,$(subst /, ,$(goosarch))),\ - $(word 3,$(subst /, ,$(goosarch))),\ -))) +$(foreach goosarch,$(GOOSARCHS),\ + $(eval $(call undockertarget,$(word 1,$(subst /, ,$(goosarch))),$(word 2,$(subst /, ,$(goosarch))),$(word 3,$(subst /, ,$(goosarch)))))) .PHONY: all all: $(TARGETS) coverage.html