autoconf-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Autoconf source repository branch, master, updated. v2.61a-360


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.61a-360-gbf39a65
Date: Thu, 21 Feb 2008 14:56:28 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=bf39a653c670fdc167f1ff08e5cfbaf9f1422b70

The branch, master has been updated
       via  bf39a653c670fdc167f1ff08e5cfbaf9f1422b70 (commit)
      from  49ffd6c9c13b0df14df1c42d56eaecac6bb246c2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bf39a653c670fdc167f1ff08e5cfbaf9f1422b70
Author: Eric Blake <address@hidden>
Date:   Thu Feb 21 07:55:13 2008 -0700

    Sync git-version-gen from upstream.
    
    * build-aux/git-version-gen: Pull from gnulib.
    * configure.ac (AC_INIT): Adjust to new calling convention.
    
    Signed-off-by: Eric Blake <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                 |    6 ++++++
 build-aux/git-version-gen |   42 +++++++++++++++++++++++++++++-------------
 configure.ac              |    4 ++--
 3 files changed, 37 insertions(+), 15 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8fe8873..fc0183b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-02-21  Eric Blake  <address@hidden>
+
+       Sync git-version-gen from upstream.
+       * build-aux/git-version-gen: Pull from gnulib.
+       * configure.ac (AC_INIT): Adjust to new calling convention.
+
 2008-02-12  Eric Blake  <address@hidden>
 
        Avoid trailing space in config.h with AC_DEFINE([var], []).
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index 20c759e..1a00107 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Print a version string.
-scriptversion=2007-11-11.19
+scriptversion=2008-02-08.11
 
 # Copyright (C) 2007 Free Software Foundation
 #
@@ -21,26 +21,25 @@ scriptversion=2007-11-11.19
 
 # This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
 # It may be run two ways:
-# - from a git repository in which the git-describe command below
+# - from a git repository in which the "git describe" command below
 #   produces useful output (thus requiring at least one signed tag)
 # - from a non-git-repo directory containing a .version file, which
-#   presumes this script is invoked like "./git-version-gen $srcdir .version".
+#   presumes this script is invoked like "./git-version-gen .tarball-version".
 
 case $# in
-    2) ;;
-    *) echo 1>&2 "Usage: $0 \$srcdir .version"; exit 1;;
+    1) ;;
+    *) echo 1>&2 "Usage: $0 \$srcdir/.version"; exit 1;;
 esac
 
-srcdir=$1
-tarball_version_file=$srcdir/$2
+tarball_version_file=$1
 nl='
 '
 
 # First see if there is a tarball-only version file.
-# then try git-describe, then default.
+# then try "git describe", then default.
 if test -f $tarball_version_file
 then
-    v=`cat "$tarball_version_file"` || exit 1
+    v=`cat $tarball_version_file` || exit 1
     case $v in
        *$nl*) v= ;; # reject multi-line output
        [0-9]*) ;;
@@ -53,15 +52,32 @@ fi
 if test -n "$v"
 then
     : # use $v
-elif test -d "$srcdir/.git" \
-    && v=`git --git-dir="$srcdir/.git" describe --abbrev=4 HEAD 2>/dev/null` \
+elif test -d .git \
+    && v=`git describe --abbrev=4 HEAD 2>/dev/null` \
     && case $v in
         v[0-9]*) ;;
         *) (exit 1) ;;
        esac
 then
+    # Is this a new git that lists number of commits since the last
+    # tag or the previous older version that did not?
+    #   Newer: v6.10-77-g0f8faeb
+    #   Older: v6.10-g0f8faeb
+    case $v in
+       *-*-*) : git describe is okay three part flavor ;;
+       *-*)
+           : git describe is older two part flavor
+           # Recreate the number of commits and rewrite such that the
+           # result is the same as if we were using the newer version
+           # of git describe.
+           vtag=`echo "$v" | sed 's/-.*//'`
+           numcommits=`git rev-list "$vtag"..HEAD | wc -l`
+           v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`;
+           ;;
+    esac
+
     # Change the first '-' to a '.', so version-comparing tools work properly.
-    # Remove the "g" in git-describe's output string, to save a byte.
+    # Remove the "g" in git describe's output string, to save a byte.
     v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
 else
     v=UNKNOWN
@@ -70,7 +86,7 @@ fi
 v=`echo "$v" |sed 's/^v//'`
 
 # Don't declare a version "dirty" merely because a time stamp has changed.
-git-status > /dev/null 2>&1
+git status > /dev/null 2>&1
 
 dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
 case "$dirty" in
diff --git a/configure.ac b/configure.ac
index cfd8643..caff001 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 # Copyright (C) 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2003,
-# 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
 # We need AC_CONFIG_TESTDIR, AC_PROG_SED, AC_PROG_GREP.
 AC_PREREQ([2.60])
 
-AC_INIT([GNU Autoconf], m4_esyscmd([build-aux/git-version-gen . .version]),
+AC_INIT([GNU Autoconf], m4_esyscmd([build-aux/git-version-gen .version]),
        address@hidden)
 AC_SUBST([PACKAGE_NAME])dnl
 AC_CONFIG_SRCDIR([ChangeLog])


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

[Prev in Thread] Current Thread [Next in Thread]