Make "gnulib-tool --version" work from any directory.
authorBruno Haible <bruno@clisp.org>
Fri, 26 Sep 2008 18:31:48 +0000 (20:31 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 26 Sep 2008 18:31:48 +0000 (20:31 +0200)
ChangeLog
gnulib-tool

index e393de1..0b7e5b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 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.
        Remove commas in output before splitting into words. No more need to
        avoid 'ftruncate' since 2007-02-19.
index 977587c..56b185a 100755 (executable)
@@ -216,7 +216,7 @@ q
     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