Parcourir la 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 il y a 10 ans
Parent
révision
1639978f5a
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2
    0
      src/Makefile.housekeeping

+ 2
- 0
src/Makefile.housekeeping Voir le fichier

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

Chargement…
Annuler
Enregistrer