diff options
author | Jim Meyering <meyering@redhat.com> | 2008-02-27 23:11:21 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-03-03 00:24:36 +0100 |
commit | a016e88bcdcabe947bfb9dea474df5fbe2081b65 (patch) | |
tree | 5d7d7efb19e0d5f9b90fde1885a4553aa93e6d37 | |
parent | 8ce402193819b366f1a8a9bdf2185a67e5959b2d (diff) | |
download | idutils-a016e88bcdcabe947bfb9dea474df5fbe2081b65.tar.gz idutils-a016e88bcdcabe947bfb9dea474df5fbe2081b65.tar.bz2 idutils-a016e88bcdcabe947bfb9dea474df5fbe2081b65.zip |
Update .tarball-version-related rules from coreutils.
* GNUmakefile: Support VPATH "make dist". Namespace clean-up.
Remove .version-creating rules.
* configure.ac (AC_INIT): Use .tarball-version, not .version
* bootstrap: Update from coreutils.
* bootstrap.conf (obsolete_gnulib_modules): Remove free.
* Makefile.am: Emit .tarball-version into tarball.
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | GNUmakefile | 14 | ||||
-rw-r--r-- | Makefile.am | 15 | ||||
-rwxr-xr-x | bootstrap | 30 | ||||
-rw-r--r-- | bootstrap.conf | 2 | ||||
-rw-r--r-- | configure.ac | 2 |
6 files changed, 48 insertions, 17 deletions
@@ -2,7 +2,7 @@ */.deps *~ .gdb-history -.version +.tarball-version ABOUT-NLS ChangeLog INSTALL diff --git a/GNUmakefile b/GNUmakefile index 3dc6f15..ff5de94 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -4,7 +4,7 @@ # It is necessary if you want to build targets usually of interest # only to the maintainer. -# Copyright (C) 2001, 2003, 2006-2007 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2006-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 @@ -29,26 +29,30 @@ else SHELL = sh endif -have-Makefile := $(shell test -f Makefile && echo yes) +_have-Makefile := $(shell test -f Makefile && echo yes) # If the user runs GNU make but has not yet run ./configure, # give them a diagnostic. -ifeq ($(have-Makefile),yes) +ifeq ($(_have-Makefile),yes) # Make tar archive easier to reproduce. export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner include Makefile +_curr-ver := $(VERSION) + # Ensure that $(VERSION) is up to date for dist-related targets, but not # for others: running autoreconf and recompiling everything isn't cheap. ifeq (0,$(MAKELEVEL)) _is-dist-target = $(filter dist% alpha beta major,$(MAKECMDGOALS)) ifneq (,$(_is-dist-target)) - _curr-ver := $(shell build-aux/git-version-gen .version) + _curr-ver := $(shell cd $(srcdir) && ./build-aux/git-version-gen \ + $(srcdir)/.tarball-version) ifneq ($(_curr-ver),$(VERSION)) $(info INFO: running autoreconf for new version string: $(_curr-ver)) - dummy := $(shell rm -rf autom4te.cache; autoreconf) + _dummy := $(shell rm -rf autom4te.cache; (cd $(srcdir) && autoreconf)) + _created_version_file = 1 endif endif endif diff --git a/Makefile.am b/Makefile.am index aeeefec..c759c59 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,10 +13,19 @@ EXTRA_DIST = \ bootstrap.conf \ build-aux/vc-list-files -dist-hook: +gen_start_date = 2008-01-01 +.PHONY: gen-ChangeLog +gen-ChangeLog: if test -d .git; then \ - $(top_srcdir)/build-aux/gitlog-to-changelog --since=2008-01-01 \ - > $(distdir)/cl-t; \ + $(top_srcdir)/build-aux/gitlog-to-changelog \ + --since=$(gen_start_date) > $(distdir)/cl-t; \ rm -f $(distdir)/ChangeLog; \ mv $(distdir)/cl-t $(distdir)/ChangeLog; \ fi + +# Arrange so that .tarball-version appears only in the distribution +# tarball, and never in a checked-out repository. +# The perl substitution is to change some key uses of "rm" to "/bin/rm". +# See the rm_subst comment for details. +dist-hook: gen-ChangeLog + echo $(VERSION) > $(distdir)/.tarball-version @@ -96,6 +96,11 @@ package=`sed -n "$extract_package_name" configure.ac` || exit gnulib_name=lib$package build_aux=build-aux +source_base=lib +m4_base=m4 +doc_base=doc +tests_base=tests + # Extra files from gnulib, which override files from other sources. gnulib_extra_files=" $build_aux/install-sh @@ -121,6 +126,9 @@ XGETTEXT_OPTIONS='\\\ --flag=error:3:c-format --flag=error_at_line:5:c-format\\\ ' +# Package bug report address for gettext files +MSGID_BUGS_ADDRESS=bug-$package@gnu.org + # Files we don't want to import. excluded_files= @@ -406,7 +414,7 @@ version_controlled_file() { grep -F "/$file/" $dir/CVS/Entries 2>/dev/null | grep '^/[^/]*/[0-9]' > /dev/null && found=yes elif test -d .git; then - git-rm -n "$dir/$file" > /dev/null 2>&1 && found=yes + git rm -n "$dir/$file" > /dev/null 2>&1 && found=yes else echo "$0: no version control for $dir/$file?" >&2 fi @@ -488,11 +496,11 @@ gnulib_tool_options="\ --import\ --no-changelog\ --aux-dir $bt/$build_aux\ - --doc-base $bt/doc\ + --doc-base $bt/$doc_base\ --lib $gnulib_name\ - --m4-base $bt/m4/\ - --source-base $bt/lib/\ - --tests-base $bt/tests\ + --m4-base $bt/$m4_base/\ + --source-base $bt/$source_base/\ + --tests-base $bt/$tests_base\ --local-dir $local_gl_dir\ $gnulib_tool_option_extras\ " @@ -538,6 +546,16 @@ if test -f $mam_template; then done fi +# Remove any dangling symlink matching "*.m4" in the gnulib-populated +# $m4_base directory, since such a file would cause aclocal to fail. +# The following requires GNU find 4.2.3 or newer. Considering the usual +# portability constraints of this script, that may seem a very demanding +# requirement, but it should be ok. Ignore any failure, which is fine, +# since this is only a convenience to help developers avoid the relatively +# unusual case in which a symlinked-to .m4 file is git-removed from gnulib +# between successive runs of this script. +find "$m4_base" -name '*.m4' -depth -type l -xtype l -delete > /dev/null 2>&1 + # Horrible, kludges. # Change paths in gnulib-tests/gnulib.mk from "../.." to "..". # This must be done before running automake. @@ -580,7 +598,7 @@ if test $with_gettext = yes; then rm -f po/Makevars sed ' /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/ - /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/ + /^MSGID_BUGS_ADDRESS *=/s/=.*/= '"$MSGID_BUGS_ADDRESS"'/ /^XGETTEXT_OPTIONS *=/{ s/$/ \\/ a\ diff --git a/bootstrap.conf b/bootstrap.conf index 311bc98..5da594f 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -28,7 +28,7 @@ avoided_gnulib_modules=' # These modules are obsolete and can probably be removed soon, # but leave them in for now to minimize changes. obsolete_gnulib_modules=' - atexit free memchr memcmp memcpy memmove memset rename + atexit memchr memcmp memcpy memmove memset rename strcspn strtod strtol utime ' diff --git a/configure.ac b/configure.ac index d01ec7c..a4fcb35 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT([idutils], m4_esyscmd([build-aux/git-version-gen .version]), +AC_INIT([idutils], m4_esyscmd([build-aux/git-version-gen .tarball-version]), [bug-idutils@gnu.org]) AC_CONFIG_AUX_DIR(build-aux) |