Makefile.inc: allow coreboot to be a git submodule

When coreboot is pulled in as a submodule, the .git "folder" is a file,
not a folder.  Use the '-e' test instead of '-d' to allow for that.

Without this change, build.h will contain:
#define COREBOOT_VERSION "coreboot-unknown"

Change-Id: Ia141371cc892a0817d3566dc37ed0401675ad8d8
Signed-off-by: Ben Gardner <gardner.ben@gmail.com>
Reviewed-on: https://review.coreboot.org/13061
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
This commit is contained in:
Ben Gardner 2016-01-20 10:17:38 -06:00 committed by Martin Roth
parent bdaa1b5a72
commit 48c232c1da
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@
## GNU General Public License for more details.
##
GIT:=$(shell [ -d "$(top)/.git" ] && command -v git)
GIT:=$(shell [ -e "$(top)/.git" ] && command -v git)
#######################################################################
# normalize Kconfig variables in a central place