1 VERSION
= $(strip $(shell cat
$(topdir
)/VERSION.txt
))
2 FULL_VERSION
= $(VERSION
)
4 CPPFLAGS
+= -DXCSOAR_VERSION
=\"$(VERSION
)\"
6 GIT_COMMIT_ID
:= $(shell git rev-parse
--short
--verify HEAD
2>/dev
/null
)
7 RELEASE_COMMIT_ID
:= $(shell git rev-parse
--short
--verify
"v$(VERSION)" 2>/dev
/null
)
8 # only append the commit id for unreleased builds (no release tag)
9 ifneq ($(GIT_COMMIT_ID
),$(RELEASE_COMMIT_ID
))
10 CPPFLAGS
+= -DGIT_COMMIT_ID
=\"$(GIT_COMMIT_ID
)\"
11 FULL_VERSION
:= $(FULL_VERSION
)~
$(GIT_COMMIT_ID
)
14 $(call SRC_TO_OBJ
,$(SRC
)/Version.
cpp): $(topdir
)/VERSION.txt