mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 09:39:08 +00:00
Merge pull request #3659 from edvinerikson/fix-install
fix: make command
This commit is contained in:
commit
6312d58032
10
Makefile
10
Makefile
@ -3,9 +3,11 @@ VERSION="v0.8+"
|
||||
GO_COMPILE=linuxkit/go-compile:7b1f5a37d2a93cd4a9aa2a87db264d8145944006
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
LINUXKIT?=$(CURDIR)/bin/linuxkit.exe
|
||||
RTF?=bin/rtf.exe
|
||||
GOOS?=windows
|
||||
else
|
||||
LINUXKIT?=$(CURDIR)/bin/linuxkit
|
||||
RTF?=bin/rtf
|
||||
GOOS?=$(shell uname -s | tr '[:upper:]' '[:lower:]')
|
||||
endif
|
||||
@ -21,7 +23,7 @@ PREFIX?=/usr/local
|
||||
|
||||
LOCAL_TARGET?=$(CURDIR)/bin/linuxkit
|
||||
|
||||
export VERSION GO_COMPILE GOOS GOARCH LOCAL_TARGET
|
||||
export VERSION GO_COMPILE GOOS GOARCH LOCAL_TARGET LINUXKIT
|
||||
|
||||
.DELETE_ON_ERROR:
|
||||
|
||||
@ -33,12 +35,12 @@ RTF_COMMIT=2351267f358ce6621c0c0d9a069f361268dba5fc
|
||||
RTF_CMD=github.com/linuxkit/rtf/cmd
|
||||
RTF_VERSION=0.0
|
||||
$(RTF): tmp_rtf_bin.tar | bin
|
||||
tar xf $<
|
||||
tar -C $(dir $(RTF)) -xf $<
|
||||
rm $<
|
||||
touch $@
|
||||
|
||||
tmp_rtf_bin.tar: Makefile
|
||||
docker run --rm --log-driver=none -e http_proxy=$(http_proxy) -e https_proxy=$(https_proxy) $(CROSS) $(GO_COMPILE) --clone-path github.com/linuxkit/rtf --clone https://github.com/linuxkit/rtf.git --commit $(RTF_COMMIT) --package github.com/linuxkit/rtf --ldflags "-X $(RTF_CMD).GitCommit=$(RTF_COMMIT) -X $(RTF_CMD).Version=$(RTF_VERSION)" -o $(RTF) > $@
|
||||
docker run --rm --log-driver=none -e http_proxy=$(http_proxy) -e https_proxy=$(https_proxy) $(CROSS) $(GO_COMPILE) --clone-path github.com/linuxkit/rtf --clone https://github.com/linuxkit/rtf.git --commit $(RTF_COMMIT) --package github.com/linuxkit/rtf --ldflags "-X $(RTF_CMD).GitCommit=$(RTF_COMMIT) -X $(RTF_CMD).Version=$(RTF_VERSION)" -o $(notdir $(RTF)) > $@
|
||||
|
||||
# Manifest tool for multi-arch images
|
||||
MT_COMMIT=bfbd11963b8e0eb5f6e400afaebeaf39820b4e90
|
||||
@ -52,7 +54,7 @@ tmp_mt_bin.tar: Makefile
|
||||
docker run --rm --log-driver=none -e http_proxy=$(http_proxy) -e https_proxy=$(https_proxy) $(CROSS) $(GO_COMPILE) --clone-path github.com/estesp/manifest-tool --clone $(MT_REPO) --commit $(MT_COMMIT) --package github.com/estesp/manifest-tool --ldflags "-X main.gitCommit=$(MT_COMMIT)" -o bin/manifest-tool > $@
|
||||
|
||||
.PHONY: linuxkit
|
||||
linuxkit:
|
||||
linuxkit: bin
|
||||
make -C ./src/cmd/linuxkit
|
||||
|
||||
.PHONY: test-cross
|
||||
|
1
src/cmd/linuxkit/.gitignore
vendored
Normal file
1
src/cmd/linuxkit/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
bin/
|
@ -26,12 +26,12 @@ all: default
|
||||
|
||||
LINUXKIT_DEPS=$(wildcard *.go) $(wildcard */*.go) Makefile
|
||||
$(LINUXKIT): tmp_linuxkit_bin.tar | bin
|
||||
tar xf $<
|
||||
tar -C $(dir $(LINUXKIT)) -xf $<
|
||||
rm $<
|
||||
touch $@
|
||||
|
||||
tmp_linuxkit_bin.tar: $(LINUXKIT_DEPS)
|
||||
tar cf - -C . . | docker run --rm --net=none --log-driver=none -i $(CROSS) $(GO_COMPILE) --package github.com/linuxkit/linuxkit/src/cmd/linuxkit --ldflags "-X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.GitCommit=$(GIT_COMMIT) -X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.Version=$(VERSION)" -o $(LINUXKIT) > $@
|
||||
tar cf - -C . . | docker run --rm --net=none --log-driver=none -i $(CROSS) $(GO_COMPILE) --package github.com/linuxkit/linuxkit/src/cmd/linuxkit --ldflags "-X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.GitCommit=$(GIT_COMMIT) -X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.Version=$(VERSION)" -o $(notdir $(LINUXKIT)) > $@
|
||||
|
||||
.PHONY: test-cross
|
||||
test-cross:
|
||||
|
Loading…
Reference in New Issue
Block a user