File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,15 +5,16 @@ GIT_BRANCH := $(shell git symbolic-ref --short HEAD | sed s/[^a-zA-Z0-9_-]/_/g)
55GIT_HASH := $(shell git rev-parse --short HEAD)
66GIT_TAG := $(shell git describe --tags `git rev-list --tags --max-count=1`)
77
8- VERSION := $(shell [[ $( GIT_TAG ) =~ ^v([0-9]+) .([0-9]+).([0-9]+) ]] && printf '0x%02X%02X%02X' $${BASH_REMATCH[1]} $${BASH_REMATCH[2]} $${BASH_REMATCH[3]} )
8+ VERSION := $(shell printf "0x % 02X % 02X % 02X" $( shell echo " $( GIT_TAG )" | sed -E 's/ ^v([0-9]+) .([0-9]+) .([0-9]+)/\1 \2 \3/g') )
99BUILD_VERSION := $(GIT_TAG:v%=% ) -$(GIT_BRANCH ) -$(GIT_HASH )
10+ BUILD_DATE := $(shell date)
1011
1112TARGETS := mcmitm_version.cpp mc_mitm
1213
1314all : $(TARGETS )
1415
1516mcmitm_version.cpp : .git/HEAD .git/index
16- echo " namespace ams::mitm { unsigned int mc_version = $( VERSION) ; const char *mc_build_name = \" $( BUILD_VERSION) \" ; const char *mc_build_date = \" $$ (date )\" ; }" > mc_mitm/source/$@
17+ echo " namespace ams::mitm { unsigned int mc_version = $( VERSION) ; const char *mc_build_name = \" $( BUILD_VERSION) \" ; const char *mc_build_date = \" $( BUILD_DATE ) \" ; }" > mc_mitm/source/$@
1718
1819mc_mitm :
1920 $(MAKE ) -C $@
You can’t perform that action at this time.
0 commit comments