diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 45 |
1 files changed, 40 insertions, 5 deletions
@@ -106,7 +106,11 @@ CROSS_BUILD_TARGETS := \ bin/podman.cross.linux.arm \ bin/podman.cross.linux.arm64 \ bin/podman.cross.linux.386 \ - bin/podman.cross.linux.s390x + bin/podman.cross.linux.s390x \ + bin/podman.cross.linux.mips \ + bin/podman.cross.linux.mipsle \ + bin/podman.cross.linux.mips64 \ + bin/podman.cross.linux.mips64le .PHONY: all all: binaries docs @@ -176,6 +180,14 @@ gofmt: ## Verify the source code gofmt test/checkseccomp/checkseccomp: .gopathok $(wildcard test/checkseccomp/*.go) $(GO) build $(BUILDFLAGS) -ldflags '$(LDFLAGS_PODMAN)' -tags "$(BUILDTAGS)" -o $@ ./test/checkseccomp +.PHONY: test/testvol/testvol +test/testvol/testvol: .gopathok $(wildcard test/testvol/*.go) + $(GO) build $(BUILDFLAGS) -ldflags '$(LDFLAGS_PODMAN)' -o $@ ./test/testvol + +.PHONY: volume-plugin-test-image +volume-plugin-test-img: + podman build -t quay.io/libpod/volume-plugin-test-img -f Containerfile-testvol . + .PHONY: test/goecho/goecho test/goecho/goecho: .gopathok $(wildcard test/goecho/*.go) $(GO) build $(BUILDFLAGS) -ldflags '$(LDFLAGS_PODMAN)' -o $@ ./test/goecho @@ -194,7 +206,7 @@ endif podman: bin/podman .PHONY: bin/podman-remote -bin/podman-remote: .gopathok $(SOURCES) go.mod go.sum ## Build with podman on remote environment +bin/podman-remote: .gopathok .generate-bindings $(SOURCES) go.mod go.sum ## Build with podman on remote environment $(GO) build $(BUILDFLAGS) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN)' -tags "${REMOTETAGS}" -o $@ ./cmd/podman .PHONY: bin/podman-remote-static @@ -221,7 +233,7 @@ bin/podman.cross.%: .gopathok TARGET="$*"; \ GOOS="$${TARGET%%.*}" \ GOARCH="$${TARGET##*.}" \ - $(GO) build $(BUILDFLAGS) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN)' -tags '$(BUILDTAGS_CROSS)' -o "$@" ./cmd/podman + CGO_ENABLED=0 $(GO) build $(BUILDFLAGS) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN)' -tags '$(BUILDTAGS_CROSS)' -o "$@" ./cmd/podman # Update nix/nixpkgs.json its latest stable commit .PHONY: nixpkgs @@ -264,6 +276,8 @@ clean: ## Clean artifacts libpod/pod_ffjson.go \ libpod/container_easyjson.go \ libpod/pod_easyjson.go \ + .install.goimports \ + .generate-bindings \ docs/build make -C docs clean @@ -403,7 +417,7 @@ release.txt: # X-RELEASE-INFO format depended upon by automated tooling echo -n "X-RELEASE-INFO:" > "$@" for field in "$(RELEASE_BASENAME)" "$(RELEASE_VERSION)" \ - "$(RELEASE_DIST)" "$(RELEASE_DIST_VER)" "$(RELEASE_ARCH)"; do \ + "$(RELEASE_DIST)" "$(RELEASE_DIST_VER)" "$(RELEASE_ARCH)"; do \ echo -n " $$field"; done >> "$@" echo "" >> "$@" @@ -445,6 +459,21 @@ podman-remote-%-release: rm -f release.txt $(MAKE) podman-remote-release-$*.zip +BINDINGS_SOURCE = $(wildcard pkg/bindings/**/types.go) +.generate-bindings: $(BINDINGS_SOURCE) +ifneq ($(shell uname -s), Darwin) + for i in $(BINDINGS_SOURCE); do \ + dirname=$$(dirname $${i}); \ + shortname=$$(basename $${dirname}); \ + pushd $${dirname}>/dev/null; \ + echo $${dirname}; \ + echo $(GO) generate; \ + $(GO) generate; \ + popd > /dev/null; \ + done; +endif + touch .generate-bindings + .PHONY: docker-docs docker-docs: docs (cd docs; ./dckrman.sh ./build/man/*.1) @@ -561,13 +590,19 @@ uninstall: GIT_CHECK_EXCLUDE="./vendor:docs/make.bat" $(GOBIN)/git-validation -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..$(HEAD) .PHONY: install.tools -install.tools: .install.gitvalidation .install.md2man .install.ginkgo .install.golangci-lint .install.bats ## Install needed tools +install.tools: .install.goimports .install.gitvalidation .install.md2man .install.ginkgo .install.golangci-lint .install.bats ## Install needed tools define go-get env GO111MODULE=off \ $(GO) get -u ${1} endef +.install.goimports: .gopathok + if [ ! -x "$(GOBIN)/goimports" ]; then \ + $(call go-get,golang.org/x/tools/cmd/goimports); \ + fi + touch .install.goimports + .PHONY: .install.ginkgo .install.ginkgo: .gopathok if [ ! -x "$(GOBIN)/ginkgo" ]; then \ |