summaryrefslogtreecommitdiffstats
path: root/src/Makefile.housekeeping
diff options
context:
space:
mode:
authorPeter Lemenkov2014-06-16 14:35:23 +0200
committerMichael Brown2014-06-16 14:35:52 +0200
commit1639978f5a3ed821eeb752f81af0093884384de4 (patch)
treead6854302477b27c911f70bb1d6a9cbac71110c6 /src/Makefile.housekeeping
parent[smbios] Expose board serial number as ${board-serial} (diff)
downloadipxe-1639978f5a3ed821eeb752f81af0093884384de4.tar.gz
ipxe-1639978f5a3ed821eeb752f81af0093884384de4.tar.xz
ipxe-1639978f5a3ed821eeb752f81af0093884384de4.zip
[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>
Diffstat (limited to 'src/Makefile.housekeeping')
-rw-r--r--src/Makefile.housekeeping2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
index 33283b18..f7755369 100644
--- a/src/Makefile.housekeeping
+++ b/src/Makefile.housekeeping
@@ -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