summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rwxr-xr-xconfigure16
2 files changed, 19 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 76434c0..678ba2b 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ endif
VERSION = 0
PATCHLEVEL = 5
SUBLEVEL = 8
-EXTRAVERSION = -rc1+
+EXTRAVERSION = -rc1
NAME = Ziggomatic
TOOLS ?= $(CONFIG_TOOLS)
@@ -102,8 +102,8 @@ ifeq ("$(origin CROSS_LD_LIBRARY_PATH)", "command line")
LDFLAGS += -L$(CROSS_LD_LIBRARY_PATH)
endif
-VERSION_STRING = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
-VERSION_LONG = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)~$(NAME)
+VERSION_STRING = "$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(CONFIG_RC)"
+VERSION_LONG = "$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(CONFIG_RC) ($(NAME))"
export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION
export CROSS_COMPILE
diff --git a/configure b/configure
index 5e24313..15b2705 100755
--- a/configure
+++ b/configure
@@ -505,6 +505,21 @@ EOF
fi
}
+gen_version_appendix()
+{
+ local _appendix=""
+
+ git rev-parse > /dev/null 2>&1
+ if [ "$?" == "0" ] ; then
+ if [ ! "`git describe --always`" == \
+ "`git describe --abbrev=0 --tags`" ] ; then
+ _appendix="+"
+ fi
+ fi
+
+ echo "CONFIG_RC=\"$_appendix\"" >> Config
+}
+
gen_config_hdr()
{
local _version=""
@@ -583,6 +598,7 @@ check_libcli
check_libnet
gen_config_hdr
+gen_version_appendix
if [ "$MISSING_DEFS" == "1" ] ; then
echo "[!] Some libraries or header definitions are missing or too old."