makefile: allow .git to be a file or directory to handle submodules
Change test for -e (exists) instead of -d (directory) so that the .git entry is detected correctly and git version stamp logic runs as in any other git repo. The .git entry is a file when the repo is a submodules and possibly other obscure cases like multiple worktrees. fixes #988
This commit is contained in:
parent
2911b3a440
commit
21117a2cb1
1 changed files with 1 additions and 1 deletions
2
makefile
2
makefile
|
@ -273,7 +273,7 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin)
|
||||||
OS_CCDEFS += -Wno-deprecated
|
OS_CCDEFS += -Wno-deprecated
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq (git-repo,$(shell if ${TEST} -d ./.git; then echo git-repo; fi))
|
ifeq (git-repo,$(shell if ${TEST} -e ./.git; then echo git-repo; fi))
|
||||||
GIT_PATH=$(strip $(shell which git))
|
GIT_PATH=$(strip $(shell which git))
|
||||||
ifeq (,$(GIT_PATH))
|
ifeq (,$(GIT_PATH))
|
||||||
$(error building using a git repository, but git is not available)
|
$(error building using a git repository, but git is not available)
|
||||||
|
|
Loading…
Add table
Reference in a new issue