makefile: Add support for proper display of commit id when used as a submodule
This commit is contained in:
parent
0461008991
commit
e3f7a9b112
1 changed files with 6 additions and 0 deletions
6
makefile
6
makefile
|
@ -755,6 +755,12 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
|||
else
|
||||
ifeq (,$(shell grep 'define SIM_GIT_COMMIT_ID' sim_rev.h | grep 'Format:'))
|
||||
GIT_COMMIT_ID=$(shell grep 'define SIM_GIT_COMMIT_ID' sim_rev.h | awk '{ print $$3 }')
|
||||
else
|
||||
ifeq (git-submodule,$(shell if $(TEST) -d ../.git; then echo git-submodule; fi))
|
||||
ifeq (submodule,$(shell grep 'submodule "simh"' ../.gitmodules | awk 'BEGIN { FS = " " } ; { print $$1 }' | awk 'BEGIN { FS = "\[" } ; { print $$2 }'))
|
||||
GIT_COMMIT_ID=$(shell cd .. ; git submodule status | grep simh | awk '{ print $$1 }')
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue