From 433a31d3dc1831b9e0691b4de03cc7f975a63f8c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 22 Oct 2007 21:43:12 +0200 Subject: [PATCH] Remove git-version-gen's first parameter. * build-aux/git-version-gen: Add comments. Remove first command-line parameter. * configure.ac: Remove corresponding first argument. * GNUmakefile (_curr-ver): Likewise. --- ChangeLog | 8 ++++++++ GNUmakefile | 2 +- build-aux/git-version-gen | 14 +++++++++----- configure.ac | 2 +- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8915aec606..49e517491d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-10-22 Jim Meyering + + Remove git-version-gen's first parameter. + * build-aux/git-version-gen: Add comments. + Remove first command-line parameter. + * configure.ac: Remove corresponding first argument. + * GNUmakefile (_curr-ver): Likewise. + 2007-10-21 Jim Meyering * NEWS: Mention the printf fix. diff --git a/GNUmakefile b/GNUmakefile index c5678b43d0..e270e63797 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -45,7 +45,7 @@ include Makefile ifeq (0,$(MAKELEVEL)) _is-dist-target = $(filter dist% alpha beta major,$(MAKECMDGOALS)) ifneq (,$(_is-dist-target)) - _curr-ver := $(shell build-aux/git-version-gen 0 .version) + _curr-ver := $(shell build-aux/git-version-gen .version) ifneq ($(_curr-ver),$(VERSION)) $(info INFO: rerunning autoconf for new version string: $(_curr-ver)) dummy := $(shell rm -rf autom4te.cache; $(AUTOCONF)) diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen index a3e95aca6c..c433c262d2 100755 --- a/build-aux/git-version-gen +++ b/build-aux/git-version-gen @@ -1,14 +1,18 @@ #!/bin/sh # Print a version string. # 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 +# 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 .version". case $# in - 2) ;; - *) echo 1>&2 "Usage: $0 \$VERSION \$srcdir/.version"; exit 1;; + 1) ;; + *) echo 1>&2 "Usage: $0 \$srcdir/.version"; exit 1;; esac -default_version=$1 -tarball_version_file=$2 +tarball_version_file=$1 nl=' ' @@ -41,7 +45,7 @@ then # Remove the "g" in git-describe's output string. v=`echo "$v" | sed 's/\(.*\)-g/\1-/'`; else - v=$default_version + v=UNKNOWN fi v=`echo "$v" |sed 's/^v//'` diff --git a/configure.ac b/configure.ac index d97e44e23d..a685c9532f 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ AC_PREREQ(2.61) # Make inter-release version strings look like, e.g., v6.9-219-g58ddd, which # indicates that it is built from the 219th delta (in _some_ repository) # following the v6.9 tag, and that 58ddd is a prefix of the commit SHA1. -AC_INIT([GNU coreutils], m4_esyscmd([build-aux/git-version-gen 6.9+ .version]), +AC_INIT([GNU coreutils], m4_esyscmd([build-aux/git-version-gen .version]), [bug-coreutils@gnu.org]) AC_CONFIG_SRCDIR(src/ls.c) -- 2.47.2