Time/PeriodClock: rename get_now() to GetNow()
[xcsoar.git] / build / version.mk
blobf2e7d2cece1700ab0cb87532361e6de46c12412d
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)
12 endif
14 $(call SRC_TO_OBJ,$(SRC)/Version.cpp): $(topdir)/VERSION.txt