mirror of
https://github.com/xcat2/xNBA.git
synced 2024-11-29 12:49:49 +00:00
[build] Include git commit within version string when available
Originally-implemented-by: Christian Hesse <list@eworm.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
b3b939c6ff
commit
348ec33aee
@ -165,13 +165,17 @@ VERSION_PATCH = 0
|
||||
EXTRAVERSION = +
|
||||
MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
|
||||
VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
|
||||
GITVERSION := $(shell git describe --always --abbrev=1 --match "" 2>/dev/null)
|
||||
ifneq ($(GITVERSION),)
|
||||
VERSION += ($(GITVERSION))
|
||||
endif
|
||||
CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) \
|
||||
-DVERSION_MINOR=$(VERSION_MINOR) \
|
||||
-DVERSION_PATCH=$(VERSION_PATCH) \
|
||||
-DVERSION=\"$(VERSION)\"
|
||||
-DVERSION="\"$(VERSION)\""
|
||||
IDENT = '$(@F) $(VERSION) (GPL) ipxe.org'
|
||||
version :
|
||||
@$(ECHO) $(VERSION)
|
||||
@$(ECHO) "$(VERSION)"
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user