]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Check if git index actually exists
authorPeter Lemenkov <lemenkov@gmail.com>
Mon, 16 Jun 2014 12:35:23 +0000 (13:35 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 16 Jun 2014 12:35:52 +0000 (13:35 +0100)
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>
src/Makefile.housekeeping

index 33283b18cbbca3230e7b022646a2b4a285aa0211..f7755369cee84ddfcf16173018908f907f3b47b6 100644 (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