]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Improve formatting of git revision info
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 10 Jun 2010 07:53:24 +0000 (09:53 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 10 Jun 2010 07:53:24 +0000 (09:53 +0200)
configure.ac
dev.mk.in

index 151cf0af2338bbe0f4806aae591e06ea2f978260..3fc3e79e2f1d0a47bb1a4aa5636dacdf71563ba8 100644 (file)
@@ -290,7 +290,7 @@ cat config.h >>config.h.tmp
 echo '#endif' >>config.h.tmp
 mv config.h.tmp config.h
 
-version=`(git describe --dirty 2>/dev/null || echo vunknown) | cut -b 2-`
+version=`(git describe --dirty 2>/dev/null || echo vunknown) | sed -e 's/v//' -e 's/-/+/' -e 's/-/_/g'`
 echo "const char CCACHE_VERSION@<:@@:>@ = \"$version\";" >version.c
 
 mkdir -p .deps
index 37763a3f71172b420f2a5418e44f904795b896ba..7c936aec4c991f27006d9d6589c9cdb8e349dea0 100644 (file)
--- a/dev.mk.in
+++ b/dev.mk.in
@@ -8,7 +8,7 @@ XSLTPROC = xsltproc
 MANPAGE_XSL = /etc/asciidoc/docbook-xsl/manpage.xsl
 
 version := \
-    $(shell (git describe --dirty 2>/dev/null || echo vunknown) | cut -b 2-)
+    $(shell (git describe --dirty 2>/dev/null || echo vunknown) | sed -e 's/v//' -e 's/-/+/' -e 's/-/_/g')
 
 dist_dir = ccache-$(version)
 dist_archive_tar_bz2 = ccache-$(version).tar.bz2