From 9b72d6688f5a1897db8f9d1fb85f3a9c77046bd8 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sat, 26 Jun 2010 22:10:21 +0200 Subject: [PATCH] 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. Signed-off-by: Ralf Wildenhues --- ChangeLog | 20 ++++++++++++++++++++ Makefile.am | 8 +++++--- Makefile.in | 4 +++- aclocal.in | 5 ++++- automake.in | 6 +++++- configure | 2 ++ configure.ac | 3 +++ doc/automake.texi | 12 +++++++----- lib/Automake/ChannelDefs.pm | 5 +++-- lib/Automake/Config.in | 7 +++++-- lib/Automake/Makefile.am | 5 +++-- lib/Automake/Makefile.in | 5 +++-- 12 files changed, 63 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57f008990..a5efdc2e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,25 @@ 2010-06-26 Ralf Wildenhues + 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. + Clean up @var handling in the manual. * doc/automake.texi: Throughout the manual, lower-case @var names, replace a few one-character names. diff --git a/Makefile.am b/Makefile.am index bbcc882c6..3aead7500 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/Makefile.in b/Makefile.in index e9a032bd5..528b80e9e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -255,6 +255,8 @@ EXTRA_DIST = \ 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' \ @@ -873,7 +875,7 @@ $(syntax_check_rules): automake aclocal maintainer-check: $(syntax_check_rules) 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 dc8476294..b5c2c4155 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 .\n"; +" . 'Report bugs to <@PACKAGE_BUGREPORT@>. +GNU Automake home page: <@PACKAGE_URL@>. +General help using GNU software: . +'; exit $status; } diff --git a/automake.in b/automake.in index 3b67405a0..381202b46 100755 --- a/automake.in +++ b/automake.in @@ -8378,7 +8378,11 @@ Library files: write; } - print "\nReport bugs to .\n"; + print ' +Report bugs to <@PACKAGE_BUGREPORT@>. +GNU Automake home page: <@PACKAGE_URL@>. +General help using GNU software: . +'; # --help always returns 0 per GNU standards. exit 0; diff --git a/configure b/configure index 51287f525..cdfa840a6 100755 --- a/configure +++ b/configure @@ -1691,6 +1691,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ac_aux_dir= for ac_dir in lib "$srcdir"/lib; do for ac_t in install-sh install.sh shtool; do diff --git a/configure.ac b/configure.ac index 8592fbdf8..de4583d67 100644 --- a/configure.ac +++ b/configure.ac @@ -18,6 +18,9 @@ AC_INIT([GNU Automake], [1.11], [bug-automake@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 3517c3ca8..c6067f970 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 @@ to be built. @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 @@ create the @command{configure} script. @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 @@ direct you to the right manual when seeking answers. 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 @@ is an excerpt of @file{config.h} after @command{configure} has run: @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 @@ directory separator in two parts, first of them being at most 155 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 @email{@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 a740603c5..eb208c3b2 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 .", + 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 29a184fbf..7e8704446 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@/@PACKAGE@-@APIVERSION@'; our $perl_threads = @PERL_THREADS@; diff --git a/lib/Automake/Makefile.am b/lib/Automake/Makefile.am index 3b9b86329..0858b6875 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 896bccfa9..e068ab883 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' \ -- 2.47.2