diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-09-29 19:54:02 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-09-30 17:23:30 -0700 |
commit | 9f438b1bccca459e484560232e5b6e7dfdbacd61 (patch) | |
tree | b8984d62a6efc36754477d3e4b16ff9fc2eef827 /version.make | |
parent | 7f2a6be58f6c100a8784e5cbca884108160c0f48 (diff) | |
download | tmwa-9f438b1bccca459e484560232e5b6e7dfdbacd61.tar.gz tmwa-9f438b1bccca459e484560232e5b6e7dfdbacd61.tar.bz2 tmwa-9f438b1bccca459e484560232e5b6e7dfdbacd61.tar.xz tmwa-9f438b1bccca459e484560232e5b6e7dfdbacd61.zip |
Automatically generate version information
Diffstat (limited to 'version.make')
-rw-r--r-- | version.make | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/version.make b/version.make new file mode 100644 index 0000000..04ba9c3 --- /dev/null +++ b/version.make @@ -0,0 +1,17 @@ +# TODO replace this file in tarballs +# for now, only git builds will work. +VERSION_FULL := $(shell cd ${SRC_DIR}; git describe --tags HEAD) +VERSION_HASH := $(shell cd ${SRC_DIR}; git rev-parse HEAD) + +version_bits := $(subst v, ,$(subst -, ,$(subst ., ,${VERSION_FULL}))) +VERSION_MAJOR := $(word 1,${version_bits}) +VERSION_MINOR := $(word 2,${version_bits}) +VERSION_PATCH := $(word 3,${version_bits}) +VERSION_DEVEL := $(word 4,${version_bits}) +ifeq "${VERSION_DEVEL}" "" + VERSION_DEVEL := 0 +endif +VERSION_FULL += $(shell cd ${SRC_DIR}; git diff --quiet HEAD || echo dirty) + +VENDOR := Vanilla +VENDOR_VERSION := 0 |