From eb81457111f31c0f5b57e21883a463b7c900399f Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 23 Mar 2023 09:55:21 +0100 Subject: [PATCH] Avoid running git command 254 times (#3915) Signed-off-by: David Gageot --- kernel/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/Makefile b/kernel/Makefile index 98e7b94f04..0cd1bdbc71 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -32,10 +32,10 @@ DEBUG?= ifeq ($(HASH),) HASH_COMMIT?=HEAD # Setting this is only really useful with the show-tag target -HASH?=$(shell git ls-tree --full-tree $(HASH_COMMIT) -- $(CURDIR) | awk '{print $$3}') +HASH:=$(shell git ls-tree --full-tree $(HASH_COMMIT) -- $(CURDIR) | awk '{print $$3}') ifneq ($(HASH_COMMIT),HEAD) # Others can't be dirty by definition -DIRTY=$(shell git update-index -q --refresh && git diff-index --quiet HEAD -- $(CURDIR) || echo "-dirty") +DIRTY:=$(shell git update-index -q --refresh && git diff-index --quiet HEAD -- $(CURDIR) || echo "-dirty") endif endif