This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 3ec12a8 Makefile.unix:versioning insure it is a .git dir
3ec12a8 is described below
commit 3ec12a84c29d549d3de1e077f05bfb07ff315de5
Author: David Sidrane <[email protected]>
AuthorDate: Wed Jun 17 13:12:54 2020 -0700
Makefile.unix:versioning insure it is a .git dir
An out-of-tree build may have a .git file that is from a
submodule. Once we find a .git file check if this is
really a working dir.
---
tools/Makefile.unix | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/Makefile.unix b/tools/Makefile.unix
index f21e0c2..ed2f20d 100644
--- a/tools/Makefile.unix
+++ b/tools/Makefile.unix
@@ -25,9 +25,13 @@ include $(TOPDIR)/Make.defs
GIT_DIR = $(if $(wildcard $(TOPDIR)$(DELIM).git),y,)
+ifeq ($(GIT_DIR),y)
+GIT_PRESENT = `git rev-parse --git-dir 2> /dev/null`
+endif
+
# In case we cannot get version information from GIT
-ifneq ($(GIT_DIR),y)
+ifneq ($(GIT_PRESENT),true)
-include $(TOPDIR)/.version
# In case the version file does not exist