Skip to content

Commit

Permalink
simplify makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Sep 13, 2024
1 parent 0a4f8a7 commit 19ad4bb
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 19ad4bb

Please sign in to comment.