automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.3-14


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.3-148-g9799821
Date: Sun, 26 Aug 2012 11:27:18 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=9799821061b9f4bf6c6e4e4384c633b5fcb0fe97

The branch, master has been updated
       via  9799821061b9f4bf6c6e4e4384c633b5fcb0fe97 (commit)
       via  2abe18335cffce365cbe09bdc1d0315f5ed8f24d (commit)
       via  ffa41804f985694d22bad74067a38133b3b71d26 (commit)
       via  1be71fc819e07c596e4d570844385fcd01f4cef0 (commit)
       via  2bb6c94e04b100143a596ca31e2f1b60590f934e (commit)
       via  0166876d17bfe430afa61e59bfabc9debb772b99 (commit)
       via  c4d20d83584c3a293354210dd5ebe7e6351d8979 (commit)
       via  e49762d8dc79c3f9a46c16766e0a28fd229bc039 (commit)
       via  af1ac94a49e1131c2c3a4e1e008b4245ece61b3a (commit)
       via  346d76aa2338c0108d872fc7eedbd18c9db30102 (commit)
       via  fd189a05ca269424fd4eae7d79a788aec5438658 (commit)
      from  c6cc38027572445a25d749db99473f82521cc79e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9799821061b9f4bf6c6e4e4384c633b5fcb0fe97
Merge: 2abe183 ffa4180
Author: Stefano Lattarini <address@hidden>
Date:   Sun Aug 26 12:55:38 2012 +0200

    Merge branch 'maint'
    
    * maint:
      docs: don't suggest to use recursive makefile setup
      tests: fix a timestamp race in python tests
      tests: fixup: make distcheck-override-infodir pass again
      sync: update files from upstream with "make fetch"
      maint: post-release minor version bump
      release: stable release 1.12.3
      maintcheck: fix spurious warnings
      docs: fix typo: s/make install-info/make uninstall-info/
      tests: fixup: make a couple of tests executable
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 2abe18335cffce365cbe09bdc1d0315f5ed8f24d
Author: Stefano Lattarini <address@hidden>
Date:   Fri Aug 24 10:47:17 2012 +0200

    AM_INIT_AUTOMAKE: allow obsolescent two-args invocation once again
    
    This partially reverts commit 'v1.12-67-ge186355' of 2012-05-25,
    "init: obsolete usages of AM_INIT_AUTOMAKE not supported anymore"
    
    Some users still need to be able to define the version number for
    their package dynamically, at configure runtime.
    
    Their user case is that, for development snapshots, they want to be
    able to base the complete version of the package on the VCS revision
    ID (mostly Git or Mercurial).  They could of course do so by
    specifying such version dynamically in their call to AC_INIT, as is
    done by several GNU packages.  But then they would need to regenerate
    and re-run the configure script before each snapshot, which might be
    very time-consuming for complex packages, to the point of slowing
    down and even somewhat impeding development.
    
    The situation should truly be solved in Autoconf, by allowing a way
    to specify the version dynamically in a way that doesn't force the
    configure script to be regenerated and re-run every time the package
    version changes.  But until Autoconf has been improved to allow
    this, Automake will have to support the obsolescent two-arguments
    invocation for AM_INIT_AUTOMAKE, to avoid regressing the suboptimal
    but working solution for the use case described above.
    
    See also:
    <http://lists.gnu.org/archive/html/automake/2012-08/msg00025.html>
    
    * NEWS: Update.
    * m4/init.m4 (AM_INIT_AUTOMAKE): Support once again invocation with
    two or three arguments.
    * t/aminit-moreargs-no-more.sh: Renamed ...
    * t/aminit-moreargs-deprecated.sh: ... like this, and updated.
    * t/nodef.sh: Recovered test, with minor adjustments.
    * t/backcompat.sh: Likewise.
    * t/backcompat2.sh: Likewise.
    * t/backcompat3.sh: Likewise.
    * t/backcompat6.sh: Likewise.
    * t/list-of-tests.mk: Adjust.
    
    Suggested-by: Bob Friesenhahn n<address@hidden>
    Signed-off-by: Stefano Lattarini <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 NEWS                                               |   15 ++-
 doc/automake.texi                                  |    9 +-
 lib/config.guess                                   |    8 +-
 lib/config.sub                                     |    8 +-
 lib/gitlog-to-changelog                            |   35 +++++-
 lib/texinfo.tex                                    |   83 ++++++-----
 m4/init.m4                                         |   26 +++-
 ...s-no-more.sh => aminit-moreargs-deprecation.sh} |   18 +--
 t/ax/test-defs.in                                  |    4 +-
 t/ax/test-lib.sh                                   |    8 +-
 t/backcompat.sh                                    |   64 +++++++++
 t/backcompat2.sh                                   |   73 ++++++++++
 t/backcompat3.sh                                   |  147 ++++++++++++++++++++
 t/backcompat6.sh                                   |  104 ++++++++++++++
 t/distcheck-override-infodir.sh                    |   47 +++---
 t/list-of-tests.mk                                 |    7 +-
 t/{nodef2.sh => nodef.sh}                          |   20 ++-
 t/python-am-path-iftrue.sh                         |    6 +-
 t/python-missing.sh                                |    6 +-
 19 files changed, 574 insertions(+), 114 deletions(-)
 rename t/{aminit-moreargs-no-more.sh => aminit-moreargs-deprecation.sh} (73%)
 create mode 100755 t/backcompat.sh
 create mode 100755 t/backcompat2.sh
 create mode 100755 t/backcompat3.sh
 create mode 100755 t/backcompat6.sh
 copy t/{nodef2.sh => nodef.sh} (69%)
 mode change 100644 => 100755 t/python-am-path-iftrue.sh
 mode change 100644 => 100755 t/python-missing.sh

