2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-11-28 20:29:19 +00:00

[build] Check if git index actually exists

If iPXE is used as a git submodule then the ../.git/index file will
not exist, and the build will fail.  Fix by checking that the git
index file exists before adding it as a build dependency.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Peter Lemenkov 2014-06-16 13:35:23 +01:00 committed by Michael Brown
parent 7fe0735170
commit 1639978f5a

View File

@ -705,8 +705,10 @@ CFLAGS_version += -DVERSION_MAJOR=$(VERSION_MAJOR) \
-DVERSION="\"$(VERSION)\""
# Make sure the version number gets updated on every git checkout
ifneq ($(GITVERSION),)
ifneq ($(wildcard ../.git/index),)
$(BIN)/version.o : ../.git/index
endif
endif
# We automatically generate rules for any file mentioned in AUTO_SRCS
# using the following set of templates. We use $(eval ...) if