summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile36
1 files changed, 11 insertions, 25 deletions
diff --git a/Makefile b/Makefile
index caa991b14..51b3d6d96 100644
--- a/Makefile
+++ b/Makefile
@@ -136,7 +136,7 @@ endif
export PATH := $(PATH):$(GOBIN):$(CURDIR)/hack
-GOMD2MAN ?= $(shell command -v go-md2man || echo '$(GOBIN)/go-md2man')
+GOMD2MAN ?= $(shell command -v go-md2man || echo './test/tools/build/go-md2man')
CROSS_BUILD_TARGETS := \
bin/podman.cross.linux.amd64 \
@@ -174,10 +174,6 @@ endif
# Necessary for nested-$(MAKE) calls and docs/remote-docs.sh
export GOOS GOARCH CGO_ENABLED BINSFX SRCBINDIR
-define go-install
- $(GO) install ${1}@latest
-endef
-
# Need to use CGO for mDNS resolution, but cross builds need CGO disabled
# See https://github.com/golang/go/issues/12524 for details
DARWIN_GCO := 0
@@ -236,7 +232,7 @@ endif
.PHONY: .gitvalidation
.gitvalidation: .gopathok
@echo "Validating vs commit '$(call err_if_empty,EPOCH_TEST_COMMIT)'"
- GIT_CHECK_EXCLUDE="./vendor:docs/make.bat:test/buildah-bud/buildah-tests.diff" $(GOBIN)/git-validation -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..$(HEAD)
+ GIT_CHECK_EXCLUDE="./vendor:./test/tools/vendor:docs/make.bat:test/buildah-bud/buildah-tests.diff" ./test/tools/build/git-validation -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..$(HEAD)
.PHONY: lint
lint: golangci-lint
@@ -258,6 +254,7 @@ gofmt: ## Verify the source code gofmt
-name '.golangci.yml' -o \
-name 'Makefile' -o \
-path './vendor/*' -prune -o \
+ -path './test/tools/vendor/*' -prune -o \
-path './contrib/*' -prune \
\) -exec gofmt -d -e -s -w {} \+
git diff --exit-code
@@ -860,13 +857,8 @@ install.systemd:
endif
.PHONY: install.tools
-install.tools: .install.goimports .install.gitvalidation .install.md2man .install.ginkgo .install.golangci-lint .install.bats ## Install needed tools
-
-.install.goimports: .gopathok
- if [ ! -x "$(GOBIN)/goimports" ]; then \
- $(call go-install,golang.org/x/tools/cmd/goimports); \
- fi
- touch .install.goimports
+install.tools: .install.ginkgo .install.golangci-lint .install.bats ## Install needed tools
+ make -C test/tools
.PHONY: .install.ginkgo
.install.ginkgo: .gopathok
@@ -874,16 +866,16 @@ install.tools: .install.goimports .install.gitvalidation .install.md2man .instal
$(GO) install $(BUILDFLAGS) ./vendor/github.com/onsi/ginkgo/ginkgo ; \
fi
-.PHONY: .install.gitvalidation
-.install.gitvalidation: .gopathok
- if [ ! -x "$(GOBIN)/git-validation" ]; then \
- $(call go-install,github.com/vbatts/git-validation); \
- fi
-
.PHONY: .install.golangci-lint
.install.golangci-lint: .gopathok
VERSION=1.45.2 GOBIN=$(GOBIN) ./hack/install_golangci.sh
+.PHONY: .install.md2man
+.install.md2man:
+ if [ ! -x "$(GOMD2MAN)" ]; then \
+ make -C test/tools build/go-md2man ; \
+ fi
+
.PHONY: .install.bats
.install.bats: .gopathok
VERSION=v1.1.0 ./hack/install_bats.sh
@@ -894,12 +886,6 @@ install.tools: .install.goimports .install.gitvalidation .install.md2man .instal
python3 -m pip install --user pre-commit; \
fi
-.PHONY: .install.md2man
-.install.md2man: .gopathok
- if [ ! -x "$(GOMD2MAN)" ]; then \
- $(call go-install,github.com/cpuguy83/go-md2man); \
- fi
-
# $BUILD_TAGS variable is used in hack/golangci-lint.sh
.PHONY: install.libseccomp.sudo
install.libseccomp.sudo: