From 5aadd45f7c6eee0b5f6ef3390222cfed996ac73c Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 29 Jan 2020 17:09:01 +0100 Subject: Makefile: move systemd buildtag check Move the systemd-buildtag check into the `bin/podman` target. No need to execute the check for all invocations of the Makefile. Signed-off-by: Valentin Rothberg --- Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 420e3c4b2..8e44c22cc 100644 --- a/Makefile +++ b/Makefile @@ -45,12 +45,6 @@ ifeq ($(shell go help mod >/dev/null 2>&1 && echo true), true) GO_BUILD=GO111MODULE=on $(GO) build -mod=vendor endif -ifeq (,$(findstring systemd,$(BUILDTAGS))) -$(warning \ - Podman is being compiled without the systemd build tag.\ - Install libsystemd on Ubuntu or systemd-devel on rpm based distro for journald support) -endif - BUILDTAGS_CROSS ?= containers_image_openpgp exclude_graphdriver_btrfs exclude_graphdriver_devicemapper exclude_graphdriver_overlay ifneq (,$(findstring varlink,$(BUILDTAGS))) PODMAN_VARLINK_DEPENDENCIES = cmd/podman/varlink/iopodman.go @@ -170,7 +164,14 @@ test/checkseccomp/checkseccomp: .gopathok $(wildcard test/checkseccomp/*.go) test/goecho/goecho: .gopathok $(wildcard test/goecho/*.go) $(GO_BUILD) -ldflags '$(LDFLAGS_PODMAN)' -o $@ $(PROJECT)/test/goecho + bin/podman: .gopathok $(SOURCES) go.mod go.sum $(PODMAN_VARLINK_DEPENDENCIES) ## Build with podman +# Make sure to warn in case we're building without the systemd buildtag. +ifeq (,$(findstring systemd,$(BUILDTAGS))) +$(warning \ + Podman is being compiled without the systemd build tag.\ + Install libsystemd on Ubuntu or systemd-devel on rpm based distro for journald support) +endif $(GO_BUILD) $(BUILDFLAGS) -gcflags '$(GCFLAGS)' -asmflags '$(ASMFLAGS)' -ldflags '$(LDFLAGS_PODMAN)' -tags "$(BUILDTAGS)" -o $@ $(PROJECT)/cmd/podman podman: bin/podman -- cgit v1.2.3-54-g00ecf