changeset 30186:c77350457755

Make "gnulib-tool --version" work from any directory.
author Bruno Haible <bruno@clisp.org>
date Fri, 26 Sep 2008 20:31:48 +0200
parents 0b34cc3587f2
children 74714af7b913
files ChangeLog gnulib-tool
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Sep 26 20:13:32 2008 +0200
+++ b/ChangeLog	Fri Sep 26 20:31:48 2008 +0200
@@ -1,3 +1,8 @@
+2008-09-26  Bruno Haible  <bruno@clisp.org>
+
+	* gnulib-tool (func_version): Change directory to $gnulib_dir before
+	invoking git-version-gen.
+
 2008-09-26  Bruno Haible  <bruno@clisp.org>
 
 	* posix-modules: Update to directory names changed on 2008-01-19.
--- a/gnulib-tool	Fri Sep 26 20:13:32 2008 +0200
+++ b/gnulib-tool	Fri Sep 26 20:31:48 2008 +0200
@@ -216,7 +216,7 @@
     date=`echo "$date" | sed -e "$sed_year_before_time"`
     # Use GNU date to compute the time in GMT.
     date=`date -d "$date" -u +"%Y-%m-%d %H:%M:%S"`
-    version=' '`"$gnulib_dir"/build-aux/git-version-gen /dev/null | sed -e 's/-dirty/-modified/'`
+    version=' '`cd "$gnulib_dir" && ./build-aux/git-version-gen /dev/null | sed -e 's/-dirty/-modified/'`
   else
     if test -d "$gnulib_dir"/CVS \
        && (cvs --version) >/dev/null 2>/dev/null; then