diff options
author | Thomas Miletich | 2012-11-02 16:00:09 +0100 |
---|---|---|
committer | Michael Brown | 2012-11-02 16:00:09 +0100 |
commit | f68b4069b1aeeeff3cef33659efd001125adcb26 (patch) | |
tree | f3edc4ec03ba11c59b2ec0b9703ff2a534a0b235 /src | |
parent | [build] Include version number within only a single object file (diff) | |
download | ipxe-f68b4069b1aeeeff3cef33659efd001125adcb26.tar.gz ipxe-f68b4069b1aeeeff3cef33659efd001125adcb26.tar.xz ipxe-f68b4069b1aeeeff3cef33659efd001125adcb26.zip |
[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>
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.housekeeping | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping index f607c4d3..d40f226f 100644 --- a/src/Makefile.housekeeping +++ b/src/Makefile.housekeeping @@ -659,6 +659,10 @@ CFLAGS_version += -DVERSION_MAJOR=$(VERSION_MAJOR) \ -DVERSION_MINOR=$(VERSION_MINOR) \ -DVERSION_PATCH=$(VERSION_PATCH) \ -DVERSION="\"$(VERSION)\"" +# Make sure the version number gets updated on every git checkout +ifneq ($(GITVERSION),) +$(BIN)/version.o : ../.git/index +endif # We automatically generate rules for any file mentioned in AUTO_SRCS # using the following set of templates. It would be cleaner to use |