From 19ad4bb2353ba473e887426e0c096c309940e6eb Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Fri, 13 Sep 2024 15:42:29 +0200 Subject: [PATCH] simplify makefile --- Makefile | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 92c2d0e..f485e13 100644 --- a/Makefile +++ b/Makefile @@ -11,15 +11,9 @@ BRANCH := $(shell git rev-parse --abbrev-ref HEAD || echo UNKNOWN) CMDTEST := $(shell echo \"\") ifeq ($(CMDTEST),\"\") # Windows - CMDTEST := $(shell echo "\#") - ifeq ($(CMDTEST),"\#") - # gmake - ECOMMIT := $(shell echo \#define GIT_COMMIT "$(COMMIT)" > inc/git.h) - EBRANCH := $(shell echo \#define GIT_BRANCH "$(BRANCH)" >> inc/git.h) - else - ECOMMIT := $(shell echo #define GIT_COMMIT "$(COMMIT)" > inc/git.h) - EBRANCH := $(shell echo #define GIT_BRANCH "$(BRANCH)" >> inc/git.h) - endif + HASH := \# + ECOMMIT := $(shell echo $(HASH)define GIT_COMMIT "$(COMMIT)" > inc/git.h) + EBRANCH := $(shell echo $(HASH)define GIT_BRANCH "$(BRANCH)" >> inc/git.h) else # Either *nix or Windows with BusyBox (e.g. w64devkit) ECOMMIT := $(shell echo "#define GIT_COMMIT" \"$(COMMIT)\" > inc/git.h)