diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 73 |
1 files changed, 10 insertions, 63 deletions
@@ -40,9 +40,6 @@ SOURCES = $(shell find . -path './.*' -prune -o -name "*.go") BUILDFLAGS := -mod=vendor $(BUILDFLAGS) BUILDTAGS_CROSS ?= containers_image_openpgp exclude_graphdriver_btrfs exclude_graphdriver_devicemapper exclude_graphdriver_overlay -ifneq (,$(findstring varlink,$(BUILDTAGS))) - PODMAN_VARLINK_DEPENDENCIES = pkg/varlink/iopodman.go -endif CONTAINER_RUNTIME := $(shell command -v podman 2> /dev/null || echo docker) OCI_RUNTIME ?= "" @@ -149,10 +146,6 @@ ifeq ("$(wildcard $(GOPKGDIR))","") mkdir -p "$(GOPKGBASEDIR)" ln -sfn "$(CURDIR)" "$(GOPKGDIR)" endif - -ifneq (,$(findstring varlink,$(BUILDTAGS))) - ln -sfn "$(CURDIR)/vendor/github.com/varlink" "$(FIRST_GOPATH)/src/github.com/varlink" -endif touch $@ .PHONY: lint @@ -165,7 +158,7 @@ endif $(PRE_COMMIT) run -a .PHONY: golangci-lint -golangci-lint: .gopathok varlink_generate .install.golangci-lint +golangci-lint: .gopathok .install.golangci-lint hack/golangci-lint.sh run .PHONY: gofmt @@ -189,7 +182,7 @@ test/goecho/goecho: .gopathok $(wildcard test/goecho/*.go) .PHONY: bin/podman -bin/podman: .gopathok $(SOURCES) go.mod go.sum $(PODMAN_VARLINK_DEPENDENCIES) ## Build with podman +bin/podman: .gopathok $(SOURCES) go.mod go.sum ## Build with podman # Make sure to warn in case we're building without the systemd buildtag. ifeq (,$(findstring systemd,$(BUILDTAGS))) @echo "Podman is being compiled without the systemd build tag. Install libsystemd on \ @@ -201,7 +194,7 @@ endif podman: bin/podman .PHONY: bin/podman-remote -bin/podman-remote: .gopathok $(SOURCES) go.mod go.sum $(PODMAN_VARLINK_DEPENDENCIES) ## Build with podman on remote environment +bin/podman-remote: .gopathok $(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 @@ -218,7 +211,7 @@ podman.msi: podman-remote podman-remote-windows install-podman-remote-windows-do |wixl-heat --var var.ManSourceDir --component-group ManFiles --directory-ref INSTALLDIR --prefix $(DOCFILE)/ >$(DOCFILE)/pages.wsx wixl -D VERSION=$(RELEASE_NUMBER) -D ManSourceDir=$(DOCFILE) -o podman-v$(RELEASE_NUMBER).msi contrib/msi/podman.wxs $(DOCFILE)/pages.wsx -podman-remote-%: .gopathok $(PODMAN_VARLINK_DEPENDENCIES) ## Build podman for a specific GOOS +podman-remote-%: .gopathok ## Build podman for a specific GOOS $(eval BINSFX := $(shell test "$*" != "windows" || echo ".exe")) CGO_ENABLED=0 GOOS=$* $(GO) build $(BUILDFLAGS) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN)' -tags "${REMOTETAGS}" -o bin/$@$(BINSFX) ./cmd/podman @@ -267,7 +260,6 @@ clean: ## Clean artifacts test/checkseccomp/checkseccomp \ test/goecho/goecho \ test/testdata/redis-image \ - pkg/varlink/iopodman.go \ libpod/container_ffjson.go \ libpod/pod_ffjson.go \ libpod/container_easyjson.go \ @@ -276,13 +268,13 @@ clean: ## Clean artifacts make -C docs clean .PHONY: localunit -localunit: test/goecho/goecho varlink_generate +localunit: test/goecho/goecho hack/check_root.sh make localunit rm -rf ${COVERAGE_PATH} && mkdir -p ${COVERAGE_PATH} $(GOBIN)/ginkgo \ -r \ $(TESTFLAGS) \ - --skipPackage test/e2e,pkg/apparmor,test/endpoint,pkg/bindings,hack \ + --skipPackage test/e2e,pkg/apparmor,pkg/bindings,hack \ --cover \ --covermode atomic \ --coverprofile coverprofile \ @@ -304,18 +296,11 @@ ginkgo: ginkgo-remote: $(GOBIN)/ginkgo -v $(TESTFLAGS) -tags "$(REMOTETAGS)" $(GINKGOTIMEOUT) -cover -flakeAttempts 3 -progress -trace -noColor test/e2e/. -.PHONY: endpoint -ifneq (,$(findstring varlink,$(BUILDTAGS))) -endpoint: - $(GOBIN)/ginkgo -v $(TESTFLAGS) -tags "$(BUILDTAGS)" $(GINKGOTIMEOUT) -cover -flakeAttempts 3 -progress -trace -noColor -debug test/endpoint/. -endpoint: -endif - .PHONY: localintegration -localintegration: varlink_generate test-binaries ginkgo +localintegration: test-binaries ginkgo .PHONY: remoteintegration -remoteintegration: varlink_generate test-binaries ginkgo-remote +remoteintegration: test-binaries ginkgo-remote .PHONY: localsystem localsystem: @@ -370,7 +355,7 @@ system.test-binary: .install.ginkgo $(GO) test -c ./test/system .PHONY: binaries -binaries: varlink_generate podman podman-remote ## Build podman +binaries: podman podman-remote ## Build podman .PHONY: install.catatonit install.catatonit: @@ -543,23 +528,8 @@ install.docker: docker-docs install ${SELINUXOPT} -m 755 -d ${DESTDIR}${SYSTEMDDIR} ${DESTDIR}${USERSYSTEMDDIR} ${DESTDIR}${TMPFILESDIR} install ${SELINUXOPT} -m 644 contrib/systemd/system/podman-docker.conf -t ${DESTDIR}${TMPFILESDIR} -.PHONY: install.varlink -ifneq (,$(findstring varlink,$(BUILDTAGS))) -install.varlink: - install ${SELINUXOPT} -m 755 -d ${DESTDIR}${SYSTEMDDIR} ${DESTDIR}${USERSYSTEMDDIR} - install ${SELINUXOPT} -m 644 contrib/varlink/io.podman.socket ${DESTDIR}${SYSTEMDDIR}/io.podman.socket - install ${SELINUXOPT} -m 644 contrib/varlink/io.podman.socket ${DESTDIR}${USERSYSTEMDDIR}/io.podman.socket - install ${SELINUXOPT} -m 644 contrib/varlink/io.podman.service ${DESTDIR}${SYSTEMDDIR}/io.podman.service - # User units are ordered differently, we can't make the *system* multi-user.target depend on a user unit. - # For user units the default.target that's the default is fine. - sed -e 's,^WantedBy=.*,WantedBy=default.target,' < contrib/varlink/io.podman.service > ${DESTDIR}${USERSYSTEMDDIR}/io.podman.service -else -install.varlink: -endif - - .PHONY: install.systemd -install.systemd: install.varlink +install.systemd: install ${SELINUXOPT} -m 755 -d ${DESTDIR}${SYSTEMDDIR} ${DESTDIR}${USERSYSTEMDDIR} # User services install ${SELINUXOPT} -m 644 contrib/systemd/auto-update/podman-auto-update.service ${DESTDIR}${USERSYSTEMDDIR}/podman-auto-update.service @@ -640,20 +610,6 @@ endef fi # $BUILD_TAGS variable is used in hack/golangci-lint.sh -.PHONY: varlink_generate -ifneq (or $(findstring varlink,$(BUILDTAGS)),$(findstring varlink,$(BUILD_TAGS))) -varlink_generate: .gopathok pkg/varlink/iopodman.go ## Generate varlink -else -varlink_generate: -endif - -.PHONY: varlink_api_generate -ifneq (,$(findstring varlink,$(BUILDTAGS))) -varlink_api_generate: .gopathok API.md -else -varlink_api_generate: -endif - .PHONY: install.libseccomp.sudo install.libseccomp.sudo: rm -rf ../../seccomp/libseccomp @@ -661,15 +617,6 @@ install.libseccomp.sudo: cd ../../seccomp/libseccomp && git checkout --detach $(LIBSECCOMP_COMMIT) && ./autogen.sh && ./configure --prefix=/usr && make all && make install -pkg/varlink/iopodman.go: .gopathok pkg/varlink/io.podman.varlink -ifneq (,$(findstring Linux,$(shell uname -s))) - # Only generate the varlink code on Linux (see issue #4814). - $(GO) generate ./pkg/varlink/... -endif - -API.md: pkg/varlink/io.podman.varlink - $(GO) generate ./docs/... - .PHONY: validate.completions validate.completions: SHELL:=/usr/bin/env bash # Set shell to bash for this target validate.completions: |