diff --git a/NEWS b/NEWS
index 59b86ea..5490e72 100644
--- a/NEWS
+++ b/NEWS
@@ -7,11 +7,6 @@ New in 1.13:
   - The rules to build PDF and DVI output from Texinfo input now
     requires Texinfo 4.9 or later.
 
-* Obsolete features removed:
-
-  - Use of the long-deprecated two- and three-arguments invocation forms
-    of the AM_INIT_AUTOMAKE is not supported anymore.
-
   - Support for the "Cygnus-style" trees (once enabled by the 'cygnus'
     option) has been removed.  See discussion about automake bug#11034
     for more background.
@@ -44,6 +39,16 @@ New in 1.13:
 
   - All the "old alias" macros in 'm4/obsolete.m4' have been removed.
 
+* Obsolescent features:
+
+  - Use of the long-deprecated two- and three-arguments invocation forms
+    of the AM_INIT_AUTOMAKE is not documented anymore.  It's still
+    supported though (albeit with a warning in the 'obsolete' category),
+    to cater for people who want to define the version number for their
+    package dynamically (e.g., from the current VCS revision).  We'll
+    have to continue this support until Autoconf itself is fixed to allow
+    better support for such dynamic version numbers.
+
 * Elisp byte-compilation:
 
   - The byte compilation of '.el' files into '.elc' files is now done
diff --git a/doc/automake.texi b/doc/automake.texi
index e4614ab..7b62dcb 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -420,8 +420,7 @@ individual GNU maintainer (and put it on the back of the 
Automake
 maintainers).
 
 The typical Automake input file is simply a series of variable definitions.
-Each such file is processed to create a @file{Makefile.in}.  There
-should generally be one @file{Makefile.am} per directory of a project.
+Each such file is processed to create a @file{Makefile.in}.
 
 @cindex Constraints of Automake
 @cindex Automake constraints
@@ -7893,9 +7892,9 @@ be prevented via the @code{no-installinfo} option.  In 
this case,
 request this explicitly using @samp{make install-info}.
 
 @vindex AM_UPDATE_INFO_DIR
-By default, @code{make install-info} and @code{make install-info}
-will try to run the @command{install-info} program (if available)
-to update (or create) the @address@hidden@address@hidden/dir} index.
+By default, @code{make install-info} and @code{make uninstall-info}
+will try to run the @command{install-info} program (if available) to
+update (or create/remove) the @address@hidden@address@hidden/dir} index.
 If this is undesired, it can be prevented by exporting the
 @code{AM_UPDATE_INFO_DIR} variable to "@code{no}".
 
diff --git a/lib/config.guess b/lib/config.guess
index aa04f04..ad5f74a 100755
--- a/lib/config.guess
+++ b/lib/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-06-17'
+timestamp='2012-07-31'
 
 # 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
@@ -805,6 +805,9 @@ EOF
     i*:CYGWIN*:*)
        echo ${UNAME_MACHINE}-pc-cygwin
        exit ;;
+    *:MINGW64*:*)
+       echo ${UNAME_MACHINE}-pc-mingw64
+       exit ;;
     *:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
        exit ;;
@@ -1334,9 +1337,6 @@ EOF
        exit ;;
 esac
 
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
 eval $set_cc_for_build
 cat >$dummy.c <<EOF
 #ifdef _SEQUENT_
diff --git a/lib/config.sub b/lib/config.sub
index aa2cf19..b15df57 100755
--- a/lib/config.sub
+++ b/lib/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-06-17'
+timestamp='2012-07-31'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -791,6 +791,10 @@ case $basic_machine in
        microblaze)
                basic_machine=microblaze-xilinx
                ;;
+       mingw64)
+               basic_machine=x86_64-pc
+               os=-mingw64
+               ;;
        mingw32)
                basic_machine=i386-pc
                os=-mingw32
@@ -1359,7 +1363,7 @@ case $os in
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* 
\
-             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
              | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
diff --git a/lib/gitlog-to-changelog b/lib/gitlog-to-changelog
index 17c4562..5184edc 100755
--- a/lib/gitlog-to-changelog
+++ b/lib/gitlog-to-changelog
@@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
     if 0;
 # Convert git log output to ChangeLog format.
 
