Przeglądaj źródła

[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 11 lat temu
rodzic
commit
f68b4069b1
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4
    0
      src/Makefile.housekeeping

+ 4
- 0
src/Makefile.housekeeping Wyświetl plik

@@ -659,6 +659,10 @@ CFLAGS_version += -DVERSION_MAJOR=$(VERSION_MAJOR) \
659 659
 		  -DVERSION_MINOR=$(VERSION_MINOR) \
660 660
 		  -DVERSION_PATCH=$(VERSION_PATCH) \
661 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 667
 # We automatically generate rules for any file mentioned in AUTO_SRCS
664 668
 # using the following set of templates.  It would be cleaner to use

Ładowanie…
Anuluj
Zapisz