Similar to a recent patch against Libtool, this gets program behavior updated to match GCS.
The autoconf.texi change doesn't actually make the bug reporting address be set from configure.ac, but a factored one is still better than repetitions. Committed to maint. Cheers, Ralf Update program --help output to match current GCS. * configure.ac: Set and substitute PACKAGE_URL if AC_PACKAGE_URL is not defined, for compatibility to Autoconf < 2.64. * Makefile.am (do_subst): Substitute PACKAGE_BUGREPORT and PACKAGE_URL. (sc_diff_automake_in_automake): Update number of diff lines for additional substitutions. * aclocal.in (usage): Use PACKAGE_BUGREPORT. Point to Automake home page and GNU general help page. * automake.in (usage): Likewise. * doc/automake.texi: New flag PACKAGE_BUGREPORT, to factor email address. (Introduction, Creating amhello, amhello Explained, Options): Use it throughout. * lib/Automake/Makefile.am (do_subst): Substitute PACKAGE_BUGREPORT. * lib/Automake/Config.in ($PACKAGE_BUGREPORT): New global. * lib/Automake/ChannelDefs.pm: Use it for footer of fatal messages. diff --git a/Makefile.am b/Makefile.am index bbcc882..3aead75 100644 --- a/Makefile.am +++ b/Makefile.am @@ -70,6 +70,8 @@ uninstall-hook: do_subst = sed \ -e 's,[...@]apiversion[@],$(APIVERSION),g' \ -e 's,[...@]package[@],$(PACKAGE),g' \ + -e 's,[...@]package_bugreport[@],$(PACKAGE_BUGREPORT),g' \ + -e 's,[...@]package_url[@],$(PACKAGE_URL),g' \ -e 's,[...@]path_separator[@],$(PATH_SEPARATOR),g' \ -e 's,[...@]perl[@],$(PERL),g' \ -e 's,[...@]perl_threads[@],$(PERL_THREADS),g' \ @@ -149,10 +151,10 @@ $(syntax_check_rules): automake aclocal maintainer-check: $(syntax_check_rules) ## This check avoids accidental configure substitutions in the source. -## There are exactly 6 lines that should be modified. This works out -## to 22 lines of diffs. +## There are exactly 8 lines that should be modified. This works out +## to 28 lines of diffs. sc_diff_automake_in_automake: - @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 22; then \ + @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 28; then \ echo "found too many diffs between automake.in and automake" 1>&2; \ diff -c $(srcdir)/automake.in automake; \ exit 1; \ diff --git a/aclocal.in b/aclocal.in index dc84762..b5c2c41 100644 --- a/aclocal.in +++ b/aclocal.in @@ -897,7 +897,10 @@ Warning categories include: `none' turn off all the warnings `error' treat warnings as errors -Report bugs to <bug-automa...@gnu.org>.\n"; +" . 'Report bugs to <@PACKAGE_BUGREPORT@>. +GNU Automake home page: <@PACKAGE_URL@>. +General help using GNU software: <http://www.gnu.org/gethelp/>. +'; exit $status; } diff --git a/automake.in b/automake.in index 3b67405..381202b 100755 --- a/automake.in +++ b/automake.in @@ -8378,7 +8378,11 @@ Library files: write; } - print "\nReport bugs to <bug-automa...@gnu.org>.\n"; + print ' +Report bugs to <@PACKAGE_BUGREPORT@>. +GNU Automake home page: <@PACKAGE_URL@>. +General help using GNU software: <http://www.gnu.org/gethelp/>. +'; # --help always returns 0 per GNU standards. exit 0; diff --git a/configure.ac b/configure.ac index 8592fbd..de4583d 100644 --- a/configure.ac +++ b/configure.ac @@ -18,6 +18,9 @@ AC_INIT([GNU Automake], [1.11], [bug-autom...@gnu.org]) +m4_ifndef([AC_PACKAGE_URL], + [AC_SUBST([PACKAGE_URL], [http://www.gnu.org/software/automake/])]) + AC_CONFIG_SRCDIR(automake.in) AC_CONFIG_AUX_DIR(lib) diff --git a/doc/automake.texi b/doc/automake.texi index 3517c3c..c6067f9 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -15,6 +15,8 @@ @r...@var{\varname\}@r{]} @end macro +...@set PACKAGE_BUGREPORT bug-automake@@gnu.org + @copying This manual is for GNU Automake (version @value{VERSION}, @@ -422,7 +424,7 @@ Introduction @cindex E-mail, bug reports Mail suggestions and bug reports for Automake to -...@email{bug-automake@@gnu.org}. +...@email{@value{PACKAGE_BUGREPORT}}. @node Autotools Introduction @chapter An Introduction to the Autotools @@ -1444,7 +1446,7 @@ Creating amhello @example ~/amhello % @kbd{cat configure.ac} -AC_INIT([amhello], [1.0], [bug-automake@@gnu.org]) +AC_INIT([amhello], [1.0], [...@value{package_bugreport}]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_PROG_CC AC_CONFIG_HEADERS([config.h]) @@ -1549,7 +1551,7 @@ amhello Explained Let us begin with the contents of @file{configure.ac}. @example -AC_INIT([amhello], [1.0], [bug-automake@@gnu.org]) +AC_INIT([amhello], [1.0], [...@value{package_bugreport}]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_PROG_CC AC_CONFIG_HEADERS([config.h]) @@ -1619,7 +1621,7 @@ amhello Explained @smallexample @dots{} /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "bug-automake@@gnu.org" +#define PACKAGE_BUGREPORT "@value{PACKAGE_BUGREPORT}" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "amhello 1.0" @@ -9287,7 +9289,7 @@ Options bytes long. So, in most cases the maximum file name length will be shorter than 256 characters. However you may run against broken tar implementations that incorrectly handle file names longer than 99 -characters (please report them to @email{bug-automake@@gnu.org} so we +characters (please report them to @ema...@value{package_bugreport}} so we can document this accurately). @option{tar-pax} selects the new pax interchange format defined by POSIX diff --git a/lib/Automake/ChannelDefs.pm b/lib/Automake/ChannelDefs.pm index a740603..eb208c3 100644 --- a/lib/Automake/ChannelDefs.pm +++ b/lib/Automake/ChannelDefs.pm @@ -1,4 +1,5 @@ -# Copyright (C) 2002, 2003, 2006, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2006, 2008, 2009, 2010 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 @@ -147,7 +148,7 @@ register_channel 'automake', type => 'fatal', backtrace => 1, header => ("####################\n" . "## Internal Error ##\n" . "####################\n"), - footer => "\nPlease contact <bug-automa...@gnu.org>.", + footer => "\nPlease contact <$PACKAGE_BUGREPORT>.", uniq_part => UP_NONE, ordered => 0; register_channel 'gnu', type => 'warning'; diff --git a/lib/Automake/Config.in b/lib/Automake/Config.in index 29a184f..7e87044 100644 --- a/lib/Automake/Config.in +++ b/lib/Automake/Config.in @@ -1,4 +1,5 @@ -# Copyright (C) 2003, 2004, 2008 Free Software Foundation, Inc. -*- Perl -*- +# -*- Perl -*- +# Copyright (C) 2003, 2004, 2008, 2010 Free Software Foundation, Inc. # @configure_input@ # This program is free software; you can redistribute it and/or modify @@ -21,12 +22,14 @@ use 5.006; require Exporter; our @ISA = qw (Exporter); -our @EXPORT = qw ($APIVERSION $PACKAGE $VERSION $libdir $perl_threads); +our @EXPORT = qw ($APIVERSION $PACKAGE $PACKAGE_BUGREPORT $VERSION $libdir + $perl_threads); # Parameters set by configure. Not to be changed. NOTE: assign # VERSION as string so that e.g. version 0.30 will print correctly. our $APIVERSION = '@APIVERSION@'; our $PACKAGE = '@PACKAGE@'; +our $PACKAGE_BUGREPORT = '@PACKAGE_BUGREPORT@'; our $VERSION = '@VERSION@'; our $libdir = '@datadir@/@pack...@-@APIVERSION@'; our $perl_threads = @PERL_THREADS@; diff --git a/lib/Automake/Makefile.am b/lib/Automake/Makefile.am index 3b9b863..0858b68 100644 --- a/lib/Automake/Makefile.am +++ b/lib/Automake/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to create Makefile.in -# Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009, 2010 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 @@ -52,6 +52,7 @@ CLEANFILES = $(nodist_perllib_DATA) do_subst = in=`echo $@ | sed 's/\.[^.]*$$//'`; sed \ -e 's,[...@]apiversion[@],$(APIVERSION),g' \ -e 's,[...@]package[@],$(PACKAGE),g' \ + -e 's,[...@]package_bugreport[@],$(PACKAGE_BUGREPORT),g' \ -e 's,[...@]perl[@],$(PERL),g' \ -e 's,[...@]perl_threads[@],$(PERL_THREADS),g' \ -e 's,[...@]shell[@],$(SHELL),g' \ diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in index 896bccf..e068ab8 100644 --- a/lib/Automake/Makefile.in +++ b/lib/Automake/Makefile.in @@ -15,8 +15,8 @@ @SET_MAKE@ -# Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009, 2010 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 @@ -254,6 +254,7 @@ CLEANFILES = $(nodist_perllib_DATA) do_subst = in=`echo $@ | sed 's/\.[^.]*$$//'`; sed \ -e 's,[...@]apiversion[@],$(APIVERSION),g' \ -e 's,[...@]package[@],$(PACKAGE),g' \ + -e 's,[...@]package_bugreport[@],$(PACKAGE_BUGREPORT),g' \ -e 's,[...@]perl[@],$(PERL),g' \ -e 's,[...@]perl_threads[@],$(PERL_THREADS),g' \ -e 's,[...@]shell[@],$(SHELL),g' \