[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/3] maint: resync files from upstream
From: |
Eric Blake |
Subject: |
[PATCH 1/3] maint: resync files from upstream |
Date: |
Thu, 1 Mar 2012 21:47:03 -0700 |
* GNUmakefile: Resync via 'make fetch'.
* build-aux/config.guess: Likewise.
* build-aux/config.sub: Likewise.
* build-aux/texinfo.tex: Likewise.
* build-aux/update-copyright: Likewise.
* doc/standards.texi: Likewise.
* lib/Autom4te/Channels.pm: Likewise.
* lib/Autom4te/Configure_ac.pm: Likewise.
* lib/Autom4te/FileUtils.pm: Likewise.
* lib/Autom4te/Getopt.pm: Likewise.
* lib/Autom4te/Struct.pm: Likewise.
* lib/Autom4te/XFile.pm: Likewise.
* maint.mk: Likewise.
Signed-off-by: Eric Blake <address@hidden>
---
GNUmakefile | 14 +---
build-aux/config.guess | 16 +++-
build-aux/config.sub | 19 +++--
build-aux/texinfo.tex | 181 +++++++++++++++++++++++++++--------------
build-aux/update-copyright | 13 +++-
doc/standards.texi | 6 +-
lib/Autom4te/Channels.pm | 11 +--
lib/Autom4te/Configure_ac.pm | 9 +-
lib/Autom4te/FileUtils.pm | 17 ++--
lib/Autom4te/Getopt.pm | 8 +-
lib/Autom4te/Struct.pm | 5 +-
lib/Autom4te/XFile.pm | 17 ++--
maint.mk | 67 ++++++++++------
13 files changed, 234 insertions(+), 149 deletions(-)
diff --git a/GNUmakefile b/GNUmakefile
index d0fd3e8..58f2ead 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -20,20 +20,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Systems where /bin/sh is not the default shell need this. The $(shell)
-# command below won't work with e.g. stock DOS/Windows shells.
-ifeq ($(wildcard /bin/s[h]),/bin/sh)
-SHELL = /bin/sh
-else
-# will be used only with the next shell-test line, then overwritten
-# by a configured-in value
-SHELL = sh
-endif
-
# If the user runs GNU make but has not yet run ./configure,
# give them a diagnostic.
-_have-Makefile := $(shell test -f Makefile && echo yes)
-ifeq ($(_have-Makefile),yes)
+_gl-Makefile := $(wildcard [M]akefile)
+ifneq ($(_gl-Makefile),)
# Make tar archive easier to reproduce.
export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
diff --git a/build-aux/config.guess b/build-aux/config.guess
index 49ba16f..d622a44 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2012-01-01'
+timestamp='2012-02-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -17,9 +17,7 @@ timestamp='2012-01-01'
# 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.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -863,6 +861,13 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@@ -1320,6 +1325,9 @@ EOF
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
diff --git a/build-aux/config.sub b/build-aux/config.sub
index d6b6b3c..c894da4 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2012-01-01'
+timestamp='2012-02-10'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -21,9 +21,7 @@ timestamp='2012-01-01'
# 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.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -132,6 +130,10 @@ case $maybe_os in
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
@@ -247,6 +249,7 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
+ | aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] |
alpha64pca5[67] \
| am33_2.0 \
@@ -319,7 +322,7 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -332,7 +335,10 @@ case $basic_machine in
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
-
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
xscaleeb)
basic_machine=armeb-unknown
;;
@@ -355,6 +361,7 @@ case $basic_machine in
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
+ | aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex
index f91cd5e..bee50a8 100644
--- a/build-aux/texinfo.tex
+++ b/build-aux/texinfo.tex
@@ -3,11 +3,11 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2012-01-04.16}
+\def\texinfoversion{2012-02-28.16}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+% 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
%
% This texinfo.tex file is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
@@ -887,7 +887,7 @@ where each line of input produces a line of output.}
\def\popthisfilestack{\errthisfilestackempty}
\def\errthisfilestackempty{\errmessage{Internal error:
the stack of filenames is empty.}}
-
+%
\def\thisfile{}
% @center line
@@ -895,36 +895,46 @@ where each line of input produces a line of output.}
%
\parseargdef\center{%
\ifhmode
- \let\next\centerH
+ \let\centersub\centerH
\else
- \let\next\centerV
+ \let\centersub\centerV
\fi
- \next{\hfil \ignorespaces#1\unskip \hfil}%
+ \centersub{\hfil \ignorespaces#1\unskip \hfil}%
+ \let\centersub\relax % don't let the definition persist, just in case
}
-\def\centerH#1{%
- {%
- \hfil\break
- \advance\hsize by -\leftskip
- \advance\hsize by -\rightskip
- \line{#1}%
- \break
- }%
+\def\centerH#1{{%
+ \hfil\break
+ \advance\hsize by -\leftskip
+ \advance\hsize by -\rightskip
+ \line{#1}%
+ \break
+}}
+%
+\newcount\centerpenalty
+\def\centerV#1{%
+ % The idea here is the same as in \startdefun, \cartouche, etc.: if
+ % @center is the first thing after a section heading, we need to wipe
+ % out the negative parskip inserted by \sectionheading, but still
+ % prevent a page break here.
+ \centerpenalty = \lastpenalty
+ \ifnum\centerpenalty>10000 \vskip\parskip \fi
+ \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi
+ \line{\kern\leftskip #1\kern\rightskip}%
}
-\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}}
% @sp n outputs n lines of vertical space
-
+%
\parseargdef\sp{\vskip #1\baselineskip}
% @comment ...line which is ignored...
% @c is the same as @comment
% @ignore ... @end ignore is another way to write a comment
-
+%
\def\comment{\begingroup \catcode`\^^M=\other%
address@hidden \catcode`\{=\other \catcode`\}=\other%
\commentxxx}
{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
-
+%
\let\c=\comment
% @paragraphindent NCHARS
@@ -1173,8 +1183,8 @@ output) for that.)}
%
% #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
\def\dopdfimage#1#2#3{%
- \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
- \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
+ \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
+ \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
%
% pdftex (and the PDF format) support .pdf, .png, .jpg (among
% others). Let's try in that order, PDF first since if
@@ -1212,8 +1222,8 @@ output) for that.)}
\else
\immediate\pdfximage
\fi
- \ifdim \wd0 >0pt width \imagewidth \fi
- \ifdim \wd2 >0pt height \imageheight \fi
+ \ifdim \wd0 >0pt width \pdfimagewidth \fi
+ \ifdim \wd2 >0pt height \pdfimageheight \fi
\ifnum\pdftexversion<13
#1.\pdfimgext
\else
@@ -4732,10 +4742,9 @@ end
%
% ..., ready, GO:
%
-\def\safewhatsit#1{%
-\ifhmode
+\def\safewhatsit#1{\ifhmode
#1%
-\else
+ \else
% \lastskip and \lastpenalty cannot both be nonzero simultaneously.
\whatsitskip = \lastskip
\edef\lastskipmacro{\the\lastskip}%
@@ -4759,7 +4768,6 @@ end
% to re-insert the same penalty (values >10000 are used for various
% signals); since we just inserted a non-discardable item, any
% following glue (such as a \parskip) would be a breakpoint. For example:
- %
% @deffn deffn-whatever
% @vindex index-whatever
% Description.
@@ -4772,8 +4780,7 @@ end
% (the whatsit from the \write), so we must insert a \nobreak.
\nobreak\vskip\whatsitskip
\fi
-\fi
-}
+\fi}
% The index entry written in the file actually looks like
% \entry {sortstring}{page}{topic}
@@ -5876,14 +5883,15 @@ end
%
% We'll almost certainly start a paragraph next, so don't let that
% glue accumulate. (Not a breakpoint because it's preceded by a
- % discardable item.)
+ % discardable item.) However, when a paragraph is not started next
+ % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out
+ % or the negative glue will cause weirdly wrong output, typically
+ % obscuring the section heading with something else.
\vskip-\parskip
%
- % This is purely so the last item on the list is a known \penalty >
- % 10000. This is so \startdefun can avoid allowing breakpoints after
- % section headings. Otherwise, it would insert a valid breakpoint between:
- % @section sec-whatever
- % @deffn def-whatever
+ % This is so the last item on the main vertical list is a known
+ % \penalty > 10000, so \startdefun, etc., can recognize the situation
+ % and do the needful.
\penalty 10001
}
@@ -6303,7 +6311,7 @@ end
% If this cartouche directly follows a sectioning command, we need the
% \parskip glue (backspaced over by default) or the cartouche can
% collide with the section heading.
- \ifnum\lastpenalty>10000 \vskip\parskip \fi
+ \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
%
\vbox\bgroup
\baselineskip=0pt\parskip=0pt\lineskip=0pt
@@ -7802,26 +7810,36 @@ end
\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
\def\ref#1{\xrefX[#1,,,,,,,]}
+%
+\newbox\topbox
+\newbox\printedrefnamebox
+\newbox\printedmanualbox
+%
\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
\unsepspaces
- \def\printedmanual{\ignorespaces #5}%
+ %
\def\printedrefname{\ignorespaces #3}%
- \setbox1=\hbox{\printedmanual\unskip}%
- \setbox0=\hbox{\printedrefname\unskip}%
- \ifdim \wd0 = 0pt
+ \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}%
+ %
+ \def\printedmanual{\ignorespaces #5}%
+ \setbox\printedmanualbox = \hbox{\printedmanual\unskip}%
+ %
+ % If the printed reference name (arg #3) was not explicitly given in
+ % the @xref, figure out what we want to use.
+ \ifdim \wd\printedrefnamebox = 0pt
% No printed node name was explicitly given.
\expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
- % Use the node name inside the square brackets.
+ % Not auto section-title: use node name inside the square brackets.
\def\printedrefname{\ignorespaces #1}%
\else
- % Use the actual chapter/section title appear inside
- % the square brackets. Use the real section title if we have it.
- \ifdim \wd1 > 0pt
- % It is in another manual, so we don't have it.
+ % Auto section-title: use chapter/section title inside
+ % the square brackets if we have it.
+ \ifdim \wd\printedmanualbox > 0pt
+ % It is in another manual, so we don't have it; use node name.
\def\printedrefname{\ignorespaces #1}%
\else
\ifhavexrefs
- % We know the real title if we have the xref values.
+ % We (should) know the real title if we have the xref values.
\def\printedrefname{\refx{#1-title}{}}%
\else
% Otherwise just copy the Info node name.
@@ -7867,7 +7885,7 @@ end
\iffloat\Xthisreftitle
% If the user specified the print name (third arg) to the ref,
% print it instead of our usual "Figure 1.2".
- \ifdim\wd0 = 0pt
+ \ifdim\wd\printedrefnamebox = 0pt
\refx{#1-snt}{}%
\else
\printedrefname
@@ -7875,21 +7893,46 @@ end
%
% if the user also gave the printed manual name (fifth arg), append
% "in MANUALNAME".
- \ifdim \wd1 > 0pt
+ \ifdim \wd\printedmanualbox > 0pt
\space \putwordin{} \cite{\printedmanual}%
\fi
\else
% node/anchor (non-float) references.
- %
- % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
- % insert empty discretionaries after hyphens, which means that it will
- % not find a line break at a hyphen in a node names. Since some manuals
- % are best written with fairly long node names, containing hyphens, this
- % is a loss. Therefore, we give the text of the node name again, so it
- % is as if TeX is seeing it for the first time.
- \ifdim \wd1 > 0pt
- \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}%
+ %
+ % If we use \unhbox to print the node names, TeX does not insert
+ % empty discretionaries after hyphens, which means that it will not
+ % find a line break at a hyphen in a node names. Since some manuals
+ % are best written with fairly long node names, containing hyphens,
+ % this is a loss. Therefore, we give the text of the node name
+ % again, so it is as if TeX is seeing it for the first time.
+ %
+ % Cross-manual reference. Only include the "Section ``foo'' in" if
+ % the foo is neither missing or Top. Thus, @xref{,,,foo,The Foo Manual}
+ % outputs simply "see The Foo Manual".
+ \ifdim \wd\printedmanualbox > 0pt
+ % What is the 7sp about? The idea is that we also want to omit
+ % the Section part if we would be printing "Top", since they are
+ % clearly trying to refer to the whole manual. But, this being
+ % TeX, we can't easily compare strings while ignoring the possible
+ % spaces before and after in the input. By adding the arbitrary
+ % 7sp, we make it much less likely that a real node name would
+ % happen to have the same width as "Top" (e.g., in a monospaced font).
+ % I hope it will never happen in practice.
+ %
+ % For the same basic reason, we retypeset the "Top" at every
+ % reference, since the current font is indeterminate.
+ %
+ \setbox\topbox = \hbox{Top\kern7sp}%
+ \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
+ \ifdim \wd2 > 7sp
+ \ifdim \wd2 = \wd\topbox \else
+ \putwordSection{} ``\printedrefname'' \putwordin{}\space
+ \fi
+ \fi
+ \cite{\printedmanual}%
\else
+ % Reference in this manual.
+ %
% _ (for example) has to be the character _ for the purposes of the
% control sequence corresponding to the node, but it has to expand
% into the usual \leavevmode...\vrule stuff for purposes of
@@ -7901,7 +7944,7 @@ end
\setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
\ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
}%
- % output the `[mynode]' via a macro so it can be overridden.
+ % output the `[mynode]' via the macro below so it can be overridden.
\xrefprintnodename\printedrefname
%
% But we always want a comma and a space:
@@ -8281,7 +8324,7 @@ end
it from ftp://tug.org/tex/epsf.tex.}
%
\def\image#1{%
- \ifx\epsfbox\thisiundefined
+ \ifx\epsfbox\thisisundefined
\ifwarnednoepsf \else
\errhelp = \noepsfhelp
\errmessage{epsf.tex not found, images will be ignored}%
@@ -8305,6 +8348,13 @@ end
% If the image is by itself, center it.
\ifvmode
\imagevmodetrue
+ \else \ifx\centersub\centerV
+ % for @center @image, we need a vbox so we can have our vertical space
+ \imagevmodetrue
+ \vbox\bgroup % vbox has better behavior than vtop herev
+ \fi\fi
+ %
+ \ifimagevmode
\nobreak\medskip
% Usually we'll have text after the image which will insert
% \parskip glue, so insert it here too to equalize the space
@@ -8314,9 +8364,13 @@ end
\fi
%
% Leave vertical mode so that indentation from an enclosing
- % environment such as @quotation is respected. On the other hand, if
- % it's at the top level, we don't want the normal paragraph indentation.
- \noindent
+ % environment such as @quotation is respected.
+ % However, if we're at the top level, we don't want the
+ % normal paragraph indentation.
+ % On the other hand, if we are in the case of @center @image, we don't
+ % want to start a paragraph, which will create a hsize-width box and
+ % eradicate the centering.
+ \ifx\centersub\centerV\else \noindent \fi
%
% Output the image.
\ifpdf
@@ -8328,7 +8382,10 @@ end
\epsfbox{#1.eps}%
\fi
%
- \ifimagevmode \medskip \fi % space after the standalone image
+ \ifimagevmode
+ \medskip % space after a standalone image
+ \fi
+ \ifx\centersub\centerV \egroup \fi
\endgroup}
diff --git a/build-aux/update-copyright b/build-aux/update-copyright
index d86a12b..082b749 100755
--- a/build-aux/update-copyright
+++ b/build-aux/update-copyright
@@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0"
${1+"$@"}'
if 0;
# Update an FSF copyright year list to include the current year.
-my $VERSION = '2011-01-02.20:59'; # UTC
+my $VERSION = '2012-02-05.21:39'; # UTC
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
#
@@ -24,7 +24,7 @@ my $VERSION = '2011-01-02.20:59'; # UTC
# The arguments to this script should be names of files that contain
# copyright statements to be updated. The copyright holder's name
-# defaults to "Free Softward Foundation, Inc." but may be changed to
+# defaults to "Free Software Foundation, Inc." but may be changed to
# any other name by using the "UPDATE_COPYRIGHT_HOLDER" environment
# variable.
#
@@ -43,7 +43,7 @@ my $VERSION = '2011-01-02.20:59'; # UTC
# A warning is printed for every file for which no copyright
# statement is recognized.
#
-# Each file's copyright statement must be formated correctly in
+# Each file's copyright statement must be formatted correctly in
# order to be recognized. For example, each of these is fine:
#
# Copyright @copyright{} 1990-2005, 2007-2009 Free Software
@@ -110,6 +110,9 @@ my $VERSION = '2011-01-02.20:59'; # UTC
# interval (such as 1990-2008). If unset or set to 0, all existing
# copyright year intervals in a reformatted FSF copyright statement
# are expanded instead.
+# If UPDATE_COPYRIGHT_USE_INTERVALS=2, convert a sequence with gaps
+# to the minimal containing range. For example, convert
+# 2000, 2004-2007, 2009 to 2000-2009.
# 3. For testing purposes, you can set the assumed current year in
# UPDATE_COPYRIGHT_YEAR.
# 4. The default maximum line length for a copyright line is 72.
@@ -221,6 +224,10 @@ if (defined $stmt_re)
}))
)+
/$1-$3/gx;
+
+ # When it's 2, emit a single range encompassing all year numbers.
+ $ENV{UPDATE_COPYRIGHT_USE_INTERVALS} == 2
+ and $stmt =~ s/\b(\d{4})\b.*\b(\d{4})\b/$1-$2/;
}
# Format within margin.
diff --git a/doc/standards.texi b/doc/standards.texi
index 642a4ff..4ba9426 100644
--- a/doc/standards.texi
+++ b/doc/standards.texi
@@ -3,7 +3,7 @@
@setfilename standards.info
@settitle GNU Coding Standards
@c This date is automagically updated when you save this file:
address@hidden lastupdate January 21, 2012
address@hidden lastupdate February 5, 2012
@c %**end of header
@dircategory GNU organization
@@ -472,7 +472,7 @@ Standard C
@example
/* Declare the prototype for a general external function. */
-#if defined __STDC__ || defined WINDOWSNT
+#if defined (__STDC__) || defined (WINDOWSNT)
#define P_(proto) proto
#else
#define P_(proto) ()
@@ -998,7 +998,7 @@ --version
each on a separate line.
Next should follow a line stating the license, preferably using one of
-abbrevations below, and a brief statement that the program is free
+abbreviations below, and a brief statement that the program is free
software, and that users are free to copy and change it. Also mention
that there is no warranty, to the extent permitted by law. See
recommended wording below.
diff --git a/lib/Autom4te/Channels.pm b/lib/Autom4te/Channels.pm
index 1f668b1..d62a3f0 100644
--- a/lib/Autom4te/Channels.pm
+++ b/lib/Autom4te/Channels.pm
@@ -1,5 +1,4 @@
-# Copyright (C) 2002, 2004, 2006, 2008, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2002-2012 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
@@ -36,7 +35,7 @@ Autom4te::Channels - support functions for error and warning
management
register_channel 'system', type => 'error', exit_code => 4;
# Output a message on channel 'unused'.
- msg 'unused', "$file:$line", "unused variable `$var'";
+ msg 'unused', "$file:$line", "unused variable '$var'";
# Make the 'unused' channel silent.
setup_channel 'unused', silent => 1;
@@ -341,7 +340,7 @@ sub _merge_options (\%%)
}
else
{
- confess "unknown option `$_'";
+ confess "unknown option '$_'";
}
}
if ($hash->{'ordered'})
@@ -586,12 +585,12 @@ associated to the message.
For instance to complain about some unused variable C<mumble>
declared at line 10 in F<foo.c>, one could do:
- msg 'unused', 'foo.c:10', "unused variable `mumble'";
+ msg 'unused', 'foo.c:10', "unused variable 'mumble'";
If channel C<unused> is not silent (and if this message is not a duplicate),
the following would be output:
- foo.c:10: unused variable `mumble'
+ foo.c:10: unused variable 'mumble'
C<$location> can also be an instance of C<Autom4te::Location>. In this
case, the stack of contexts will be displayed in addition.
diff --git a/lib/Autom4te/Configure_ac.pm b/lib/Autom4te/Configure_ac.pm
index a81fe78..2db7339 100644
--- a/lib/Autom4te/Configure_ac.pm
+++ b/lib/Autom4te/Configure_ac.pm
@@ -1,5 +1,4 @@
-# Copyright (C) 2003, 2005, 2006, 2009, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 2003-2012 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
@@ -80,8 +79,8 @@ sub find_configure_ac (;@)
if (-f $configure_in)
{
msg ('unsupported',
- "`$configure_ac' and `$configure_in' both present.\n"
- . "proceeding with `$configure_ac'");
+ "'$configure_ac' and '$configure_in' both present.\n"
+ . "proceeding with '$configure_ac'");
}
return $configure_ac
}
@@ -102,7 +101,7 @@ Like C<find_configure_ac>, but fail if neither is present.
sub require_configure_ac (;$)
{
my $res = find_configure_ac (@_);
- fatal "`configure.ac' or `configure.in' is required"
+ fatal "'configure.ac' or 'configure.in' is required"
unless -f $res;
return $res
}
diff --git a/lib/Autom4te/FileUtils.pm b/lib/Autom4te/FileUtils.pm
index 150db33..b91f653 100644
--- a/lib/Autom4te/FileUtils.pm
+++ b/lib/Autom4te/FileUtils.pm
@@ -1,5 +1,4 @@
-# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 2003-2012 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
@@ -63,8 +62,8 @@ Quote C<$file_name> for open.
# open_quote ($FILE_NAME)
# -----------------------
# If the string $S is a well-behaved file name, simply return it.
-# If it starts with white space, prepend `./', if it ends with
-# white space, add `\0'. Return the new string.
+# If it starts with white space, prepend './', if it ends with
+# white space, add '\0'. Return the new string.
sub open_quote($)
{
my ($s) = @_;
@@ -125,7 +124,7 @@ sub find_file ($@)
=item C<mtime ($file)>
Return the mtime of C<$file>. Missing files, or C<-> standing for
-C<STDIN> or C<STDOUT> are ``obsolete'', i.e., as old as possible.
+C<STDIN> or C<STDOUT> are "obsolete", i.e., as old as possible.
=cut
@@ -182,7 +181,7 @@ sub update_file ($$;$)
if (!$force && -f "$to" && compare ("$from", "$to") == 0)
{
# File didn't change, so don't update its mod time.
- msg 'note', "`$to' is unchanged";
+ msg 'note', "'$to' is unchanged";
unlink ($from)
or fatal "cannot remove $from: $!";
return
@@ -195,13 +194,13 @@ sub update_file ($$;$)
or fatal "cannot backup $to: $!";
move ("$from", "$to")
or fatal "cannot rename $from as $to: $!";
- msg 'note', "`$to' is updated";
+ msg 'note', "'$to' is updated";
}
else
{
move ("$from", "$to")
or fatal "cannot rename $from as $to: $!";
- msg 'note', "`$to' is created";
+ msg 'note', "'$to' is created";
}
}
@@ -400,7 +399,7 @@ sub dir_has_case_matching_file ($$)
# again and again.
if (!exists $_directory_cache{$dirname})
{
- error "failed to open directory `$dirname'"
+ error "failed to open directory '$dirname'"
unless opendir (DIR, $dirname);
$_directory_cache{$dirname} = { map { $_ => 1 } readdir (DIR) };
closedir (DIR);
diff --git a/lib/Autom4te/Getopt.pm b/lib/Autom4te/Getopt.pm
index f3fdf68..c880e1f 100644
--- a/lib/Autom4te/Getopt.pm
+++ b/lib/Autom4te/Getopt.pm
@@ -76,13 +76,13 @@ sub parse_options (%)
}
elsif (exists $argopts{$ARGV[0]})
{
- fatal ("option `$ARGV[0]' requires an argument\n"
- . "Try `$0 --help' for more information.");
+ fatal ("option '$ARGV[0]' requires an argument\n"
+ . "Try '$0 --help' for more information.");
}
else
{
- fatal ("unrecognized option `$ARGV[0]'.\n"
- . "Try `$0 --help' for more information.");
+ fatal ("unrecognized option '$ARGV[0]'.\n"
+ . "Try '$0 --help' for more information.");
}
}
}
diff --git a/lib/Autom4te/Struct.pm b/lib/Autom4te/Struct.pm
index 9da7719..d58b675 100644
--- a/lib/Autom4te/Struct.pm
+++ b/lib/Autom4te/Struct.pm
@@ -1,5 +1,4 @@
-# autoconf -- create `configure' using m4 macros
-# Copyright (C) 2001, 2002, 2006, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 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
@@ -17,7 +16,7 @@
# This file is basically Perl 5.6's Class::Struct, but made compatible
# with Perl 5.5. If someday this has to be updated, be sure to rename
# all the occurrences of Class::Struct into Autom4te::Struct, otherwise
-# if we `use' a Perl module (e.g., File::stat) that uses Class::Struct,
+# if we 'use' a Perl module (e.g., File::stat) that uses Class::Struct,
# we would have two packages defining the same symbols. Boom.
###############################################################
diff --git a/lib/Autom4te/XFile.pm b/lib/Autom4te/XFile.pm
index 6800c48..bfa6a43 100644
--- a/lib/Autom4te/XFile.pm
+++ b/lib/Autom4te/XFile.pm
@@ -1,5 +1,4 @@
-# Copyright (C) 2001, 2003, 2004, 2006, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 2001-2012 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
@@ -134,7 +133,7 @@ sub open
my ($file) = @_;
# WARNING: Gross hack: $FH is a typeglob: use its hash slot to store
- # the `name' of the file we are opening. See the example with
+ # the 'name' of the file we are opening. See the example with
# io_socket_timeout in IO::Socket for more, and read Graham's
# comment in IO::Handle.
${*$fh}{'autom4te_xfile_file'} = "$file";
@@ -176,8 +175,8 @@ C<\n> on input files.
=cut
-# Some Win32/perl installations fail to translate \r\n to \n on input
-# so we do that here.
+# Some native Windows/perl installations fail to translate \r\n to \n on
+# input so we do that here.
sub getline
{
local $_ = $_[0]->SUPER::getline;
@@ -226,14 +225,14 @@ sub lock
my ($fh, $mode) = @_;
# Cannot use @_ here.
- # Unless explicitly configured otherwise, Perl implements its `flock' with
the
+ # Unless explicitly configured otherwise, Perl implements its 'flock' with
the
# first of flock(2), fcntl(2), or lockf(3) that works. These can fail on
# NFS-backed files, with ENOLCK (GNU/Linux) or EOPNOTSUPP (FreeBSD); we
# usually ignore these errors. If $ENV{MAKEFLAGS} suggests that a parallel
- # invocation of `make' has invoked the tool we serve, report all locking
+ # invocation of 'make' has invoked the tool we serve, report all locking
# failures and abort.
#
- # On Unicos, flock(2) and fcntl(2) over NFS hang indefinitely when `lockd' is
+ # On Unicos, flock(2) and fcntl(2) over NFS hang indefinitely when 'lockd' is
# not running. NetBSD NFS clients silently grant all locks. We do not
# attempt to defend against these dangers.
#
@@ -242,7 +241,7 @@ sub lock
{
my $make_j = (exists $ENV{'MAKEFLAGS'}
&& " -$ENV{'MAKEFLAGS'}" =~ /
(-[BdeikrRsSw]*[jP]|--[jP]|---?jobs)/);
- my $note = "\nforgo `make -j' or use a file system that supports locks";
+ my $note = "\nforgo \"make -j\" or use a file system that supports
locks";
my $file = $fh->name;
msg ($make_j ? 'fatal' : 'unsupported',
diff --git a/maint.mk b/maint.mk
index 2668655..4cbd5f4 100644
--- a/maint.mk
+++ b/maint.mk
@@ -178,6 +178,13 @@ syntax-check: $(local-check)
# Regular expression (ERE) denoting either a forbidden construct
# or a required construct. Those arguments are exclusive.
#
+# exclude
+#
+# Regular expression (ERE) denoting lines to ignore that matched
+# a prohibit construct. For example, this can be used to exclude
+# comments that mention why the nearby code uses an alternative
+# construct instead of the simpler prohibited construct.
+#
# in_vc_files | in_files
#
# grep-E-style regexp denoting the files to check. If no files
@@ -212,6 +219,17 @@ syntax-check: $(local-check)
# when filtering by name via in_files, we explicitly filter out matching
# names here as well.
+# Initialize each, so that envvar settings cannot interfere.
+export require =
+export prohibit =
+export exclude =
+export in_vc_files =
+export in_files =
+export containing =
+export non_containing =
+export halt =
+export with_grep_options =
+
# By default, _sc_search_regexp does not ignore case.
export ignore_case =
_ignore_case = $$(test -n "$$ignore_case" && printf %s -i || :)
@@ -231,6 +249,9 @@ define _sc_search_regexp
test -z "$$prohibit" && test -z "$$require" \
&& { msg='Should specify either prohibit or require' \
$(_sc_say_and_exit) } || :; \
+ test -z "$$prohibit" && test -n "$$exclude" \
+ && { msg='Use of exclude requires a prohibit pattern' \
+ $(_sc_say_and_exit) } || :; \
test -n "$$in_vc_files" && test -n "$$in_files" \
&& { msg='Cannot specify both in_vc_files and in_files' \
$(_sc_say_and_exit) } || :; \
@@ -258,6 +279,7 @@ define _sc_search_regexp
if test -n "$$files"; then \
if test -n "$$prohibit"; then \
grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \
+ | grep -vE "$${exclude-^$$}" \
&& { msg="$$halt" $(_sc_say_and_exit) } || :; \
else \
grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \
@@ -276,17 +298,17 @@ sc_avoid_if_before_free:
exit 1; } || :
sc_cast_of_argument_to_free:
- @prohibit='\<free *\( *\(' halt='don'\''t cast free argument' \
+ @prohibit='\<free *\( *\(' halt="don't cast free argument" \
$(_sc_search_regexp)
sc_cast_of_x_alloc_return_value:
@prohibit='\*\) *x(m|c|re)alloc\>' \
- halt='don'\''t cast x*alloc return value' \
+ halt="don't cast x*alloc return value" \
$(_sc_search_regexp)
sc_cast_of_alloca_return_value:
@prohibit='\*\) *alloca\>' \
- halt='don'\''t cast alloca return value' \
+ halt="don't cast alloca return value" \
$(_sc_search_regexp)
sc_space_tab:
@@ -303,12 +325,12 @@ sc_prohibit_atoi_atof:
$(_sc_search_regexp)
# Use STREQ rather than comparing strcmp == 0, or != 0.
+sp_ = strcmp *\(.+\)
sc_prohibit_strcmp:
- @grep -nE '! *str''cmp *\(|\<str''cmp *\(.+\) *[!=]=' \
- $$($(VC_LIST_EXCEPT)) \
- | grep -vE ':# *define STRN?EQ\(' && \
- { echo '$(ME): replace str''cmp calls above with STREQ/STRNEQ' \
- 1>&2; exit 1; } || :
+ @prohibit='! *strcmp *\(|\<$(sp_) *[!=]=|[!=]= *$(sp_)' \
+ exclude=':# *define STRN?EQ\(' \
+ halt='$(ME): replace strcmp calls above with STREQ/STRNEQ' \
+ $(_sc_search_regexp)
# Pass EXIT_*, not number, to usage, exit, and error (when exiting)
# Convert all uses automatically, via these two commands:
@@ -516,7 +538,7 @@ sc_prohibit_argmatch_without_use:
sc_prohibit_canonicalize_without_use:
@h='canonicalize.h' \
-
re='CAN_(EXISTING|ALL_BUT_LAST|MISSING)|canonicalize_(mode_t|filename_mode)' \
+
re='CAN_(EXISTING|ALL_BUT_LAST|MISSING)|canonicalize_(mode_t|filename_mode|file_name)'
\
$(_sc_header_without_use)
sc_prohibit_root_dev_ino_without_use:
@@ -708,12 +730,10 @@ _gl_translatable_diag_func_re ?= error
# Look for diagnostics that aren't marked for translation.
# This won't find any for which error's format string is on a separate line.
sc_unmarked_diagnostics:
- @grep -nE \
- '\<$(_gl_translatable_diag_func_re) *\([^"]*"[^"]*[a-z]{3}' \
- $$($(VC_LIST_EXCEPT)) \
- | grep -Ev '(_|ngettext ?)\(' && \
- { echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
- exit 1; } || :
+ @prohibit='\<$(_gl_translatable_diag_func_re) *\([^"]*"[^"]*[a-z]{3}' \
+ exclude='(_|ngettext ?)\(' \
+ halt='$(ME): found unmarked diagnostic(s)' \
+ $(_sc_search_regexp)
# Avoid useless parentheses like those in this example:
# #if defined (SYMBOL) || defined (SYM2)
@@ -974,10 +994,10 @@ sc_redundant_const:
$(_sc_search_regexp)
sc_const_long_option:
- @grep '^ *static.*struct option ' $$($(VC_LIST_EXCEPT)) \
- | grep -Ev 'const struct option|struct option const' && { \
- echo 1>&2 '$(ME): add "const" to the above declarations'; \
- exit 1; } || :
+ @prohibit='^ *static.*struct option ' \
+ exclude='const struct option|struct option const' \
+ halt='$(ME): add "const" to the above declarations' \
+ $(_sc_search_regexp)
NEWS_hash = \
$$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \
@@ -1015,8 +1035,8 @@ update-NEWS-hash: NEWS
# setting this to ' && !/PRAGMA_SYSTEM_HEADER/'.
_makefile_at_at_check_exceptions ?=
sc_makefile_at_at_check:
- @perl -ne '/address@hidden@/' \
- -e ' && !/([A-Z_0-9]+)address@hidden@$$/' \
+ @perl -ne '/address@hidden@/'
\
+ -e ' && !/(\w+)address@hidden@$$/' \
-e ''$(_makefile_at_at_check_exceptions) \
-e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \
$$($(VC_LIST_EXCEPT) | grep -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \
@@ -1079,7 +1099,7 @@ sc_po_check:
# Sometimes it is useful to change the PATH environment variable
# in Makefiles. When doing so, it's better not to use the Unix-centric
# path separator of ':', but rather the automake-provided '$(PATH_SEPARATOR)'.
-msg = '$(ME): Do not use '\'':'\'' above; use $$(PATH_SEPARATOR) instead'
+msg = '$(ME): Do not use ":" above; use $$(PATH_SEPARATOR) instead'
sc_makefile_path_separator_check:
@prohibit='PATH[=].*:' \
in_vc_files='akefile|\.mk$$' \
@@ -1234,7 +1254,8 @@ announcement: NEWS ChangeLog $(rel-files)
--gpg-key-id=$(gpg_key_ID) \
--news=$(srcdir)/NEWS \
--bootstrap-tools=$(bootstrap-tools) \
- --gnulib-version=$(gnulib-version) \
+ $$(case ,$(bootstrap-tools), in (*,gnulib,*) \
+ echo --gnulib-version=$(gnulib-version);; esac) \
--no-print-checksums \
$(addprefix --url-dir=, $(url_dir_list))
--
1.7.7.6