From 12d43eebd9080ead739169dea7489475a4176170 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sat, 15 Apr 2017 18:07:33 +0200 Subject: [PATCH] =?UTF-8?q?use=20=E2=80=9A:=3D=E2=80=9A=20assignments=20in?= =?UTF-8?q?stead=20of=20=E2=80=9A=3D=E2=80=9A=20for=20improved=20compilati?= =?UTF-8?q?on=20speeds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids repeated invocations of git --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 92da5815b..fe0220986 100644 --- a/Makefile +++ b/Makefile @@ -69,16 +69,16 @@ BUILDDIR := $(BUILDDIR)/$(VARIANT) SRCDIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) # Add git revision and build variant defines -VERSION = $(shell git describe --tags --abbrev=0 --match v*) -VERSION_NUM = $(shell VERSION=$(VERSION); echo $${VERSION:1}) +VERSION := $(shell git describe --tags --abbrev=0 --match v*) +VERSION_NUM := $(shell VERSION=$(VERSION); echo $${VERSION:1}) ifdef CI - GIT_REV = $(shell REV=$${CI_BUILD_REF}; echo $${REV:0:7}) + GIT_REV := $(shell REV=$${CI_BUILD_REF}; echo $${REV:0:7}) GIT_BRANCH = ${CI_BUILD_REF_NAME} VARIANT := $(VARIANT)-ci else - GIT_REV = $(shell REV=$$(git rev-parse HEAD); echo $${REV:0:7}) - GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD) + GIT_REV := $(shell REV=$$(git rev-parse HEAD); echo $${REV:0:7}) + GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD) endif