Browse Source

[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>
tags/v1.20.1
Peter Lemenkov 10 years ago
parent
commit
1639978f5a
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      src/Makefile.housekeeping

+ 2
- 0
src/Makefile.housekeeping View File

705
 		  -DVERSION="\"$(VERSION)\""
705
 		  -DVERSION="\"$(VERSION)\""
706
 # Make sure the version number gets updated on every git checkout
706
 # Make sure the version number gets updated on every git checkout
707
 ifneq ($(GITVERSION),)
707
 ifneq ($(GITVERSION),)
708
+ifneq ($(wildcard ../.git/index),)
708
 $(BIN)/version.o : ../.git/index
709
 $(BIN)/version.o : ../.git/index
709
 endif
710
 endif
711
+endif
710
 
712
 
711
 # We automatically generate rules for any file mentioned in AUTO_SRCS
713
 # We automatically generate rules for any file mentioned in AUTO_SRCS
712
 # using the following set of templates.  We use $(eval ...) if
714
 # using the following set of templates.  We use $(eval ...) if

Loading…
Cancel
Save