From: Eric Blake Date: Tue, 8 Apr 2008 18:12:53 +0000 (-0600) Subject: Overhaul inter-version releases to work with git. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=0b8410450c789102f46f2ee21aaeb304737e828b;p=m4.git Overhaul inter-version releases to work with git. * configure.ac (version): New variable, which has nicer version contents when using git 1.5.5+, hardcoded to 1.9a otherwise. (TIMESTAMP): Delete, since CVS id expansion died with transition to git. (AM_INIT_AUTOMAKE): Use version to decide gnu vs. gnits. * build-aux/mkstamp: Delete, no longer used. * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Kill, to speed up rebuilds when timestamps don't matter. (MKSTAMP): Delete, no longer used. (EXTRA_DIST): No longer worry about mkstamp. (.version): New rule and distributed file. (doc/m4.1, tests/package.m4): Depend on .version, not configure.ac, for timestamp. * ltdl/m4/gnulib-cache.m4: Import git-version-gen module. * modules/gnu.c (__m4_version__): TIMESTAMP no longer exists. * src/main.c (main): Likewise. Signed-off-by: Eric Blake --- diff --git a/.cvsignore b/.cvsignore index 4f6a6be4..c83be604 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,9 +1,12 @@ .git .patch_number +.tarball-version +.version ABOUT-NLS aclocal.m4 aclocal.m4t autom4te.cache +build-aux config.cache config.h config-h.in diff --git a/.gitignore b/.gitignore index 2f710ab5..9077a31d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,10 +3,13 @@ .patch_number *.orig *.rej +.tarball-version +.version ABOUT-NLS aclocal.m4 aclocal.m4t autom4te.cache +build-aux config.cache config.h config-h.in diff --git a/ChangeLog b/ChangeLog index 7c3e1747..32593ea0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2008年04月08日 Eric Blake + + Overhaul inter-version releases to work with git. + * configure.ac (version): New variable, which has nicer version + contents when using git 1.5.5+, hardcoded to 1.9a otherwise. + (TIMESTAMP): Delete, since CVS id expansion died with transition + to git. + (AM_INIT_AUTOMAKE): Use version to decide gnu vs. gnits. + * build-aux/mkstamp: Delete, no longer used. + * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Kill, to speed up + rebuilds when timestamps don't matter. + (MKSTAMP): Delete, no longer used. + (EXTRA_DIST): No longer worry about mkstamp. + (.version): New rule and distributed file. + (doc/m4.1, tests/package.m4): Depend on .version, not + configure.ac, for timestamp. + * ltdl/m4/gnulib-cache.m4: Import git-version-gen module. + * modules/gnu.c (__m4_version__): TIMESTAMP no longer exists. + * src/main.c (main): Likewise. + 2008年03月28日 Eric Blake Use GNUmakefile module. @@ -10575,8 +10595,6 @@ ----- - $Revision$ $Date$ - Local Variables: coding: utf-8 End: diff --git a/Makefile.am b/Makefile.am index ac0279d6..9ae81890 100644 --- a/Makefile.am +++ b/Makefile.am @@ -50,22 +50,23 @@ EXTRA_LTLIBRARIES= # Include Libtool's rules. include ltdl/Makefile.inc -# Additional configuration. +# Additional configuration. Version management comes from suggestions +# given in build-aux/git-version-gen. AM_CPPFLAGS += -Ignu -I$(srcdir)/gnu \ -Im4 -I$(srcdir)/m4 -EXTRA_DIST += bootstrap \ - $(config_aux_dir)/mkstamp \ +EXTRA_DIST += bootstrap .version \ $(config_macro_dir)/gnulib-cache.m4 +BUILT_SOURCES += .version +.version: + echo $(VERSION)> $@-t && mv $@-t $@ +dist-hook: dist-tarball-version +dist-tarball-version: + echo $(VERSION)> $(distdir)/.tarball-version MAINTAINERCLEANFILES = \ ABOUT-NLS COPYING INSTALL Makefile.in aclocal.m4 \ config-h.in configure stamp-h.in \ po/cat-id-tbl.c po/m4.pot po/stamp-cat-id -MKSTAMP = $(SHELL) $(srcdir)/$(config_aux_dir)/mkstamp - -# Make sure config.status is regenerated when the version timestamp changes -CONFIG_STATUS_DEPENDENCIES = ChangeLog - ## ------- ## ## GNU M4. ## @@ -259,7 +260,7 @@ HELP2MAN = $(SHELL) $(srcdir)/$(config_aux_dir)/missing --run help2man # Build the man page once in the srcdir, rather than in every VPATH build # dir, to match how automake builds info pages. This is safe for 'make # distcheck' since it is distributed pre-built. -$(srcdir)/doc/m4.1: configure.ac src/main.c +$(srcdir)/doc/m4.1: .version src/main.c @if test -f src/m4$(EXEEXT); then \ echo "Updating the \`man' page \`$@'"; \ $(HELP2MAN) --name="macro processor" --source=FSF \ @@ -395,7 +396,7 @@ $(TESTSUITE): tests/package.m4 $(TESTSUITE_AT) mv $@.tmp $@ # The leading :; works around a bug in {}>f in some bash versions. -$(srcdir)/tests/package.m4: configure.ac +$(srcdir)/tests/package.m4: .version :; \ { \ echo '# Signature of the current package.'; \ diff --git a/build-aux/.cvsignore b/build-aux/.cvsignore deleted file mode 100644 index 6da574fc..00000000 --- a/build-aux/.cvsignore +++ /dev/null @@ -1,13 +0,0 @@ -compile -config.* -config.rpath -depcomp -gendocs.sh -gnupload -install-sh -link-warning.h -ltmain.sh -mdate-sh -missing -mkinstalldirs -texinfo.tex diff --git a/build-aux/.gitignore b/build-aux/.gitignore deleted file mode 100644 index 6da574fc..00000000 --- a/build-aux/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -compile -config.* -config.rpath -depcomp -gendocs.sh -gnupload -install-sh -link-warning.h -ltmain.sh -mdate-sh -missing -mkinstalldirs -texinfo.tex diff --git a/build-aux/mkstamp b/build-aux/mkstamp deleted file mode 100755 index 3e81c96c..00000000 --- a/build-aux/mkstamp +++ /dev/null @@ -1,38 +0,0 @@ -#! /bin/sh - -# mkstamp - extract data from Revision and Date RCS tags in a file -# Copyright (C) 1999, 2003, 2007 Free Software Foundation, Inc. -# Alexandre Oliva -# -# This file is part of GNU M4. -# -# GNU M4 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 of the License, or -# (at your option) any later version. -# -# GNU M4 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, see . -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This script expects to find a line containing both Revision and Date -# tags, and it edits this line so that it looks like ` $rev $date' - -# Command-line arguments are passed down to sed; additional -e cmd -# arguments are acceptable. If no input filename is specified in the -# command line, sed will read from stdin. - -exec sed -e ' - s%.*\$''Revision: \([^$]*\) \$.*\$''Date: \([^$]*\) \$.*% 1円 2円% - t end - d - : end' ${1+"$@"} diff --git a/configure.ac b/configure.ac index 589c4b13..fdac14da 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,9 @@ AC_PREREQ([2.61a.347]) ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## -AC_INIT([GNU M4], [1.9a], [bug-m4@gnu.org]) +m4_define([version], m4_esyscmd([build-aux/git-version-gen .tarball-version])) +m4_bmatch(m4_defn([version]), [^[0-9]], [], [m4_define([version], [1.9a])]) +AC_INIT([GNU M4], m4_defn([version]), [bug-m4@gnu.org]) AC_CONFIG_SRCDIR([src/m4.h]) AC_CONFIG_AUX_DIR([build-aux]) @@ -33,21 +35,6 @@ AC_CONFIG_TESTDIR([tests]) AC_CONFIG_HEADERS([gnu/config.h:gnu/config.hin]) AC_CONFIG_FILES([tests/m4], [chmod +x tests/m4]) - -## ---------------------------------------- ## -## Display a configure time version banner. ## -## ---------------------------------------- ## -TIMESTAMP= -case AC_PACKAGE_VERSION in - *[[acegikmoqsuwy]]) - TIMESTAMP=`$CONFIG_SHELL $ac_aux_dir/mkstamp < $srcdir/ChangeLog` - test -z "$TIMESTAMP" || TIMESTAMP=" Build:$TIMESTAMP" - AS_BOX([Configuring AC_PACKAGE_TARNAME][$TIMESTAMP AC_PACKAGE_VERSION]) - echo - ;; -esac -AC_DEFINE_UNQUOTED([TIMESTAMP], ["$TIMESTAMP"], - [Defined to a CVS timestamp for alpha releases of M4]) AB_INIT() @@ -67,7 +54,8 @@ M4_default_preload="M4_DEFAULT_PRELOAD" ## ------------------------ ## ## Automake Initialization. ## ## ------------------------ ## -AM_INIT_AUTOMAKE([1.10.1 subdir-objects dist-bzip2 dist-lzma gnits]) +AM_INIT_AUTOMAKE([1.10.1 subdir-objects dist-bzip2 dist-lzma] +m4_bmatch(m4_defn([version]), [-], [gnu], [gnits])) diff --git a/ltdl/m4/gnulib-cache.m4 b/ltdl/m4/gnulib-cache.m4 index 2a2a6dde..0e122acb 100644 --- a/ltdl/m4/gnulib-cache.m4 +++ b/ltdl/m4/gnulib-cache.m4 @@ -15,11 +15,11 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --local-dir=local --lib=libgnu --source-base=gnu --m4-base=ltdl/m4 --doc-base=doc --aux-dir=build-aux --with-tests --libtool --macro-prefix=M4 assert autobuild avltree-oset binary-io clean-temp cloexec close-stream closein config-h configmake dirname error exit fdl fflush filenamecat flexmember fopen-safer fseeko gendocs gettext gnumakefile gnupload gpl-3.0 intprops memmem mkstemp obstack progname quote regex regexprops-generic sprintf-posix stdbool stdlib-safer strnlen strtod strtol tempname unlocked-io vasnprintf-posix verror xalloc xalloc-die xprintf-posix xstrndup xvasprintf-posix +# gnulib-tool --import --dir=. --local-dir=local --lib=libgnu --source-base=gnu --m4-base=ltdl/m4 --doc-base=doc --aux-dir=build-aux --with-tests --libtool --macro-prefix=M4 assert autobuild avltree-oset binary-io clean-temp cloexec close-stream closein config-h configmake dirname error exit fdl fflush filenamecat flexmember fopen-safer fseeko gendocs gettext git-version-gen gnumakefile gnupload gpl-3.0 intprops memmem mkstemp obstack progname quote regex regexprops-generic sprintf-posix stdbool stdlib-safer strnlen strtod strtol tempname unlocked-io vasnprintf-posix verror xalloc xalloc-die xprintf-posix xstrndup xvasprintf-posix # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([local]) -gl_MODULES([assert autobuild avltree-oset binary-io clean-temp cloexec close-stream closein config-h configmake dirname error exit fdl fflush filenamecat flexmember fopen-safer fseeko gendocs gettext gnumakefile gnupload gpl-3.0 intprops memmem mkstemp obstack progname quote regex regexprops-generic sprintf-posix stdbool stdlib-safer strnlen strtod strtol tempname unlocked-io vasnprintf-posix verror xalloc xalloc-die xprintf-posix xstrndup xvasprintf-posix]) +gl_MODULES([assert autobuild avltree-oset binary-io clean-temp cloexec close-stream closein config-h configmake dirname error exit fdl fflush filenamecat flexmember fopen-safer fseeko gendocs gettext git-version-gen gnumakefile gnupload gpl-3.0 intprops memmem mkstemp obstack progname quote regex regexprops-generic sprintf-posix stdbool stdlib-safer strnlen strtod strtol tempname unlocked-io vasnprintf-posix verror xalloc xalloc-die xprintf-posix xstrndup xvasprintf-posix]) gl_AVOID([]) gl_SOURCE_BASE([gnu]) gl_M4_BASE([ltdl/m4]) diff --git a/modules/gnu.c b/modules/gnu.c index 53099682..1cf4a600 100644 --- a/modules/gnu.c +++ b/modules/gnu.c @@ -93,7 +93,7 @@ m4_macro m4_macro_table[] = # warning Platform macro not provided #endif { "__gnu__", "", 0, 0 }, - { "__m4_version__", VERSION/**/TIMESTAMP, 0, 0 }, + { "__m4_version__", VERSION,0, 0 }, { NULL, NULL, 0, 0 }, }; diff --git a/src/main.c b/src/main.c index b06a893f..86f21e76 100644 --- a/src/main.c +++ b/src/main.c @@ -592,8 +592,7 @@ main (int argc, char *const *argv, char *const *envp) break; case VERSION_OPTION: - version_etc (stdout, PACKAGE, PACKAGE_NAME TIMESTAMP, - VERSION, AUTHORS, NULL); + version_etc (stdout, PACKAGE, PACKAGE_NAME, VERSION, AUTHORS, NULL); exit (EXIT_SUCCESS); break;

AltStyle によって変換されたページ (->オリジナル) /