Browse Source

[build] Fix version.o dependency upon git index

Commit 8540300 ("[build] Disable ccache for all relevant build
targets") attempted to generalise the rule for $(BIN)/version.o to
$(BIN)/version.% in order to apply the dependency to all relevant
build targets (debug objects, assembly listings, etc).

This generalisation appears to work for the ccache override
directives, but seems to cause make (at least, GNU make 4.0) to simply
ignore the dependency upon the git index.

Since version.c contains only some string constants, there is unlikely
to be a substantive need for its debug objects, assembly listings,
etc.  Restore the previous form of the dependency and accept that
hypothetical builds with e.g. DEBUG=version will not be handled
correctly.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 10 years ago
parent
commit
d42901c4ad
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/Makefile.housekeeping

+ 1
- 1
src/Makefile.housekeeping View File

705
 		  -DVERSION="\"$(VERSION)\""
705
 		  -DVERSION="\"$(VERSION)\""
706
 # Make sure the version number gets updated on every git checkout
706
 # Make sure the version number gets updated on every git checkout
707
 ifneq ($(GITVERSION),)
707
 ifneq ($(GITVERSION),)
708
-$(BIN)/version.% : ../.git/index
708
+$(BIN)/version.o : ../.git/index
709
 endif
709
 endif
710
 
710
 
711
 # We automatically generate rules for any file mentioned in AUTO_SRCS
711
 # We automatically generate rules for any file mentioned in AUTO_SRCS

Loading…
Cancel
Save