Eric Blake <ebb9@xxxxxxx> wrote: > According to Ralf Wildenhues on 11/3/2007 10:28 AM: >> * Jim Meyering wrote on Sat, Nov 03, 2007 at 08:45:43AM CET: >>> An alternative is to change the format of the version string, like >>> git does. s/-/./g. They also prepend an alpha ('g') to the SHA1 part. >> >> A small data point: I recall Debian disliking '-' in version strings at >> one point in time, because they like to append their own package version >> with one or more hyphens. Dunno how much that matters any more or at >> all, or if other distros do similar. > > True, but since actual distribution tarballs exclude the SHA1 part, and > git snapshots aren't really meant for distros, I see no conflict between > distros that use '-' and undistributed snapshots that use '-'. I've done as proposed to coreutils. Anyone object to doing it to automake? 2007-11-03 Jim Meyering <meyering@xxxxxxxxxx> Change the first '-' to '.' in the snapshot version string, e.g., 6.9-377-08144 -> 6.9.377-08144 * build-aux/git-version-gen: ... and add comments. diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen index c433c26..4e8ffc6 100755 --- a/build-aux/git-version-gen +++ b/build-aux/git-version-gen @@ -42,8 +42,9 @@ elif test -d .git \ *) (exit 1) ;; esac then - # Remove the "g" in git-describe's output string. - v=`echo "$v" | sed 's/\(.*\)-g/\1-/'`; + # Change the first '-' to a '.', so version-comparing tools work properly. + # Remove the "g" in git-describe's output string, to save a byte. + v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; else v=UNKNOWN fi -- 1.5.3.5.529.ge3d6d _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf