simpler generator
This commit is contained in:
parent
6902590e82
commit
a000e0c482
14
Makefile
14
Makefile
@ -8,17 +8,13 @@ GOOSARCHS = linux/amd64 \
|
|||||||
windows/amd64/.exe
|
windows/amd64/.exe
|
||||||
|
|
||||||
define undockertarget
|
define undockertarget
|
||||||
TARGETS += undocker-$(strip $(1))-$(strip $(2))$(firstword $(3))
|
TARGETS += undocker-$(1)-$(2)$(firstword $(3))
|
||||||
undocker-$(strip $(1))-$(strip $(2))$(firstword $(3)): $(GODEPS)
|
undocker-$(1)-$(2)$(firstword $(3)): $(GODEPS)
|
||||||
CGO_ENABLED=0 GOOS=$(strip $(1)) GOARCH=$(strip $(2)) go build -o $$@
|
CGO_ENABLED=0 GOOS=$(1) GOARCH=$(2) go build -o $$@
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(foreach goosarch,$(GOOSARCHS), \
|
$(foreach goosarch,$(GOOSARCHS),\
|
||||||
$(eval $(call undockertarget,\
|
$(eval $(call undockertarget,$(word 1,$(subst /, ,$(goosarch))),$(word 2,$(subst /, ,$(goosarch))),$(word 3,$(subst /, ,$(goosarch))))))
|
||||||
$(word 1,$(subst /, ,$(goosarch))),\
|
|
||||||
$(word 2,$(subst /, ,$(goosarch))),\
|
|
||||||
$(word 3,$(subst /, ,$(goosarch))),\
|
|
||||||
)))
|
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: $(TARGETS) coverage.html
|
all: $(TARGETS) coverage.html
|
||||||
|
Loading…
Reference in New Issue
Block a user