Browse Source

[build] Make version.o depend on the git index

The version number string is currently updated only if version.o
happens to be rebuilt due to changes in its dependencies.  Add a
dependency upon the git index, so that the version number is updated
after any checkout.

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Thomas Miletich 12 years ago
parent
commit
f68b4069b1
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      src/Makefile.housekeeping

+ 4
- 0
src/Makefile.housekeeping View File

659
 		  -DVERSION_MINOR=$(VERSION_MINOR) \
659
 		  -DVERSION_MINOR=$(VERSION_MINOR) \
660
 		  -DVERSION_PATCH=$(VERSION_PATCH) \
660
 		  -DVERSION_PATCH=$(VERSION_PATCH) \
661
 		  -DVERSION="\"$(VERSION)\""
661
 		  -DVERSION="\"$(VERSION)\""
662
+# Make sure the version number gets updated on every git checkout
663
+ifneq ($(GITVERSION),)
664
+$(BIN)/version.o : ../.git/index
665
+endif
662
 
666
 
663
 # We automatically generate rules for any file mentioned in AUTO_SRCS
667
 # We automatically generate rules for any file mentioned in AUTO_SRCS
664
 # using the following set of templates.  It would be cleaner to use
668
 # using the following set of templates.  It would be cleaner to use

Loading…
Cancel
Save