mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
Makefile: Don't encode bindir in the tar archive
Prior to this commit we go build -o bin/foo, archive it, and expand the archive, leaving the resulting artifact in bin. This doesn't allow us to easily change the bin directory, or move parts of the makefile around to make things more modular. This commit changes the behaviour to: go build -o foo, archive it, expand to `bin` Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
This commit is contained in:
parent
f4c4ab1c8c
commit
452910c625
4
Makefile
4
Makefile
@ -35,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
|
||||
|
@ -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 bin/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