|
@@ -165,13 +165,17 @@ VERSION_PATCH = 0
|
165
|
165
|
EXTRAVERSION = +
|
166
|
166
|
MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
|
167
|
167
|
VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
|
|
168
|
+GITVERSION := $(shell git describe --always --abbrev=1 --match "" 2>/dev/null)
|
|
169
|
+ifneq ($(GITVERSION),)
|
|
170
|
+VERSION += ($(GITVERSION))
|
|
171
|
+endif
|
168
|
172
|
CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) \
|
169
|
173
|
-DVERSION_MINOR=$(VERSION_MINOR) \
|
170
|
174
|
-DVERSION_PATCH=$(VERSION_PATCH) \
|
171
|
|
- -DVERSION=\"$(VERSION)\"
|
|
175
|
+ -DVERSION="\"$(VERSION)\""
|
172
|
176
|
IDENT = '$(@F) $(VERSION) (GPL) ipxe.org'
|
173
|
177
|
version :
|
174
|
|
- @$(ECHO) $(VERSION)
|
|
178
|
+ @$(ECHO) "$(VERSION)"
|
175
|
179
|
|
176
|
180
|
###############################################################################
|
177
|
181
|
#
|