diff --git a/Makefile b/Makefile index 8fa9fdf7e..0afa377a8 100644 --- a/Makefile +++ b/Makefile @@ -177,7 +177,11 @@ CXXFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) -Woverl LDFLAGS += $(PLATFORM_LDFLAGS) date := $(shell date +%F) -git_sha := $(shell git rev-parse HEAD 2>/dev/null) +ifdef FORCE_GIT_SHA + git_sha := $(FORCE_GIT_SHA) +else + git_sha := $(shell git rev-parse HEAD 2>/dev/null) +endif gen_build_version = \ printf '%s\n' \ '\#include "build_version.h"' \