From b8da93bee90a0f8ded1e3e4bd0440cc008e1a885 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 5 Nov 2007 08:31:51 +0100 Subject: [PATCH] Get git-version-gen from gnulib. * build-aux/git-version-gen: Remove file. * build-aux/.gitignore: Add git-version-gen. * bootstrap.conf (gnulib_modules): Add git-version-gen. --- ChangeLog | 7 +++ bootstrap.conf | 4 +- build-aux/.gitignore | 1 + build-aux/git-version-gen | 94 --------------------------------------- 4 files changed, 11 insertions(+), 95 deletions(-) delete mode 100755 build-aux/git-version-gen diff --git a/ChangeLog b/ChangeLog index 834cb9fe07..9e28c50ead 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-11-05 Jim Meyering + + Get git-version-gen from gnulib. + * build-aux/git-version-gen: Remove file. + * build-aux/.gitignore: Add git-version-gen. + * bootstrap.conf (gnulib_modules): Add git-version-gen. + 2007-11-03 Jim Meyering git-version-gen: Sync from autoconf's version. diff --git a/bootstrap.conf b/bootstrap.conf index 4445b6cf63..291e8a449f 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -53,7 +53,9 @@ gnulib_modules=" ftello fts getdate getgroups gethrxtime getline getloadavg getndelim2 getopt getpagesize getpass-gnu - gettext gettime gettimeofday getugroups getusershell gnupload + gettext gettime gettimeofday getugroups getusershell + git-version-gen + gnupload group-member hard-locale hash hash-pjw host-os human idcache inttostr inttypes isapipe lchmod lchown lib-ignore linebuffer link-follow diff --git a/build-aux/.gitignore b/build-aux/.gitignore index fc92044fde..35c787cf7c 100644 --- a/build-aux/.gitignore +++ b/build-aux/.gitignore @@ -4,6 +4,7 @@ config.guess config.rpath config.sub depcomp +git-version-gen gnupload install-sh link-warning.h diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen deleted file mode 100755 index a7e096832b..0000000000 --- a/build-aux/git-version-gen +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh -# Print a version string. -scriptversion=2007-11-03.22 - -# Copyright (C) 2007 Free Software Foundation -# -# 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 -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# 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 - 1) ;; - *) echo 1>&2 "Usage: $0 \$srcdir/.version"; exit 1;; -esac - -tarball_version_file=$1 -nl=' -' - -# First see if there is a tarball-only version file. -# then try git-describe, then default. -if test -f $tarball_version_file -then - v=`cat $tarball_version_file` || exit 1 - case $v in - *$nl*) v= ;; # reject multi-line output - [0-9]*) ;; - *) v= ;; - esac - test -z "$v" \ - && echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2 -fi - -if test -n "$v" -then - : # use $v -elif test -d .git \ - && v=`git describe --abbrev=4 HEAD 2>/dev/null` \ - && case $v in - # FIXME: remove this after v6.10. - COREUTILS-[0-9]*) v=`echo "$v" | sed 's/^COREUTILS-//;s/_/./g'` ;; - v[0-9]*) ;; - *) (exit 1) ;; - esac -then - # 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 - -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 - -dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty= -case "$dirty" in - '') ;; - *) # Append the suffix only if there isn't one already. - case $v in - *-dirty) ;; - *) v="$v-dirty" ;; - esac ;; -esac - -# Omit the trailing newline, so that m4_esyscmd can use the result directly. -echo "$v" | tr -d '\012' - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: -- 2.47.2