From: Joel Rosdahl Date: Sun, 11 Feb 2018 18:07:51 +0000 (+0100) Subject: Fix printing of version number in “ccache --version” X-Git-Tag: v3.4.1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5abab09d43a50bea8d5644fbc2fac0ddd3d100ea;p=thirdparty%2Fccache.git Fix printing of version number in “ccache --version” Closes #225. --- diff --git a/.gitignore b/.gitignore index a9b952462..2d45219ee 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,7 @@ configure dev.mk dev_mode_disabled perfdir.* +src/version.c testdir.* unittest/run unittest/suites.h -version.c diff --git a/configure.ac b/configure.ac index d055b9e41..26ad4bb9e 100644 --- a/configure.ac +++ b/configure.ac @@ -161,7 +161,7 @@ if test ! -f $srcdir/dev_mode_disabled && test "$RUN_FROM_BUILD_FARM" != yes; th AC_CONFIG_FILES([dev.mk]) include_dev_mk='include dev.mk' version=`(git --git-dir=$srcdir/.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 + echo "const char CCACHE_VERSION@<:@@:>@ = \"$version\";" >src/version.c else AC_MSG_NOTICE(Developer mode disabled) fi diff --git a/dev.mk.in b/dev.mk.in index 6a20c9e95..c75837efc 100644 --- a/dev.mk.in +++ b/dev.mk.in @@ -51,8 +51,8 @@ headers = \ unittest/util.h files_to_clean += *.tar.bz2 *.tar.gz *.tar.xz *.xml .deps/* perfdir.* -files_to_distclean += $(built_dist_files) version.c unittest/suites.h -files_to_distclean += .deps version.c dev.mk +files_to_distclean += $(built_dist_files) src/version.c unittest/suites.h +files_to_distclean += .deps dev.mk source_dist_files = \ $(base_sources) \ @@ -95,10 +95,10 @@ uncrustify_exclude_files = \ src/hashtable_itr.c \ src/snprintf.c -ifneq ($(shell sed 's/.*"\(.*\)".*/\1/' version.c 2>/dev/null),$(version)) - $(shell echo 'const char CCACHE_VERSION[] = "$(version)";' >version.c) +ifneq ($(shell sed 's/.*"\(.*\)".*/\1/' src/version.c 2>/dev/null),$(version)) + $(shell echo 'const char CCACHE_VERSION[] = "$(version)";' >src/version.c) endif -version.o: version.c +src/version.o: src/version.c %_lookup.c: %.gperf $(GPERF) $< | awk '/#ifdef __GNUC__/ { ++i; if (i == 2) { print "static"; }} {print}' >$@ diff --git a/doc/NEWS.txt b/doc/NEWS.txt index 617610736..2fd9255d0 100644 --- a/doc/NEWS.txt +++ b/doc/NEWS.txt @@ -1,6 +1,16 @@ ccache news =========== +ccache 3.4.1 +------------ +Unreleased + +Bug fixes +~~~~~~~~~ + +- Fixed printing of version number in `ccache --version`. + + ccache 3.4 ---------- Release date: 2018-02-11