-my $VERSION = '2012-05-22 09:40'; # UTC
+my $VERSION = '2012-07-29 06:11'; # UTC
 # The definition above must lie within the first 8 lines in order
 # for the Emacs time-stamp write hook (at end) to update it.
 # If you change this file with Emacs, please let the write hook
@@ -68,6 +68,8 @@ OPTIONS:
                   header; the default is to cluster adjacent commit messages
                   if their headers are the same and neither commit message
                   contains multiple paragraphs.
+   --srcdir=DIR the root of the source tree, from which the .git/
+                  directory can be derived.
    --since=DATE convert only the logs since DATE;
                   the default is to convert all log entries.
    --format=FMT set format string for commit subject and body;
@@ -192,6 +194,30 @@ sub parse_amend_file($)
   return $h;
 }
 
+# git_dir_option $SRCDIR
+#
+# From $SRCDIR, the --git-dir option to pass to git (none if $SRCDIR
+# is undef).  Return as a list (0 or 1 element).
+sub git_dir_option($)
+{
+  my ($srcdir) = @_;
+  my @res = ();
+  if (defined $srcdir)
+    {
+      my $qdir = shell_quote $srcdir;
+      my $cmd = "cd $qdir && git rev-parse --show-toplevel";
+      my $qcmd = shell_quote $cmd;
+      my $git_dir = qx($cmd);
+      defined $git_dir
+        or die "$ME: cannot run $qcmd: $!\n";
+      $? == 0
+        or die "$ME: $qcmd had unexpected exit code or signal ($?)\n";
+      chomp $git_dir;
+      push @res, "--git-dir=$git_dir/.git";
+    }
+  @res;
+}
+
 {
   my $since_date;
   my $format_string = '%s%n%b%n';
@@ -200,6 +226,7 @@ sub parse_amend_file($)
   my $cluster = 1;
   my $strip_tab = 0;
   my $strip_cherry_pick = 0;
+  my $srcdir;
   GetOptions
     (
      help => sub { usage 0 },
@@ -211,9 +238,9 @@ sub parse_amend_file($)
      'cluster!' => \$cluster,
      'strip-tab' => \$strip_tab,
      'strip-cherry-pick' => \$strip_cherry_pick,
+     'srcdir=s' => \$srcdir,
     ) or usage 1;
 
-
   defined $since_date
     and unshift @ARGV, "--since=$since_date";
 
@@ -221,7 +248,9 @@ sub parse_amend_file($)
   # that makes a correction in the log or attribution of that commit.
   my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {};
 
-  my @cmd = (qw (git log --log-size),
+  my @cmd = ('git',
+             git_dir_option $srcdir,
+             qw(log --log-size),
              '--pretty=format:%H:%ct  %an  <%ae>%n%n'.$format_string, @ARGV);
   open PIPE, '-|', @cmd
     or die ("$ME: failed to run '". quoted_cmd (@cmd) ."': $!\n"
diff --git a/lib/texinfo.tex b/lib/texinfo.tex
index 2b646dd..dc4bf64 100644
--- a/lib/texinfo.tex
+++ b/lib/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2012-07-03.16}
+\def\texinfoversion{2012-07-29.17}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -2448,34 +2448,12 @@ end
 % @samp.
 \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
 
-% definition of @key that produces a lozenge.  Doesn't adjust to text size.
-%\setfont\keyrm\rmshape{8}{1000}{OT1}
-%\font\keysy=cmsy9
-%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
-%  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
-%    \vbox{\hrule\kern-0.4pt
-%     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
-%    \kern-0.4pt\hrule}%
-%  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+% @indicateurl is \samp, that is, with quotes.
+\let\indicateurl=\samp
 
-% definition of @key with no lozenge.  If the current font is already
-% monospace, don't change it; that way, we respect @kbdinputstyle.  But
-% if it isn't monospace, then use \tt.
-%
-\def\key#1{{\setupmarkupstyle{key}%
-  \nohyphenation
-  \ifmonospace\else\tt\fi
-  #1}\null}
-
-% ctrl is no longer a Texinfo command.
-\def\ctrl #1{{\tt \rawbackslash \hat}#1}
-
-% @file, @option are the same as @samp.
-\let\file=\samp
-\let\option=\samp
-
-% @code is a modification of @t,
-% which makes spaces the same size as normal in the surrounding text.
+% @code (and similar) prints in typewriter, but with spaces the same
+% size as normal in the surrounding text, without hyphenation, etc.
+% This is a subroutine for that.
 \def\tclose#1{%
   {%
     % Change normal interword space to be same as for the current font.
@@ -2500,7 +2478,7 @@ end
 % We *must* turn on hyphenation at `-' and `_' in @code.
 % Otherwise, it is too hard to avoid overfull hboxes
 % in the Emacs manual, the Library manual, etc.
-
+%
 % Unfortunately, TeX uses one parameter (\hyphenchar) to control
 % both hyphenation at - and hyphenation within words.
 % We must therefore turn them both off (\tclose does that)
@@ -2564,6 +2542,13 @@ end
   \fi\fi
 }
 
+% For @command, @env, @file, @option quotes seem unnecessary,
+% so use \code rather than \samp.
+\let\command=\code
+\let\env=\code
+\let\file=\code
+\let\option=\code
+
 % @uref (abbreviation for `urlref') takes an optional (comma-separated)
 % second argument specifying the text to display and an optional third
 % arg as text to display instead of (rather than in addition to) the url
@@ -2743,10 +2728,24 @@ end
 \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
 \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
 
-% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
-\let\indicateurl=\code
-\let\env=\code
-\let\command=\code
+% definition of @key that produces a lozenge.  Doesn't adjust to text size.
+%\setfont\keyrm\rmshape{8}{1000}{OT1}
+%\font\keysy=cmsy9
+%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+%  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+%    \vbox{\hrule\kern-0.4pt
+%     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+%    \kern-0.4pt\hrule}%
+%  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+
+% definition of @key with no lozenge.  If the current font is already
+% monospace, don't change it; that way, we respect @kbdinputstyle.  But
+% if it isn't monospace, then use \tt.
+%
+\def\key#1{{\setupmarkupstyle{key}%
+  \nohyphenation
+  \ifmonospace\else\tt\fi
+  #1}\null}
 
 % @clicksequence{File @click{} Open ...}
 \def\clicksequence#1{\begingroup #1\endgroup}
@@ -2854,6 +2853,9 @@ end
   }
 }
 
+% ctrl is no longer a Texinfo command, but leave this definition for fun.
+\def\ctrl #1{{\tt \rawbackslash \hat}#1}
+
 % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
 % Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
 % except specified as a normal braced arg, so no newlines to worry about.
@@ -3144,12 +3146,17 @@ end
   % hopefully nobody will notice/care.
   \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
   \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
-  \ifx\curfontstyle\bfstylename
-    % bold:
-    \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+  \ifmonospace
+    % typewriter:
+    \font\thisecfont = ectt\ecsize \space at \nominalsize
   \else
-    % regular:
-    \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+    \ifx\curfontstyle\bfstylename
+      % bold:
+      \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+    \else
+      % regular:
+      \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+    \fi
   \fi
   \thisecfont
 }
diff --git a/m4/init.m4 b/m4/init.m4
index 1d5dffd..fc05148 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -9,8 +9,17 @@
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
 
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 # AM_INIT_AUTOMAKE([OPTIONS])
-# ---------------------------
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
 [AC_PREREQ([2.65])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
@@ -39,18 +48,21 @@ fi
 AC_SUBST([CYGPATH_W])
 
 # Define the identity of the package.
-dnl Error out on old-style AM_INIT_AUTOMAKE calls.
-m4_ifval([$2], [m4_fatal(
-[$0: old-style two- and three-arguments forms are now unsupported.  For more 
info:
-http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])])
-_AM_SET_OPTIONS([$1])dnl
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+             [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
 m4_if(
   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
   [ok:ok],,
   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
 _AM_IF_OPTION([no-define],,
 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
diff --git a/t/aminit-moreargs-no-more.sh b/t/aminit-moreargs-deprecation.sh
similarity index 73%
rename from t/aminit-moreargs-no-more.sh
rename to t/aminit-moreargs-deprecation.sh
index ce30c29..a8d4605 100755
--- a/t/aminit-moreargs-no-more.sh
+++ b/t/aminit-moreargs-deprecation.sh
@@ -14,16 +14,12 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Check that automake error out (with an helpful error message) against
-# old-style usages of AM_INIT_AUTOMAKE (i.e., calls with two or three
-# arguments).
+# Check that automake warns against old-style usages of AM_INIT_AUTOMAKE
+# (i.e., calls with two or three arguments).
 
 . ./defs || exit 1
 
-warn_rx='AM_INIT_AUTOMAKE.* old-style two-.* three-arguments form.*unsupported'
-
-$ACLOCAL
-mv aclocal.m4 aclocal.sav
+warn_rx='AM_INIT_AUTOMAKE.* two-.* three-arguments form.*deprecated'
 
 cat > configure.ac <<'END'
 AC_INIT([Makefile.am])
@@ -31,14 +27,16 @@ AM_INIT_AUTOMAKE([twoargs], [1.0])
 AC_CONFIG_FILES([Makefile])
 END
 
+$ACLOCAL
+
 do_check()
 {
   rm -rf autom4te*.cache
-  for cmd in "$ACLOCAL" "$AUTOCONF" "$AUTOMAKE"; do
-    cp aclocal.sav aclocal.m4
-    $cmd -Wnone -Wno-error 2>stderr && { cat stderr; exit 1; }
+  for cmd in "$AUTOCONF" "$AUTOMAKE"; do
+    $cmd -Werror -Wnone -Wobsolete 2>stderr && { cat stderr; exit 1; }
     cat stderr >&2
     grep "^configure\.ac:2:.*$warn_rx" stderr
+    $cmd -Werror -Wall -Wno-obsolete || exit 1
   done
 }
 
diff --git a/t/ax/test-defs.in b/t/ax/test-defs.in
index 56b45e1..dbfe827 100644
--- a/t/ax/test-defs.in
+++ b/t/ax/test-defs.in
@@ -165,7 +165,9 @@ TEX=${AM_TESTSUITE_TEX-'@TEX@'}
 # The amount we should wait after modifying files depends on the platform.
 # For instance, Windows '95, '98 and ME have 2-second granularity
 # and can be up to 3 seconds in the future w.r.t. the system clock.
-sleep='sleep @MODIFICATION_DELAY@'
+# The creative quoting is to avoid spuriously triggering a failure in
+# the maintainer checks,
+sleep='sleep ''@MODIFICATION_DELAY@'
 
 # An old timestamp that can be given to a file, in "touch -t" format.
 # The time stamp should be portable to all file systems of interest.
diff --git a/t/ax/test-lib.sh b/t/ax/test-lib.sh
index 6048f81..71c2e49 100644
--- a/t/ax/test-lib.sh
+++ b/t/ax/test-lib.sh
@@ -51,9 +51,11 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 
2>&1; then
   }
 else
   argv0=$0
-  # Avoid command substitution failure, for it might cause problems with
-  # "set -e" on some shells.
-  case `(set -o) 2>/dev/null || :` in *posix*) set -o posix;; esac
+  # Ignore command substitution failure, for it might cause problems
+  # with "set -e" on some shells.
+  am_shell_opts=$(set -o) || :
+  case $am_shell_opts in *posix*) set -o posix;; esac
+  unset am_shell_opts
 fi
 
 # A single whitespace character.
diff --git a/t/backcompat.sh b/t/backcompat.sh
new file mode 100755
index 0000000..fa83687
--- /dev/null
+++ b/t/backcompat.sh
@@ -0,0 +1,64 @@
+#! /bin/sh
+# Copyright (C) 2010-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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program 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 <http://www.gnu.org/licenses/>.
+
+# Test usage of AM_INIT_AUTOMAKE with two or three arguments, for
+# backward-compatibility.
+
+. ./defs || exit 1
+
+cat > Makefile.am <<'END'
+.PHONY: test display
+
+## Might be useful for debugging.
+display:
+## The following should be substituted by AM_INIT_AUTOMAKE.
+       @echo PACKAGE = $(PACKAGE)
+       @echo VERSION = $(VERSION)
+## The following should not be substituted, as we used the
+## old form of AC_INIT.
+       @echo PACKAGE_NAME = $(PACKAGE_NAME)
+       @echo PACKAGE_VERSION = $(PACKAGE_VERSION)
+       @echo PACKAGE_TARNAME = $(PACKAGE_TARNAME)
+       @echo PACKAGE_STRING = $(PACKAGE_STRING)
+
+test: display
+       test x'$(PACKAGE)' = x'FooBar'
+       test x'$(VERSION)' = x'0.7.1'
+       test x'$(PACKAGE_NAME)' = x
+       test x'$(PACKAGE_VERSION)' = x
+       test x'$(PACKAGE_TARNAME)' = x
+       test x'$(PACKAGE_STRING)' = x
+END
+
+for ac_init in 'AC_INIT' 'AC_INIT([Makefile.am])'; do
+  for am_extra_args in '' ', []' ', [:]' ', [false]'; do
+    rm -rf autom4te*.cache config* Makefile.in Makefile
+    unindent > configure.in <<END
+      $ac_init
+      AM_INIT_AUTOMAKE([FooBar], [0.7.1]$am_extra_args)
+      AC_CONFIG_FILES([Makefile])
+      AC_OUTPUT
+END
+    cat configure.in # For debugging.
+    $ACLOCAL
+    $AUTOCONF
+    $AUTOMAKE -Wno-obsolete
+    ./configure
+    $MAKE test
+  done
+done
+
+:
diff --git a/t/backcompat2.sh b/t/backcompat2.sh
new file mode 100755
index 0000000..109483b
--- /dev/null
+++ b/t/backcompat2.sh
@@ -0,0 +1,73 @@
+#! /bin/sh
+# Copyright (C) 2010-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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program 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 <http://www.gnu.org/licenses/>.
+
+# Backward-compatibility test: check that AM_INIT_AUTOMAKE with two or
+# three arguments does AC_DEFINE the symbols PACKAGE and VERSION iff the
+# third argument is empty or non-existent.
+
+am_create_testdir=empty
+. ./defs || exit 1
+
+# A trick to make the test run muuuch faster, by avoiding repeated
+# runs of aclocal (one order of magnitude improvement in speed!).
+echo 'AC_INIT(x,0) AM_INIT_AUTOMAKE' > configure.ac
+$ACLOCAL
+rm -rf configure.ac autom4te.*
+
+touch install-sh missing
+
+cat > config.h.in <<'END'
+#undef PACKAGE
+#undef VERSION
+END
+
+for am_arg3 in ':' 'false' '#' ' '; do
+  unindent > configure.ac <<END
+    AC_INIT
+    AC_CONFIG_HEADERS([config.h])
+    AM_INIT_AUTOMAKE([pkgname], [pkgversion], [$am_arg3])
+    AC_OUTPUT
+END
+  cat configure.ac # For debugging.
+  $AUTOCONF
+  ./configure
+  cat config.h # For debugging.
+  # The non-empty third argument should prevent PACKAGE and VERSION
+  # from being AC_DEFINE'd.
+  $EGREP 'pkg(name|version)' config.h && exit 1
+  # This is required because even relatively-recent versions of the
+  # BSD shell wrongly exit when the 'errexit' shell flag is active if
+  # the last command of a compound statement fails, even if it should
+  # be protected by the use of "&&".
+  :
+done
+
+for am_extra_args in '' ',' ', []'; do
+  unindent > configure.ac <<END
+    AC_INIT
+    AC_CONFIG_HEADERS([config.h])
+    AM_INIT_AUTOMAKE([pkgname], [pkgversion]$am_extra_args)
+    AC_OUTPUT
+END
+  cat configure.ac # For debugging.
+  $AUTOCONF
+  ./configure
+  cat config.h # For debugging.
+  grep '^ *# *define  *PACKAGE  *"pkgname" *$' config.h
+  grep '^ *# *define  *VERSION  *"pkgversion" *$' config.h
+done
+
+:
diff --git a/t/backcompat3.sh b/t/backcompat3.sh
new file mode 100755
index 0000000..26ea7d4
--- /dev/null
+++ b/t/backcompat3.sh
@@ -0,0 +1,147 @@
+#! /bin/sh
+# Copyright (C) 2010-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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program 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 <http://www.gnu.org/licenses/>.
+
+# Backward-compatibility test: check what happens when AC_INIT and
+# AM_INIT_AUTOMAKE are both given two or more arguments.
+
+am_create_testdir=empty
+. ./defs || exit 1
+
+empty=''
+
+AUTOMAKE="$AUTOMAKE -Wno-obsolete"
+
+cat > Makefile.am <<'END'
+## Leading ':;' here required to work around bugs of (at least) bash 3.2
+got: Makefile
+       @:; { \
+         echo 'PACKAGE = $(PACKAGE)'; \
+         echo 'VERSION = $(VERSION)'; \
+         echo 'PACKAGE_NAME = $(PACKAGE_NAME)'; \
+         echo 'PACKAGE_VERSION = $(PACKAGE_VERSION)'; \
+         echo 'PACKAGE_STRING = $(PACKAGE_STRING)'; \
+         echo 'PACKAGE_TARNAME = $(PACKAGE_TARNAME)'; \
+         echo 'PACKAGE_BUGREPORT = $(PACKAGE_BUGREPORT)'; \
+         echo 'PACKAGE_URL = $(PACKAGE_URL)'; \
+       } >$@
+END
+
+
+### Run 1 ###
+
+cat > configure.ac <<END
+AC_INIT([ac_name], [ac_version])
+AM_INIT_AUTOMAKE([am_name], [am_version])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat configure.ac
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+cat >exp <<END
+PACKAGE = am_name
+VERSION = am_version
+PACKAGE_NAME = ac_name
+PACKAGE_VERSION = ac_version
+PACKAGE_STRING = ac_name ac_version
+PACKAGE_TARNAME = ac_name
+PACKAGE_BUGREPORT = $empty
+PACKAGE_URL = $empty
+END
+
+$MAKE got
+
+diff exp got
+
+
+### Run 2 ###
+
+cat > configure.ac <<'END'
+AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname],
+        [ac_url])],
+AM_INIT_AUTOMAKE([am_name], [am_version])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat configure.ac
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+cat >exp <<END
+PACKAGE = am_name
+VERSION = am_version
+PACKAGE_NAME = ac_name
+PACKAGE_VERSION = ac_version
+PACKAGE_STRING = ac_name ac_version
+PACKAGE_TARNAME = ac_tarname
+PACKAGE_BUGREPORT = ac_bugreport
+PACKAGE_URL = ac_url
+END
+
+$MAKE got
+
+diff exp got
+
+
+### Run 3 ###
+
+cat > configure.ac <<END
+AC_INIT([ac_name], [ac_version])
+AM_INIT_AUTOMAKE([am_name], [am_version], [am_foo_quux])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat configure.ac
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+cat >exp <<END
+PACKAGE = am_name
+VERSION = am_version
+PACKAGE_NAME = ac_name
+PACKAGE_VERSION = ac_version
+PACKAGE_STRING = ac_name ac_version
+PACKAGE_TARNAME = ac_name
+PACKAGE_BUGREPORT = $empty
+PACKAGE_URL = $empty
+END
+
+$MAKE got
+
+diff exp got
+
+$FGREP am_foo_quux Makefile.in Makefile configure config.status && exit 1
+
+
+### Done ###
+
+:
diff --git a/t/backcompat6.sh b/t/backcompat6.sh
new file mode 100755
index 0000000..9fc4946
--- /dev/null
+++ b/t/backcompat6.sh
@@ -0,0 +1,104 @@
+#! /bin/sh
+# Copyright (C) 2010-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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program 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 <http://www.gnu.org/licenses/>.
+
+# Backward-compatibility test: try to build and distribute a package
+# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT.
+# This script can also serve as mild stress-testing for Automake.
+# See also the similar test 'backcompat5.test'.
+
+required=cc
+am_create_testdir=empty
+. ./defs || exit 1
+
+# Anyone doing something like this in a real-life package probably
+# deserves to be killed.
+cat > configure.ac <<'END'
+dnl: Everything here is *deliberately* underquoted!
+AC_INIT(quux.c)
+PACKAGE=nonesuch-zardoz
+VERSION=nonesuch-0.1
+AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+AC_SUBST(one,1)
+two=2
+AC_SUBST(two, $two)
+three=3
+AC_SUBST(three)
+AC_PROG_CC
+AC_CONFIG_HEADERS(config.h:config.hin)
+AM_CONDITIONAL(CROSS_COMPILING, test "$cross_compiling" = yes)
+AC_OUTPUT(Makefile foo.got:foo1.in:foo2.in:foo3.in)
+END
+
+echo @one@ > foo1.in
+echo @two@ > foo2.in
+echo @three@ > foo3.in
+
+cat >config.hin <<'END'
+#undef PACKAGE
+#undef VERSION
+END
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = quux.c
+check-local:
+       test x'$(PACKAGE)' = x'nonesuch-zardoz'
+       test x'$(VERSION)' = x'nonesuch-0.1'
+if ! CROSS_COMPILING
+       ./foo
+## Do not anchor the regexps w.r.t. the end of line, because on
+## MinGW/MSYS, grep may assume LF line endings only, while our
+## 'foo' program may generate CRLF line endings.
+       ./foo | grep '^PACKAGE = nonesuch-zardoz!'
+       ./foo | echo '^VERSION = nonesuch-0\.1!'
+endif
+END
+
+cat > quux.c <<'END'
+#include <config.h>
+#include <stdio.h>
+int main (void)
+{
+  printf("PACKAGE = %s!\nVERSION = %s!\n", PACKAGE, VERSION);
+  return 0;
+}
+END
+
+$ACLOCAL
+$AUTOMAKE -Wno-obsolete --add-missing
+$AUTOCONF
+
+./configure
+
+cat >foo.exp <<'END'
+1
+2
+3
+END
+
+diff foo.exp foo.got
+
+$MAKE
+$MAKE check
+
+distdir=nonesuch-zardoz-nonesuch-0.1
+$MAKE distdir
+test -f $distdir/quux.c
+test ! -f $distdir/foo.got
+
+$MAKE distcheck
+
+:
diff --git a/t/distcheck-override-infodir.sh b/t/distcheck-override-infodir.sh
index ff792f7..e65078f 100755
--- a/t/distcheck-override-infodir.sh
+++ b/t/distcheck-override-infodir.sh
@@ -38,29 +38,30 @@ installcheck-local:
        fi
 END
 
-cat > main.texi << 'END'
-\input texinfo
address@hidden main.info
address@hidden main
-
address@hidden Explicit calls to @dircategory and @direntry required to ensure 
that
address@hidden a 'dir' file will be created also by older versions of 
'install-info'
address@hidden (e.g., the one coming with Texinfo 4.8).
-
address@hidden Software development
address@hidden
-* Automake: (automake).  Making GNU standards-compliant Makefiles
address@hidden direntry
-
address@hidden Individual utilities
address@hidden
-* aclocal-invocation: (automake)aclocal Invocation.   Generating aclocal.m4
-* automake-invocation: (automake)automake Invocation. Generating Makefile.in
address@hidden direntry
-
address@hidden Top
-Hello walls.
address@hidden
+# Protect with leading " # " to avoid spurious maintainer-check failures.
+sed 's/^ *# *//' > main.texi << 'END'
+ # \input texinfo
+ # @setfilename main.info
+ # @settitle main
+ #
+ # @c Explicit calls to @dircategory and @direntry required to ensure that
+ # @c a 'dir' file will be created also by older versions of 'install-info'
+ # @c (e.g., the one coming with Texinfo 4.8).
+ #
+ # @dircategory Software development
+ # @direntry
+ # * Automake: (automake).  Making GNU standards-compliant Makefiles
+ # @end direntry
+ #
+ # @dircategory Individual utilities
+ # @direntry
+ # * aclocal-invocation: (automake)aclocal Invocation.   Generating aclocal.m4
+ # * automake-invocation: (automake)automake Invocation. Generating Makefile.in
+ # @end direntry
+ #
+ # @node Top
+ # Hello walls.
+ # @bye
 END
 
 $ACLOCAL
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index a299262..2706e95 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -124,7 +124,7 @@ t/alpha2.sh \
 t/amhello-cflags.sh \
 t/amhello-cross-compile.sh \
 t/amhello-binpkg.sh \
-t/aminit-moreargs-no-more.sh \
+t/aminit-moreargs-deprecation.sh \
 t/amassign.sh \
 t/am-macro-not-found.sh \
 t/amopt.sh \
@@ -172,6 +172,10 @@ t/auxdir-computed.tap \
 t/auxdir-misplaced.sh \
 t/auxdir-nonexistent.sh \
 t/auxdir-unportable.tap \
+t/backcompat.sh \
+t/backcompat2.sh \
+t/backcompat3.sh \
+t/backcompat6.sh \
 t/backcompat-acout.sh \
 t/backsl.sh \
 t/backsl2.sh \
@@ -688,6 +692,7 @@ t/nobase.sh \
 t/nobase-libtool.sh \
 t/nobase-python.sh \
 t/nobase-nodist.sh \
+t/nodef.sh \
 t/nodef2.sh \
 t/nodep.sh \
 t/nodep2.sh \
diff --git a/t/nodef2.sh b/t/nodef.sh
similarity index 69%
copy from t/nodef2.sh
copy to t/nodef.sh
index 2f7bb77..979b906 100755
--- a/t/nodef2.sh
+++ b/t/nodef.sh
@@ -18,11 +18,18 @@
 
 . ./defs || exit 1
 
+# -------------------------------------------------------------------
+# Do not upgrade this file to use the modern AC_INIT/AM_INIT_AUTOMAKE
+# forms.  The day these obsolete AC_INIT and AM_INIT_AUTOMAKE forms
+# are dropped, just erase the file.
+# nodef2.test contains the modern version of this test.
+# -------------------------------------------------------------------
+
 # First, check that PACKAGE and VERSION are output by default.
 
 cat > configure.ac << 'END'
-AC_INIT([UnIqUe_PaCkAgE], [UnIqUe_VeRsIoN])
-AM_INIT_AUTOMAKE
+AC_INIT
+AM_INIT_AUTOMAKE([UnIqUe_PaCkAgE], [UnIqUe_VeRsIoN])
 AC_OUTPUT(output)
 END
 
@@ -37,16 +44,13 @@ grep 'DEFS.*-DVERSION=\\"UnIqUe' output
 # Then, check that PACKAGE and VERSION are not output if requested.
 
 cat > configure.ac << 'END'
-AC_INIT([UnIqUe_PaCkAgE], [UnIqUe_VeRsIoN])
-AM_INIT_AUTOMAKE([no-define])
-AC_OUTPUT(output Makefile)
+AC_INIT
+AM_INIT_AUTOMAKE([UnIqUe_PaCkAgE], [UnIqUe_VeRsIoN], [no])
+AC_OUTPUT(output)
 END
 
-: > Makefile.am
-
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE # Dummy call to make sure Automake grok 'no-define' silently.
 ./configure
 
 grep 'DEFS.*-DVERSION=\\"UnIqUe' output && exit 1
diff --git a/t/python-am-path-iftrue.sh b/t/python-am-path-iftrue.sh
old mode 100644
new mode 100755
index 3c5201f..d7ba436
--- a/t/python-am-path-iftrue.sh
+++ b/t/python-am-path-iftrue.sh
@@ -45,8 +45,10 @@ cat > mypy.m4 << 'END'
 AM_PATH_PYTHON([0.0], [$PYTHON -c 'print("%u:%u" % (1-1, 2**0))' > py.out])
 END
 
-$ACLOCAL
-$AUTOCONF
+# The "--force" option here is truly needed to avoid potential timestamp
+# races.  See automake bug#12210.
+$ACLOCAL --force
+$AUTOCONF --force
 ./configure
 test x"$(cat py.out)" = x0:1
 
diff --git a/t/python-missing.sh b/t/python-missing.sh
old mode 100644
new mode 100755
index c88a4f9..b0912d3
--- a/t/python-missing.sh
+++ b/t/python-missing.sh
@@ -58,8 +58,10 @@ rm -rf autom4te*.cache # Will have to re-run aclocal.
 
 # Hopefully the Python team will never release such a version :-)
 echo 'AM_PATH_PYTHON([9999.9], [])' > mypy.m4
-$ACLOCAL
-$AUTOCONF
+# The "--force" options (here and below) are truly needed to avoid
+# potential timestamp races.  See automake bug#12210.
+$ACLOCAL --force
+$AUTOCONF --force
 ./configure >stdout 2>stderr && {
   cat stdout
   cat stderr >&2


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]