diff options
author | Daniel Salzman <daniel.salzman@nic.cz> | 2018-03-14 15:28:22 +0100 |
---|---|---|
committer | Daniel Salzman <daniel.salzman@nic.cz> | 2018-03-14 15:28:22 +0100 |
commit | 36169ce86f07702fa8e8136579f08e0b10cd508f (patch) | |
tree | 762ed0d1d9fae2cc0e17727d4ec89ab4f3cfe059 /m4 | |
parent | Extend version format for better automation, remove redundant gnu-flavor files (diff) | |
download | knot-36169ce86f07702fa8e8136579f08e0b10cd508f.tar.xz knot-36169ce86f07702fa8e8136579f08e0b10cd508f.zip |
m4/knot-version: add prefixes to avoid macro name conflicts
Diffstat (limited to 'm4')
-rw-r--r-- | m4/knot-version.m4 | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/m4/knot-version.m4 b/m4/knot-version.m4 index fc4d16756..6e9158da9 100644 --- a/m4/knot-version.m4 +++ b/m4/knot-version.m4 @@ -10,14 +10,10 @@ # Example: 2.7.dev.1521027664.5e69ccc ################################################################################ -#m4_define([knot_VERSION_MAJOR], 2)dnl -#m4_define([knot_VERSION_MINOR], 7)dnl -#m4_define([knot_VERSION_PATCH], )dnl +m4_define([knot_PATCH], m4_ifblank(knot_VERSION_PATCH, [dev], knot_VERSION_PATCH))dnl +m4_define([knot_GIT_HASH], m4_esyscmd_s(git rev-parse --short HEAD 2>/dev/null))dnl +m4_define([knot_GIT_TAG], m4_esyscmd_s(git describe --exact-match 2>/dev/null))dnl +m4_define([knot_TIMESTAMP], m4_esyscmd_s(date -u +'%s' 2>/dev/null))dnl +m4_define([knot_GIT_INFO], m4_ifblank(knot_GIT_TAG, m4_ifnblank(knot_GIT_HASH, .knot_TIMESTAMP.knot_GIT_HASH, []), []))dnl -m4_define([PATCH], m4_ifblank(knot_VERSION_PATCH, [dev], knot_VERSION_PATCH))dnl -m4_define([GIT_HASH], m4_esyscmd_s(git rev-parse --short HEAD 2>/dev/null))dnl -m4_define([GIT_TAG], m4_esyscmd_s(git describe --exact-match 2>/dev/null))dnl -m4_define([TIMESTAMP], m4_esyscmd_s(date -u +'%s' 2>/dev/null))dnl -m4_define([GIT_INFO], m4_ifblank(GIT_TAG, m4_ifnblank(GIT_HASH, .TIMESTAMP.GIT_HASH, []), []))dnl - -m4_define([knot_PKG_VERSION], [knot_VERSION_MAJOR.knot_VERSION_MINOR.PATCH]GIT_INFO)dnl +m4_define([knot_PKG_VERSION], [knot_VERSION_MAJOR.knot_VERSION_MINOR.knot_PATCH]knot_GIT_INFO)dnl |