Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ PATH:=$(BUILDTOOLS_BIN):$(PATH)

GOPKGVERSION=$(shell tools/goversion.sh 2>/dev/null)

export CGO_ENABLED GOOS GOARCH PATH
export CGO_ENABLED PATH

ifeq ($(BUILDKIT_PROGRESS),)
export BUILDKIT_PROGRESS := plain
Expand Down Expand Up @@ -81,9 +81,6 @@ BUILD_VM_SRC=$(BUILD_VM_SRC_$(ZARCH))
UNAME_S := $(shell uname -s)
UNAME_S_LCASE=$(shell uname -s | tr '[A-Z]' '[a-z]')

# store the goos for local, as an easier-to-reference var
LOCAL_GOOS=$(UNAME_S_LCASE)

USER = $(shell id -u -n)
GROUP = $(shell id -g -n)
UID = $(shell id -u)
Expand Down Expand Up @@ -334,7 +331,6 @@ QEMU_OPTS_GUI=$(QEMU_OPTS_VGA_DISPLAY_$(ZARCH)) $(QEMU_OPTS_COMMON) $(QEMU_ACCEL
# -device virtio-blk-device,drive=image -drive if=none,id=image,file=X
# -device virtio-net-device,netdev=user0 -netdev user,id=user0,hostfwd=tcp::1234-:22

GOOS=linux
CGO_ENABLED=1
GOBUILDER=eve-build-$(shell echo $(USER) | tr A-Z a-z)

Expand Down Expand Up @@ -365,7 +361,7 @@ endif
DOCKER_GO = _() { $(SET_X); mkdir -p $(CURDIR)/.go/src/$${3:-dummy} ; mkdir -p $(CURDIR)/.go/bin ; \
docker_go_line="docker run $$DOCKER_GO_ARGS -i --rm -u $(USER) -w /go/src/$${3:-dummy} \
-v $(CURDIR)/.go:/go:z -v $$2:/go/src/$${3:-dummy}:z -v $${4:-$(CURDIR)/.go/bin}:/go/bin:z -v $(CURDIR)/:/eve:z -v $${HOME}:/home/$(USER):z \
-e GOOS -e GOARCH -e CGO_ENABLED -e BUILD=local $(GOBUILDER) bash --noprofile --norc -c" ; \
-e GOOS=linux -e GOARCH=$(ZARCH) -e CGO_ENABLED -e BUILD=local $(GOBUILDER) bash --noprofile --norc -c" ; \
verbose=$(V) ;\
verbose=$${verbose:-0} ;\
[ $$verbose -ge 1 ] && echo $$docker_go_line "\"$$1\""; \
Expand Down Expand Up @@ -840,7 +836,7 @@ endif
$(QUIET): $@: Succeeded

$(GET_DEPS): tools/get-deps/*.go
$(MAKE) -C $(GET_DEPS_DIR) GOOS=$(LOCAL_GOOS)
$(MAKE) -C $(GET_DEPS_DIR)

sbom_info:
@echo "$(SBOM)"
Expand Down Expand Up @@ -874,7 +870,7 @@ $(COLLECTED_SOURCES): $(ROOTFS_TARS) $(GOSOURCES)| $(INSTALLER) $(SOURCES_DIR)

$(COMPARESOURCES):
$(QUIET): $@: Begin
cd $(COMPARE_SOURCE) && GOOS=$(LOCAL_GOOS) CGO_ENABLED=0 go build -o $(COMPARESOURCES)
cd $(COMPARE_SOURCE) && CGO_ENABLED=0 go build -o $(COMPARESOURCES)
@echo Done building packages
$(QUIET): $@: Succeeded

Expand Down
7 changes: 4 additions & 3 deletions mk/linuxkit.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# Set LINUXKIT_GIT_URL="" to use the release binary (case 3).
# LINUXKIT_VERSION must remain a published semver tag — it is used only for
# the release-download URL in case 3.
HOST_GOOS := $(shell uname -s | tr '[A-Z]' '[a-z]')

# linuxkit version. This **must** be a published semver version so it can be
# downloaded already compiled from the release page at
Expand Down Expand Up @@ -51,7 +52,7 @@ $(LINUXKIT): $(BUILDTOOLS_BIN)/linuxkit-$(_LK_VERSION) $(PARALLEL_BUILD_LOCK)
$(QUIET)ln -sf $(notdir $<) $@
$(QUIET): $@: Succeeded

$(BUILDTOOLS_BIN)/linuxkit-$(_LK_VERSION): | $(BUILDTOOLS_BIN)
$(BUILDTOOLS_BIN)/linuxkit-$(_LK_VERSION): $(CURDIR)/mk/linuxkit.mk | $(BUILDTOOLS_BIN)
@echo "Building linuxkit from $(LINUXKIT_GIT_URL) at $(LINUXKIT_GIT_REF)"
$(QUIET)tmp=$$(mktemp -d) && \
git clone --filter=blob:none $(LINUXKIT_GIT_URL) $$tmp && \
Expand All @@ -68,10 +69,10 @@ $(LINUXKIT): $(BUILDTOOLS_BIN)/linuxkit-$(LINUXKIT_VERSION) $(PARALLEL_BUILD_LOC
$(QUIET)ln -sf $(notdir $<) $@
$(QUIET): $@: Succeeded

$(BUILDTOOLS_BIN)/linuxkit-$(LINUXKIT_VERSION): | $(BUILDTOOLS_BIN)
$(BUILDTOOLS_BIN)/linuxkit-$(LINUXKIT_VERSION): $(CURDIR)/mk/linuxkit.mk | $(BUILDTOOLS_BIN)
@echo "Downloading linuxkit release $(LINUXKIT_VERSION)"
$(QUIET)curl -fsSL -o $@ \
$(LINUXKIT_SOURCE)/releases/download/$(LINUXKIT_VERSION)/linuxkit-$(LOCAL_GOOS)-$(HOSTARCH) \
$(LINUXKIT_SOURCE)/releases/download/$(LINUXKIT_VERSION)/linuxkit-$(HOST_GOOS)-$(HOSTARCH) \
&& chmod +x $@
$(QUIET): $@: Succeeded

Expand Down
Loading