From 96a9afedf69947ae1bfed2275eed7aeb92f3223d Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 22 Feb 2018 20:01:41 +0100 Subject: [PATCH] Makefile: split declarations to Makefile.inc so that they can be reused by another Makefile Signed-off-by: Giuseppe Scrivano --- Makefile | 4 ++-- Makefile.inc | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 Makefile.inc diff --git a/Makefile b/Makefile index 1e097a13..85c4bbe3 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +include Makefile.inc + GO ?= go EPOCH_TEST_COMMIT ?= 1cc5a27 PROJECT := github.com/kubernetes-incubator/cri-o @@ -20,8 +22,6 @@ OCIUMOUNTINSTALLDIR=$(PREFIX)/share/oci-umount/oci-umount.d SELINUXOPT ?= $(shell test -x /usr/sbin/selinuxenabled && selinuxenabled && echo -Z) PACKAGES ?= $(shell go list -tags "${BUILDTAGS}" ./... | grep -v github.com/kubernetes-incubator/cri-o/vendor) -COMMIT_NO := $(shell git rev-parse HEAD 2> /dev/null || true) -GIT_COMMIT := $(if $(shell git status --porcelain --untracked-files=no),"${COMMIT_NO}-dirty","${COMMIT_NO}") BUILD_INFO := $(shell date +%s) # If GOPATH not specified, use one in the local directory diff --git a/Makefile.inc b/Makefile.inc new file mode 100644 index 00000000..04149d06 --- /dev/null +++ b/Makefile.inc @@ -0,0 +1,2 @@ +COMMIT_NO := $(shell git rev-parse HEAD 2> /dev/null || true) +GIT_COMMIT := $(if $(shell git status --porcelain --untracked-files=no),"${COMMIT_NO}-dirty","${COMMIT_NO}")