Merge pull request #2000 from rneugeba/build

build: Make sure the tools compile on Linux/macOS/Windows
This commit is contained in:
Rolf Neugebauer 2017-06-08 14:46:15 +01:00 committed by GitHub
commit 6d1b511f86

View File

@ -12,7 +12,10 @@ LINUXKIT?=bin/linuxkit
GOOS?=$(shell uname -s | tr '[:upper:]' '[:lower:]') GOOS?=$(shell uname -s | tr '[:upper:]' '[:lower:]')
GOARCH?=amd64 GOARCH?=amd64
ifneq ($(GOOS),linux) ifneq ($(GOOS),linux)
CROSS=-e GOOS=$(GOOS) -e GOARCH=$(GOARCH) CROSS+=-e GOOS=$(GOOS)
endif
ifneq ($(GOARCH),amd64)
CROSS+=-e GOARCH=$(GOARCH)
endif endif
PREFIX?=/usr/local/ PREFIX?=/usr/local/
@ -55,6 +58,12 @@ collect-artifacts: artifacts/test.img.tar.gz artifacts/test-ltp.img.tar.gz
.PHONY: ci ci-tag ci-pr .PHONY: ci ci-tag ci-pr
ci: ci:
$(MAKE) clean
$(MAKE) GOOS=darwin
$(MAKE) clean
$(MAKE) GOOS=linux
$(MAKE) clean
$(MAKE) GOOS=windows
$(MAKE) clean $(MAKE) clean
$(MAKE) $(MAKE)
$(MAKE) install $(MAKE) install
@ -62,6 +71,12 @@ ci:
$(MAKE) -C pkg tag $(MAKE) -C pkg tag
ci-tag: ci-tag:
$(MAKE) clean
$(MAKE) GOOS=darwin
$(MAKE) clean
$(MAKE) GOOS=linux
$(MAKE) clean
$(MAKE) GOOS=windows
$(MAKE) clean $(MAKE) clean
$(MAKE) $(MAKE)
$(MAKE) install $(MAKE) install
@ -69,6 +84,12 @@ ci-tag:
$(MAKE) -C pkg tag $(MAKE) -C pkg tag
ci-pr: ci-pr:
$(MAKE) clean
$(MAKE) GOOS=darwin
$(MAKE) clean
$(MAKE) GOOS=linux
$(MAKE) clean
$(MAKE) GOOS=windows
$(MAKE) clean $(MAKE) clean
$(MAKE) $(MAKE)
$(MAKE) install $(MAKE) install