diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 36 |
1 files changed, 25 insertions, 11 deletions
@@ -32,6 +32,9 @@ BUILDTAGS ?= \ exclude_graphdriver_devicemapper \ seccomp \ varlink +PYTHON ?= $(shell command -v python python3|head -n1) +PKG_MANAGER ?= $(shell command -v dnf yum|head -n1) + GO_BUILD=$(GO) build # Go module support: set `-mod=vendor` to use the vendored sources @@ -133,7 +136,7 @@ endef export PRINT_HELP_PYSCRIPT help: - @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) + @$(PYTHON) -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) .gopathok: ifeq ("$(wildcard $(GOPKGDIR))","") @@ -317,7 +320,7 @@ $(MANPAGES): %: %.md .gopathok docdir: mkdir -p docs/build/man -docs: docdir $(MANPAGES) ## Generate documentation +docs: .install.md2man docdir $(MANPAGES) ## Generate documentation install-podman-remote-%-docs: podman-remote docs $(MANPAGES) rm -rf docs/build/remote @@ -475,7 +478,7 @@ endef if [ ! -x "$(GOBIN)/gometalinter" ]; then \ $(call go-get,github.com/alecthomas/gometalinter); \ cd $(FIRST_GOPATH)/src/github.com/alecthomas/gometalinter; \ - git checkout e8d801238da6f0dfd14078d68f9b53fa50a7eeb5; \ + git checkout --detach e8d801238da6f0dfd14078d68f9b53fa50a7eeb5; \ $(GO) install github.com/alecthomas/gometalinter; \ $(GOBIN)/gometalinter --install; \ fi @@ -486,8 +489,8 @@ endef fi .install.md2man: .gopathok - if [ ! -x "$(GOBIN)/go-md2man" ]; then \ - $(call go-get,github.com/cpuguy83/go-md2man); \ + if [ ! -x "$(GOMD2MAN)" ]; then \ + $(call go-get,github.com/cpuguy83/go-md2man); \ fi varlink_generate: .gopathok cmd/podman/varlink/iopodman.go ## Generate varlink @@ -497,7 +500,7 @@ varlink_api_generate: .gopathok API.md install.libseccomp.sudo: rm -rf ../../seccomp/libseccomp git clone https://github.com/seccomp/libseccomp ../../seccomp/libseccomp - cd ../../seccomp/libseccomp && git checkout $(LIBSECCOMP_COMMIT) && ./autogen.sh && ./configure --prefix=/usr && make all && make install + cd ../../seccomp/libseccomp && git checkout --detach $(LIBSECCOMP_COMMIT) && ./autogen.sh && ./configure --prefix=/usr && make all && make install cmd/podman/varlink/iopodman.go: cmd/podman/varlink/io.podman.varlink @@ -531,19 +534,30 @@ vendor-in-container: .PHONY: \ .gopathok \ binaries \ + changelog \ clean \ - validate.completions \ default \ docs \ gofmt \ + golangci-lint \ help \ install \ - golangci-lint \ + install.libseccomp.sudo \ lint \ pause \ - uninstall \ + package \ + package-install \ shell \ - changelog \ + uninstall \ validate \ - install.libseccomp.sudo \ + validate.completions \ vendor + +package: ## Build rpm packages + ## TODO(ssbarnea): make version number predictable, it should not change + ## on each execution, producing duplicates. + rm -f ~/rpmbuild/RPMS/x86_64/* ~/rpmbuild/RPMS/noarch/* + ./contrib/build_rpm.sh + +package-install: package ## Install rpm packages + sudo ${PKG_MANAGER} -y install --allowerasing ${HOME}/rpmbuild/RPMS/*/*.rpm |