From 5abab09d43a50bea8d5644fbc2fac0ddd3d100ea Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sun, 11 Feb 2018 19:07:51 +0100 Subject: [PATCH] =?utf8?q?Fix=20printing=20of=20version=20number=20in=20?= =?utf8?q?=E2=80=9Cccache=20--version=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Closes #225. --- .gitignore | 2 +- configure.ac | 2 +- dev.mk.in | 10 +++++----- doc/NEWS.txt | 10 ++++++++++ 4 files changed, 17 insertions(+), 7 deletions(-) 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 -- 2.47.2