Skip to content

Commit

Permalink
[build] Make version.o depend on the git index
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
thomil authored and mcb30 committed Nov 2, 2012
1 parent 4867085 commit f68b406
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Makefile.housekeeping
Expand Up @@ -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
Expand Down

0 comments on commit f68b406

Please sign in to comment.