diff --git a/src/Makefile b/src/Makefile index c93a8645f..bbf594aa4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -52,13 +52,13 @@ ifdef USER_CFLAGS $(info USER_CFLAGS: $(USER_CFLAGS)) endif -ifdef GIT_SHA - $(info GIT_SHA: $(GIT_SHA)) +ifdef BUILD_ID + $(info BUILD_ID: $(BUILD_ID)) else - GIT_SHA := $(shell git rev-parse --short HEAD 2>$(NULLDEV) || svnversion 2>$(NULLDEV)) - ifneq ($(words $(GIT_SHA)),1) - GIT_SHA := N/A - $(info GIT_SHA: N/A) + BUILD_ID := Git $(shell git rev-parse --short HEAD 2>$(NULLDEV) || svnversion 2>$(NULLDEV)) + ifneq ($(words $(BUILD_ID)),2) + BUILD_ID := N/A + $(info BUILD_ID: N/A) endif endif @@ -66,7 +66,7 @@ CFLAGS += -MMD -MP -O3 -I common \ -Wall -Wextra -Wno-char-subscripts $(USER_CFLAGS) \ -DCA65_INC="$(CA65_INC)" -DCC65_INC="$(CC65_INC)" -DCL65_TGT="$(CL65_TGT)" \ -DLD65_LIB="$(LD65_LIB)" -DLD65_OBJ="$(LD65_OBJ)" -DLD65_CFG="$(LD65_CFG)" \ - -DGIT_SHA=$(GIT_SHA) + -DBUILD_ID="$(BUILD_ID)" LDLIBS += -lm diff --git a/src/common/version.c b/src/common/version.c index c76a39933..202c61cc3 100644 --- a/src/common/version.c +++ b/src/common/version.c @@ -61,8 +61,8 @@ const char* GetVersionAsString (void) /* Returns the version number as a string in a static buffer */ { static char Buf[60]; -#if defined(GIT_SHA) - xsnprintf (Buf, sizeof (Buf), "%u.%u - Git %s", VER_MAJOR, VER_MINOR, STRINGIZE (GIT_SHA)); +#if defined(BUILD_ID) + xsnprintf (Buf, sizeof (Buf), "%u.%u - %s", VER_MAJOR, VER_MINOR, STRINGIZE (BUILD_ID)); #else xsnprintf (Buf, sizeof (Buf), "%u.%u", VER_MAJOR, VER_MINOR); #endif