[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, python-work, updated. v1.11
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, python-work, updated. v1.11-456-g20787ab |
Date: |
Sat, 10 Sep 2011 22:49:22 +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=20787ab1199329eda967d14a6fd1d7f6a92d149a
The branch, python-work has been updated
via 20787ab1199329eda967d14a6fd1d7f6a92d149a (commit)
via 5e4631085ef78ab2385429e123006e9daa1e7d7d (commit)
via 4412308796486424c901342ea9361cd0ce597184 (commit)
via 2d5a0d87ddeaaab474e4fc1d9816feb275711384 (commit)
via 30f99cbd07736c96603d15346fc8ad9097a0dddd (commit)
via 3c99e9dca034ba5cbe3848af024aea5b4fc19b6c (commit)
via eda087adfd260504766cf0667fac4dc80e2c0b91 (commit)
via 884694a8f84f97a584334fd58048be3de51b001a (commit)
via e25ee5889f3fdf9890e4a141e1c27d6a063b2ad9 (commit)
via ef44cad1cc983f43e6aa48f7b50d19346a7f55f4 (commit)
via eb59c423d7addf124d33f50ac920789db1304adb (commit)
via 1dcba7b847b137330ed91ef8269d403163387e7e (commit)
via 236ad0bcb351a6e0795a69f272646bd2201b4056 (commit)
via bbddd445708efd8e7a484645f7ebf9b2a3a76102 (commit)
from 672fd9352b5b8a07ab0c74cef2357770497fcdaa (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 20787ab1199329eda967d14a6fd1d7f6a92d149a
Merge: 672fd93 5e46310
Author: Stefano Lattarini <address@hidden>
Date: Sun Sep 11 00:47:09 2011 +0200
Merge branch 'maint' into python-work
* maint:
tests: fix spurious failure on fast machines
aclocal: better URL reference in error message
coverage: distcheck-hook to catch missing/outdated *.m4 files
aclocal: more granularity in acdir overriding
* tests/amhello-binpkg.test: Add missing $EXEEXT usage.
fix: list test 'vala-vpath.test' in XFAIL_TESTS
tests: simplify wrapper for aclocal
fix: minor typo in ChangeLog
coverage: vala support failing for VPATH from-scratch builds
docs: report few more automake parsing limitations
tests: list "forgotten" test script in TESTS
ylwrap: fix unusual indentation whitespace
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 120 ++++++++++++++++++++
NEWS | 8 ++
THANKS | 1 +
aclocal.in | 76 ++++++-------
bootstrap | 4 +-
doc/automake.texi | 84 ++++++++------
lib/ylwrap | 28 +++---
m4/Makefile.am | 12 ++-
m4/Makefile.in | 84 +++++++++-----
m4/{ => acdir}/dirlist | 0
tests/Makefile.am | 12 ++
tests/Makefile.in | 14 ++-
tests/acloca10.test | 5 +-
tests/acloca18.test | 21 +---
tests/aclocal-acdir.test | 97 ++++++++++++++++
...dist-acconfig.test => aclocal-print-acdir.test} | 29 ++----
tests/aclocal.in | 7 +-
tests/aclocal.test | 6 +-
tests/amhello-binpkg.test | 8 +-
tests/defs.in | 3 -
tests/distcheck-hook-m4.am | 30 +++++
tests/distcheck-missing-m4.test | 102 +++++++++++++++++
tests/distcheck-outdated-m4.test | 88 ++++++++++++++
....test => doc-parsing-buglets-colneq-subst.test} | 36 ++----
tests/doc-parsing-buglets-tabs.test | 61 ++++++++++
tests/java-empty-classpath.test | 4 +-
tests/{distcheck-hook.test => vala-vpath.test} | 43 ++++---
27 files changed, 766 insertions(+), 217 deletions(-)
rename m4/{ => acdir}/dirlist (100%)
create mode 100755 tests/aclocal-acdir.test
copy tests/{autodist-acconfig.test => aclocal-print-acdir.test} (60%)
create mode 100644 tests/distcheck-hook-m4.am
create mode 100755 tests/distcheck-missing-m4.test
create mode 100755 tests/distcheck-outdated-m4.test
copy tests/{distcheck-hook.test => doc-parsing-buglets-colneq-subst.test} (56%)
create mode 100755 tests/doc-parsing-buglets-tabs.test
copy tests/{distcheck-hook.test => vala-vpath.test} (61%)
diff --git a/ChangeLog b/ChangeLog
index 8c404e9..82ea76d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,123 @@
+2011-09-11 Stefano Lattarini <address@hidden>
+
+ tests: fix spurious failure on fast machines
+ * tests/aclocal-acdir.test: Avoid spurious failures due to caching
+ issues, by cleaning the autom4te cache between all the aclocal
+ invocations, and by always calling autoconf with the `--force'
+ flag.
+
+2011-09-09 Stefano Lattarini <address@hidden>
+
+ aclocal: better URL reference in error message
+ * aclocal.in (scan_file): In the error message about underquoted
+ definitions, reference the automake page at `www.gnu.org', not
+ at `sources.redhat.com'.
+
+2011-09-09 Stefano Lattarini <address@hidden>
+
+ coverage: distcheck-hook to catch missing/outdated *.m4 files
+ Related to automake bug#9037.
+ * tests/distcheck-missing-m4.test: New test.
+ * tests/distcheck-outdated-m4.test: Likewise.
+ * tests/distcheck-hook-m4.am: New data file, used by the new
+ tests.
+ * tests/Makefile.am (distcheck-m4-missing.log,
+ distcheck-m4-outdated.log): Depend on it.
+ (EXTRA_DIST): Distribute it.
+ (TESTS): Add the new tests.
+
+2011-09-06 Stefano Lattarini <address@hidden>
+
+ aclocal: more granularity in acdir overriding
+ Before this change, using the `--acdir' option caused aclocal to
+ redefine both the directory of automake-provided m4 macros and the
+ directory of third-party system-wide m4 macros. With this change,
+ we deprecate the `--acdir' aclocal option, and introduce two new
+ options `--automake-acdir' and `--system-acdir', to allow for more
+ granularity.
+ * aclocal.in (@automake_includes, @system_includes,
+ @user_includes): Fix and extend comments.
+ (usage): Update.
+ (handle_acdir_option): New function.
+ (parse_arguments): Recognize new options `--system-acdir' and
+ `automake-acdir', and handle `--acdir' using the new function
+ above. Simplify logic by assuming that the directory of
+ third-party system-wide m4 files always exists.
+ * tests/aclocal.in: Update to use the new options, instead of
+ the deprecated. `--acdir'.
+ * m4/dirlist: Move ...
+ * m4/acdir/dirlist: ... here.
+ * m4/Makefile.am (EXTRA_DIST): Update.
+ (m4datadir): Rename ...
+ (automake_acdir): ... to this. Accordingly, ...
+ (dist_m4data_DATA): ... rename this ...
+ (dist_automake_ac_DATA): ... to this.
+ (system_acdir): New, directory.
+ (dist_system_ac_DATA): New, defined to an empty value; this will
+ ensure that the $(system_acdir) directory will be created by
+ "make install".
+ * tests/aclocal.test: Remove check about the `--print-ac-dir'
+ option of aclocal, it has been moved into ...
+ * tests/aclocal-print-acdir.test: ... this new test, and quite
+ extended.
+ * tests/aclocal-acdir.test: New test.
+ * tests/Makefile.am (TESTS): Add the new tests.
+ * NEWS, bootstrap: Update.
+ * doc/automake.texi (aclocal Options, Macro Search Path): Update.
+
+2011-09-05 Peter Rosin <address@hidden>
+
+ * tests/amhello-binpkg.test: Add missing $EXEEXT usage.
+
+2011-09-04 Stefano Lattarini <address@hidden>
+
+ fix: list test 'vala-vpath.test' in XFAIL_TESTS
+ * tests/Makefile.am (XFAIL_TESTS): Update.
+
+2011-09-02 Stefano Lattarini <address@hidden>
+
+ tests: simplify wrapper for aclocal
+ * tests/aclocal.in: Remove use of $ACLOCAL_TESTSUITE_FLAGS and
+ extra `-I' flags; they are not really required, since the file
+ `m4/amversion.m4' is generated in the srcdir anyway.
+ * tests/acloca10.test: Remove use of $ACLOCAL_TESTSUITE_FLAGS.
+ * tests/acloca18.test: Likewise.
+ * tests/defs.in: Don't nullify $ACLOCAL_TESTSUITE_FLAGS, and do
+ not export it.
+
+2011-09-02 Stefano Lattarini <address@hidden>
+
+ coverage: vala support failing for VPATH from-scratch builds
+ * tests/vala-vpath.test: New test, xfailing.
+ * tests/Makefile.am (TESTS): Update.
+ * THANKS: Update.
+ From a report by Zbigniew JÄdrzejewski-Szmek.
+ Related to automake bug#8753.
+
+2011-09-01 Stefano Lattarini <address@hidden>
+
+ docs: report few more automake parsing limitations
+ Partly motivated by automake bug#8360.
+ * doc/automake.texi (General Operation): Report few more automake
+ limitations w.r.t. parsing of unusual makefile constructs. Related
+ minor reorderings.
+ * tests/doc-parsing-buglets-colneq-subst.test: New test.
+ * tests/doc-parsing-buglets-tabs.test: Likewise.
+ * tests/Makefile.am (TESTS): Update.
+
+2011-08-25 Stefano Lattarini <address@hidden>
+
+ tests: list "forgotten" test script in TESTS
+ * tests/Makefile.am (TESTS): Also list ...
+ * tests/java-empty-classpath.test: ... this test. Since we are
+ at it, remove trailing whitespace from a couple of lines.
+
+2011-08-25 Eric Blake <address@hidden>
+
+ ylwrap: fix unusual indentation whitespace
+ * lib/ylwrap: Convert tabs to spaces.
+ Reported by Karl Berry.
+
2011-08-17 Stefano Lattarini <address@hidden>
* THANKS (Daniel Richard G.): Update e-mail address.
diff --git a/NEWS b/NEWS
index 64cea63..c68f149 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,14 @@ New in 1.11.0a:
- The Automake support for automatic de-ANSI-fication will be removed in
the next major Automake release (1.12).
+ - The `--acdir' option of aclocal is deprecated, and will probably be
+ removed in the next major Automake release (1.12).
+
+* Changes to aclocal:
+
+ - The `--acdir' option is deprecated. Now you should use th new options
+ `--automake-acdir' and `--system-acdir' instead.
+
* Miscellaneous changes:
- The `lzma' compression scheme and associated automake option `dist-lzma'
diff --git a/THANKS b/THANKS
index d91c5bb..f83e1fc 100644
--- a/THANKS
+++ b/THANKS
@@ -365,6 +365,7 @@ William S Fulton address@hidden
Yann Droneaud address@hidden
Younes Younes address@hidden
Zack Weinberg address@hidden
+Zbigniew JÄdrzejewski-Szmek address@hidden
Zoltan Rado address@hidden
;; Local Variables:
diff --git a/aclocal.in b/aclocal.in
index 4b63c1a..ce77e1d 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -54,9 +54,11 @@ $perl_threads = 0;
# Include paths for searching macros. We search macros in this order:
# user-supplied directories first, then the directory containing the
# automake macros, and finally the system-wide directories for
-# third-party macro. @user_includes can be augmented with -I.
-# @system_includes can be augmented with the `dirlist' file. Also
-# --acdir will reset both @automake_includes and @system_includes.
+# third-party macros.
+# @user_includes can be augmented with -I.
+# @automake_includes can be reset with the `--automake-acdir' option.
+# @system_includes can be augmented with the `dirlist' file, and reset
+# with the `--system-acdir' option.
my @user_includes = ();
my @automake_includes = ("@datadir@/aclocal-$APIVERSION");
my @system_includes = ('@datadir@/aclocal');
@@ -562,7 +564,7 @@ sub scan_file ($$$)
{
msg ('syntax', "$file:$.", "warning: underquoted definition of $2"
. "\n run info '(automake)Extending aclocal'\n"
- . " or see http://sources.redhat.com/automake/"
+ . " or see http://www.gnu.org/software/automake/manual/"
. "automake.html#Extending-aclocal")
unless $underquoted_manual_once;
$underquoted_manual_once = 1;
@@ -877,7 +879,8 @@ sub usage ($)
Generate `aclocal.m4' by scanning `configure.ac' or `configure.in'
Options:
- --acdir=DIR directory holding config files (for debugging)
+ --automake-acdir=DIR directory holding automake-provided m4 files
+ --system-acdir=DIR directory holding third-party system-wide files
--diff[=COMMAND] run COMMAND [diff -u] on M4 files that would be
changed (implies --install and --dry-run)
--dry-run pretend to, but do not actually update any file
@@ -886,7 +889,8 @@ Options:
-I DIR add directory to search list for .m4 files
--install copy third-party files to the first -I directory
--output=FILE put output in FILE (default aclocal.m4)
- --print-ac-dir print name of directory holding m4 files, then exit
+ --print-ac-dir print name of directory holding system-wide
+ third-party m4 files, then exit
--verbose don't be silent
--version print version number, then exit
-W, --warnings=CATEGORY report the warnings falling in CATEGORY
@@ -923,6 +927,15 @@ EOF
exit 0;
}
+# Using --acdir overrides both the automake (versioned) directory and
+# the public (unversioned) system directory. This usage is obsolete.
+sub handle_acdir_option ($$)
+{
+ msg 'obsolete', '', "`--acdir' is deprecated\n";
+ @system_includes = ($_[1]);
+ @automake_includes = ();
+}
+
# Parse command line.
sub parse_arguments ()
{
@@ -931,12 +944,9 @@ sub parse_arguments ()
my %cli_options =
(
- 'acdir=s' => sub # Setting --acdir overrides both the
- { # automake (versioned) directory and the
- # public (unversioned) system directory.
- @automake_includes = ();
- @system_includes = ($_[1])
- },
+ 'acdir=s' => \&handle_acdir_option,
+ 'system-acdir=s' => sub { shift; @system_includes = @_; },
+ 'automake-acdir=s' => sub { shift; @automake_includes = @_; },
'diff:s' => \$diff_command,
'dry-run' => \$dry_run,
'force' => \$force_output,
@@ -1017,34 +1027,22 @@ sub parse_arguments ()
. "\nfirst -I option, but no -I was supplied.");
}
- if (! -d $system_includes[0])
+ # Finally, adds any directory listed in the `dirlist' file.
+ if (open (DIRLIST, "$system_includes[0]/dirlist"))
{
- # By default $(datadir)/aclocal doesn't exist. We don't want to
- # get an error in the case where we are searching the default
- # directory and it hasn't been created. (We know
- # @system_includes has its default value if @automake_includes
- # is not empty, because --acdir is the only way to change this.)
- @system_includes = () if @automake_includes;
- }
- else
- {
- # Finally, adds any directory listed in the `dirlist' file.
- if (open (DIRLIST, "$system_includes[0]/dirlist"))
- {
- while (<DIRLIST>)
- {
- # Ignore '#' lines.
- next if /^#/;
- # strip off newlines and end-of-line comments
- s/\s*\#.*$//;
- chomp;
- foreach my $dir (glob)
- {
- push (@system_includes, $dir) if -d $dir;
- }
- }
- close (DIRLIST);
- }
+ while (<DIRLIST>)
+ {
+ # Ignore '#' lines.
+ next if /^#/;
+ # strip off newlines and end-of-line comments
+ s/\s*\#.*$//;
+ chomp;
+ foreach my $dir (glob)
+ {
+ push (@system_includes, $dir) if -d $dir;
+ }
+ }
+ close (DIRLIST);
}
}
diff --git a/bootstrap b/bootstrap
index 9f1a8d8..c0043a3 100755
--- a/bootstrap
+++ b/bootstrap
@@ -109,7 +109,9 @@ $BOOTSTRAP_SHELL ./gen-parallel-tests > parallel-tests.am
cd ..
# Run the autotools.
-$PERL ./aclocal.tmp -I m4
+# Use `-I' here so that our own *.m4 files in m4/ gets included,
+# not copied, in aclocal.m4.
+$PERL ./aclocal.tmp -I m4 --automake-acdir m4 --system-acdir m4/acdir
$AUTOCONF
$PERL ./automake.tmp
diff --git a/doc/automake.texi b/doc/automake.texi
index 49a6cd1..bf2c872 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -1813,14 +1813,30 @@ supported. This operator appends its right hand
argument to the variable
specified on the left. Automake will translate the operator into
an ordinary @samp{=} operator; @samp{+=} will thus work with any make program.
address@hidden indentation
-Further note that variable assignments should not be indented with
address@hidden characters, use spaces if necessary. On the other hand,
-rule commands should be indented with a leading @key{TAB} character.
-
Automake tries to keep comments grouped with any adjoining rules or
variable definitions.
address@hidden Limitations of automake parser
address@hidden Automake parser, limitations of
address@hidden indentation in Makefile.am
+Generally, Automake is not particularly smart in the parsing of unusual
+Makefile constructs, so you're advised to avoid fancy constructs or
+``creative'' use of whitespaces.
address@hidden Keep this in sync with doc-parsing-buglets-tabs.test.
+For example, @key{TAB} characters cannot be used between a target name
+and the following address@hidden:}'' character, and variable assignments
+shouldn't be indented with @key{TAB} characters.
address@hidden Keep this in sync with doc-parsing-buglets-colneq-subst.test.
+Also, using more complex macro in target names can cause trouble:
+
address@hidden
+% @kbd{cat Makefile.am}
+$(FOO:=x): bar
+% @kbd{automake}
+Makefile.am:1: bad characters in variable name `$(FOO'
+Makefile.am:1: `:='-style assignments are not portable
address@hidden example
+
@cindex Make targets, overriding
@cindex Make rules, overriding
@cindex Overriding make rules
@@ -3170,10 +3186,21 @@ overridden using the @env{AUTOM4TE} environment
variable.
@command{aclocal} accepts the following options:
@table @code
address@hidden address@hidden
address@hidden --automake-acdir
+Look for the automake-provided macro files in @var{dir} instead of
+in the installation directory. This is typically used for debugging.
+
address@hidden address@hidden
address@hidden --system-acdir
+Look for the system-wide third-party macro files (and the special
address@hidden file) in @var{dir} instead of in the installation
+directory. This is typically used for debugging.
+
@item address@hidden
@opindex --acdir
-Look for the macro files in @var{dir} instead of the installation
-directory. This is typically used for debugging.
address@hidden shorthand for address@hidden@var{dir}
address@hidden''. Will be removed in future aclocal versions.
@item address@hidden
@opindex --diff
@@ -3278,7 +3305,7 @@ directories, in this order:
@item @var{acdir-APIVERSION}
This is where the @file{.m4} macros distributed with Automake itself
are stored. @var{APIVERSION} depends on the Automake release used;
-for Automake 1.6.x, @var{APIVERSION} = @code{1.6}.
+for example, for Automake 1.11.x, @var{APIVERSION} = @code{1.11}.
@item @var{acdir}
This directory is intended for third party @file{.m4} files, and is
@@ -3289,31 +3316,24 @@ value of @var{acdir}, use the @option{--print-ac-dir}
option
(@pxref{aclocal Options}).
@end table
-As an example, suppose that @command{automake-1.6.2} was configured with
+As an example, suppose that @command{automake-1.11.2} was configured with
@address@hidden/usr/local}. Then, the search path would be:
@enumerate
address@hidden @file{/usr/local/share/aclocal-1.6/}
address@hidden @file{/usr/local/share/aclocal-1.11.2/}
@item @file{/usr/local/share/aclocal/}
@end enumerate
+The paths for the @var{acdir} and @var{acdir-APIVERSION} directories can
+be changed respectively through aclocal options @option{--system-acdir}
+and @option{--automake-acdir} (@pxref{aclocal Options}). Note however
+that these options are only intended for use by the internal Automake
+test suite, or for debugging under highly unusual situations; they are
+not ordinarily needed by end-users.
+
As explained in (@pxref{aclocal Options}), there are several options that
can be used to change or extend this search path.
address@hidden Modifying the Macro Search Path: @option{--acdir}
-
-The most erroneous option to modify the search path is
address@hidden@var{dir}}, which changes default directory and
-drops the @var{APIVERSION} directory. For example, if one specifies
address@hidden/opt/private/}, then the search path becomes:
-
address@hidden
address@hidden @file{/opt/private/}
address@hidden enumerate
-
-This option, @option{--acdir}, is intended for use by the internal
-Automake test suite only; it is not ordinarily needed by end-users.
-
@subsubheading Modifying the Macro Search Path: @samp{-I @var{dir}}
Any extra directories specified using @option{-I} options
@@ -3363,21 +3383,19 @@ Then, the search path would be
@noindent
and all directories with path names starting with @code{/test3}.
-If the @address@hidden option is used, then @command{aclocal}
-will search for the @file{dirlist} file in @var{dir}. In the
address@hidden/opt/private/} example above, @command{aclocal} would look
-for @file{/opt/private/dirlist}. Again, however, the @option{--acdir}
-option is intended for use by the internal Automake test suite only;
address@hidden is not ordinarily needed by end-users.
+If the @address@hidden option is used, then
address@hidden will search for the @file{dirlist} file in
address@hidden; but remember the warnings above against the use of
address@hidden
@file{dirlist} is useful in the following situation: suppose that
address@hidden version @code{1.6.2} is installed with
address@hidden version @code{1.11.2} is installed with
@samp{--prefix=/usr} by the system vendor. Thus, the default search
directories are
@c @code looks better than @file here
@enumerate
address@hidden @code{/usr/share/aclocal-1.6/}
address@hidden @code{/usr/share/aclocal-1.11/}
@item @code{/usr/share/aclocal/}
@end enumerate
@@ -3398,7 +3416,7 @@ Now, the ``default'' search path on the affected system is
@c @code looks better than @file here
@enumerate
address@hidden @code{/usr/share/aclocal-1.6/}
address@hidden @code{/usr/share/aclocal-1.11/}
@item @code{/usr/share/aclocal/}
@item @code{/usr/local/share/aclocal/}
@end enumerate
diff --git a/lib/ylwrap b/lib/ylwrap
index 92b2011..9253635 100755
--- a/lib/ylwrap
+++ b/lib/ylwrap
@@ -1,10 +1,10 @@
#! /bin/sh
# ylwrap - wrapper for lex/yacc invocations.
-scriptversion=2010-02-06.18; # UTC
+scriptversion=2011-08-25.18; # UTC
# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
-# 2007, 2009, 2010 Free Software Foundation, Inc.
+# 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
#
# Written by Tom Tromey <address@hidden>.
#
@@ -137,19 +137,19 @@ if test $ret -eq 0; then
# Handle y_tab.c and y_tab.h output by DOS
if test $y_tab_nodot = "yes"; then
if test $from = "y.tab.c"; then
- from="y_tab.c"
+ from="y_tab.c"
else
- if test $from = "y.tab.h"; then
- from="y_tab.h"
- fi
+ if test $from = "y.tab.h"; then
+ from="y_tab.h"
+ fi
fi
fi
if test -f "$from"; then
# If $2 is an absolute path name, then just use that,
# otherwise prepend `../'.
case "$2" in
- [\\/]* | ?:[\\/]*) target="$2";;
- *) target="../$2";;
+ [\\/]* | ?:[\\/]*) target="$2";;
+ *) target="../$2";;
esac
# We do not want to overwrite a header file if it hasn't
@@ -159,8 +159,8 @@ if test $ret -eq 0; then
# Makefile. Divert the output of all other files to a temporary
# file so we can compare them to existing versions.
if test $first = no; then
- realtarget="$target"
- target="tmp-`echo $target | sed s/.*[\\/]//g`"
+ realtarget="$target"
+ target="tmp-`echo $target | sed s/.*[\\/]//g`"
fi
# Edit out `#line' or `#' directives.
#
@@ -184,10 +184,10 @@ if test $ret -eq 0; then
# Check whether header files must be updated.
if test $first = no; then
- if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
- echo "$2" is unchanged
- rm -f "$target"
- else
+ if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
+ echo "$2" is unchanged
+ rm -f "$target"
+ else
echo updating "$2"
mv -f "$target" "$realtarget"
fi
diff --git a/m4/Makefile.am b/m4/Makefile.am
index 0cf074b..143df71 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -3,7 +3,7 @@
## Makefile for Automake m4.
# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
+# 2008, 2009, 2011 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
@@ -18,9 +18,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/>.
-m4datadir = $(datadir)/aclocal-$(APIVERSION)
+automake_acdir = $(datadir)/aclocal-$(APIVERSION)
+system_acdir = $(datadir)/aclocal
-dist_m4data_DATA = \
+dist_automake_ac_DATA = \
$(top_srcdir)/m4/amversion.m4 \
as.m4 \
auxdir.m4 \
@@ -59,7 +60,10 @@ tar.m4 \
upc.m4 \
vala.m4
-EXTRA_DIST = dirlist amversion.in
+# So that $(system_acdir) will be created by "make install".
+dist_system_ac_DATA =
+
+EXTRA_DIST = acdir/dirlist amversion.in
# We build amversion.m4 here, instead of from config.status,
# because config.status is rerun each time one of configure's
diff --git a/m4/Makefile.in b/m4/Makefile.in
index ff4dd43..2e7e547 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -16,7 +16,7 @@
@SET_MAKE@
# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
+# 2008, 2009, 2011 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
@@ -50,8 +50,8 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
subdir = m4
-DIST_COMMON = $(dist_m4data_DATA) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
+DIST_COMMON = $(dist_automake_ac_DATA) $(dist_system_ac_DATA) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
$(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/init.m4 \
@@ -89,8 +89,9 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(m4datadir)"
-DATA = $(dist_m4data_DATA)
+am__installdirs = "$(DESTDIR)$(automake_acdir)" \
+ "$(DESTDIR)$(system_acdir)"
+DATA = $(dist_automake_ac_DATA) $(dist_system_ac_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -185,8 +186,9 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-m4datadir = $(datadir)/aclocal-$(APIVERSION)
-dist_m4data_DATA = \
+automake_acdir = $(datadir)/aclocal-$(APIVERSION)
+system_acdir = $(datadir)/aclocal
+dist_automake_ac_DATA = \
$(top_srcdir)/m4/amversion.m4 \
as.m4 \
auxdir.m4 \
@@ -225,7 +227,10 @@ tar.m4 \
upc.m4 \
vala.m4
-EXTRA_DIST = dirlist amversion.in
+
+# So that $(system_acdir) will be created by "make install".
+dist_system_ac_DATA =
+EXTRA_DIST = acdir/dirlist amversion.in
all: all-am
.SUFFIXES:
@@ -259,26 +264,46 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
-install-dist_m4dataDATA: $(dist_m4data_DATA)
+install-dist_automake_acDATA: $(dist_automake_ac_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(automake_acdir)" || $(MKDIR_P) "$(DESTDIR)$(automake_acdir)"
+ @list='$(dist_automake_ac_DATA)'; test -n "$(automake_acdir)" || list=;
\
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(automake_acdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(automake_acdir)" || exit $$?; \
+ done
+
+uninstall-dist_automake_acDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_automake_ac_DATA)'; test -n "$(automake_acdir)" || list=;
\
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(automake_acdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(automake_acdir)" && rm -f $$files
+install-dist_system_acDATA: $(dist_system_ac_DATA)
@$(NORMAL_INSTALL)
- test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)"
- @list='$(dist_m4data_DATA)'; test -n "$(m4datadir)" || list=; \
+ test -z "$(system_acdir)" || $(MKDIR_P) "$(DESTDIR)$(system_acdir)"
+ @list='$(dist_system_ac_DATA)'; test -n "$(system_acdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(m4datadir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(m4datadir)" || exit $$?; \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(system_acdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(system_acdir)" || exit $$?; \
done
-uninstall-dist_m4dataDATA:
+uninstall-dist_system_acDATA:
@$(NORMAL_UNINSTALL)
- @list='$(dist_m4data_DATA)'; test -n "$(m4datadir)" || list=; \
+ @list='$(dist_system_ac_DATA)'; test -n "$(system_acdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(m4datadir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(m4datadir)" && rm -f $$files
+ echo " ( cd '$(DESTDIR)$(system_acdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(system_acdir)" && rm -f $$files
tags: TAGS
TAGS:
@@ -320,7 +345,7 @@ check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
- for dir in "$(DESTDIR)$(m4datadir)"; do \
+ for dir in "$(DESTDIR)$(automake_acdir)" "$(DESTDIR)$(system_acdir)";
do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -373,7 +398,8 @@ info: info-am
info-am:
-install-data-am: install-dist_m4dataDATA
+install-data-am: install-dist_automake_acDATA \
+ install-dist_system_acDATA
install-dvi: install-dvi-am
@@ -417,21 +443,23 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-dist_m4dataDATA
+uninstall-am: uninstall-dist_automake_acDATA \
+ uninstall-dist_system_acDATA
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
- install-dist_m4dataDATA install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am uninstall uninstall-am \
- uninstall-dist_m4dataDATA
+ install-dist_automake_acDATA install-dist_system_acDATA \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
+ uninstall-am uninstall-dist_automake_acDATA \
+ uninstall-dist_system_acDATA
# We build amversion.m4 here, instead of from config.status,
diff --git a/m4/dirlist b/m4/acdir/dirlist
similarity index 100%
rename from m4/dirlist
rename to m4/acdir/dirlist
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 66f649b..cd162b4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -23,6 +23,7 @@ cond17.test \
gcj6.test \
pr8365-remake-timing.test \
yacc-dist-nobuild-subdir.test \
+vala-vpath.test \
txinfo5.test
include $(srcdir)/parallel-tests.am
@@ -70,6 +71,8 @@ acloca19.test \
acloca20.test \
acloca21.test \
acloca22.test \
+aclocal-acdir.test \
+aclocal-print-acdir.test \
acoutnoq.test \
acoutpt.test \
acoutpt2.test \
@@ -324,7 +327,11 @@ distcheck-configure-flags-am.test \
distcheck-configure-flags-subpkg.test \
distcheck-hook.test \
distcheck-hook2.test \
+distcheck-missing-m4.test \
+distcheck-outdated-m4.test \
dmalloc.test \
+doc-parsing-buglets-colneq-subst.test \
+doc-parsing-buglets-tabs.test \
dollar.test \
dollarvar.test \
dollarvar2.test \
@@ -444,6 +451,7 @@ java.test \
java2.test \
java3.test \
java-check.test \
+java-empty-classpath.test \
javaprim.test \
javasubst.test \
ldadd.test \
@@ -840,6 +848,7 @@ vala2.test \
vala3.test \
vala4.test \
vala5.test \
+vala-vpath.test \
vars.test \
vars3.test \
vartar.test \
@@ -880,6 +889,9 @@ $(parallel_tests)
EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS)
+distcheck-missing-m4.log distcheck-outdated-m4.log: distcheck-hook-m4.am
+EXTRA_DIST += distcheck-hook-m4.am
+
# Each test case depends on defs, aclocal, and automake.
check_SCRIPTS = defs aclocal-$(APIVERSION) automake-$(APIVERSION)
diff --git a/tests/Makefile.in b/tests/Makefile.in
index d0bb0cb..0279cf7 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -288,6 +288,7 @@ cond17.test \
gcj6.test \
pr8365-remake-timing.test \
yacc-dist-nobuild-subdir.test \
+vala-vpath.test \
txinfo5.test
parallel_tests = \
@@ -348,6 +349,8 @@ acloca19.test \
acloca20.test \
acloca21.test \
acloca22.test \
+aclocal-acdir.test \
+aclocal-print-acdir.test \
acoutnoq.test \
acoutpt.test \
acoutpt2.test \
@@ -602,7 +605,11 @@ distcheck-configure-flags-am.test \
distcheck-configure-flags-subpkg.test \
distcheck-hook.test \
distcheck-hook2.test \
+distcheck-missing-m4.test \
+distcheck-outdated-m4.test \
dmalloc.test \
+doc-parsing-buglets-colneq-subst.test \
+doc-parsing-buglets-tabs.test \
dollar.test \
dollarvar.test \
dollarvar2.test \
@@ -722,6 +729,7 @@ java.test \
java2.test \
java3.test \
java-check.test \
+java-empty-classpath.test \
javaprim.test \
javasubst.test \
ldadd.test \
@@ -1118,6 +1126,7 @@ vala2.test \
vala3.test \
vala4.test \
vala5.test \
+vala-vpath.test \
vars.test \
vars3.test \
vartar.test \
@@ -1156,7 +1165,8 @@ yflags.test \
yflags2.test \
$(parallel_tests)
-EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS)
+EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS) \
+ distcheck-hook-m4.am
# Each test case depends on defs, aclocal, and automake.
check_SCRIPTS = defs aclocal-$(APIVERSION) automake-$(APIVERSION)
@@ -1494,6 +1504,8 @@ $(parallel_tests): $(parallel_tests:-p.test=.test)
Makefile.am
< $(srcdir)/$$input >$@
chmod a+rx $@
+distcheck-missing-m4.log distcheck-outdated-m4.log: distcheck-hook-m4.am
+
clean-local: clean-local-check
.PHONY: clean-local-check
clean-local-check:
diff --git a/tests/acloca10.test b/tests/acloca10.test
index 7716f2a..d7a058f 100755
--- a/tests/acloca10.test
+++ b/tests/acloca10.test
@@ -65,8 +65,7 @@ grep MACRO3 aclocal.m4
test ! -f m4_1/macro.m4
test ! -f m4_2/macro.m4
-ACLOCAL_TESTSUITE_FLAGS='-I m4_1 -I m4_2'
-$ACLOCAL --install
+$ACLOCAL -I m4_1 -I m4_2 --install
$AUTOCONF
./configure
grep macro11 foo
@@ -78,7 +77,7 @@ test ! -f m4_2/macro.m4
cp aclocal.m4 copy.m4
echo '#GREPME' >>dirlist-test/macro.m4
-$ACLOCAL --install
+$ACLOCAL -I m4_1 -I m4_2 --install
$AUTOCONF
./configure
grep macro11 foo
diff --git a/tests/acloca18.test b/tests/acloca18.test
index 9826892..5032a8d 100755
--- a/tests/acloca18.test
+++ b/tests/acloca18.test
@@ -53,52 +53,45 @@ cat >4/mumble.m4 <<EOF
AC_DEFUN([AM_MACRO1], [echo macro14 >> foo])
EOF
-
-ACLOCAL_TESTSUITE_FLAGS='-I 1 -I 2 -I 3 -I 4'
-
-$ACLOCAL
+$ACLOCAL -I 1 -I 2 -I 3 -I 4
$AUTOCONF
./configure
grep macro11 foo
grep macro21 foo
rm -f foo
-$ACLOCAL --install
+$ACLOCAL -I 1 -I 2 -I 3 -I 4 --install
$AUTOCONF
./configure
grep macro12 foo
grep macro23 foo
-ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2 -I 3'
rm -f foo
-$ACLOCAL --install --dry-run
+$ACLOCAL -I 4 -I 1 -I 2 -I 3 --install --dry-run
$AUTOCONF
./configure
grep macro12 foo
grep macro23 foo
rm -f foo
-$ACLOCAL --install
+$ACLOCAL -I 4 -I 1 -I 2 -I 3 --install
$AUTOCONF
./configure
grep macro14 foo
grep macro23 foo
-ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2'
rm -f foo
-$ACLOCAL --install 2>stderr && { cat stderr >&2; Exit 1; }
+$ACLOCAL -I 4 -I 1 -I 2 --install 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
grep 'macro.*AM_MACRO2.*not found' stderr
-ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1'
rm -f foo
-$ACLOCAL --install
+$ACLOCAL -I 4 -I 1 --install
$AUTOCONF
./configure
grep macro14 foo
grep macro21 foo
-
mkdir dirlist-test
cat >dirlist-test/m1.m4 <<EOF
#serial 456
@@ -106,7 +99,7 @@ AC_DEFUN([AM_MACRO1], [echo macro1d >> foo])
AC_DEFUN([AM_MACRO2], [echo macro2d >> foo])
EOF
rm -f foo
-$ACLOCAL --diff=diff >stdout 2>stderr || {
+$ACLOCAL -I 4 -I 1 --diff=diff >stdout 2>stderr || {
cat stderr >&2
cat stdout
Exit 1
diff --git a/tests/aclocal-acdir.test b/tests/aclocal-acdir.test
new file mode 100755
index 0000000..e02db30
--- /dev/null
+++ b/tests/aclocal-acdir.test
@@ -0,0 +1,97 @@
+#! /bin/sh
+# Copyright (C) 2011 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 aclocal's `--acdir', `--automake-acdir' and `--system-acdir'
+# options. Also check that stuff in the automake acdir takes precedence
+# over stuff in the system acdir.
+
+. ./defs || Exit 1
+
+set -e
+
+mkdir am sys
+
+cat >> configure.in <<'END'
+MY_MACRO
+END
+
+cat > am/foo.m4 <<'END'
+AC_DEFUN([AM_INIT_AUTOMAKE], [fake--init--automake])
+END
+
+cat > sys/foo.m4 <<'END'
+AC_DEFUN([MY_MACRO], [my--macro])
+END
+
+$ACLOCAL --automake-acdir am
+$AUTOCONF --force
+$FGREP 'fake--init--automake' configure
+$FGREP 'MY_MACRO' configure
+
+rm -rf autom4te*.cache
+
+$ACLOCAL --system-acdir sys
+$AUTOCONF --force
+$FGREP 'am__api_version' configure
+$FGREP 'my--macro' configure
+
+rm -rf autom4te*.cache
+
+$ACLOCAL --automake-acdir am --system-acdir sys
+$AUTOCONF --force
+$FGREP 'fake--init--automake' configure
+$FGREP 'my--macro' configure
+
+rm -rf autom4te*.cache
+
+$ACLOCAL --system-acdir sys --automake-acdir am
+$AUTOCONF --force
+$FGREP 'fake--init--automake' configure
+$FGREP 'my--macro' configure
+
+rm -rf autom4te*.cache
+
+# Stuff in automake acdir takes precedence over stuff in system acdir.
+cat > am/bar.m4 <<'END'
+AC_DEFUN([MY_MACRO], [am--macro])
+END
+$ACLOCAL --automake-acdir am --system-acdir sys
+$AUTOCONF --force
+$FGREP 'fake--init--automake' configure
+$FGREP 'am--macro' configure
+$FGREP 'my--macro' configure && Exit 1 # Just to be sure.
+
+rm -rf autom4te*.cache
+
+# Obsolescent `--acdir' option.
+$ACLOCAL -Wobsolete --acdir am 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep '.*--acdir.*deprecated' stderr
+
+rm -rf autom4te*.cache
+
+$ACLOCAL -Wno-obsolete --acdir am
+$AUTOCONF --force
+$FGREP 'fake--init--automake' configure
+$FGREP 'am--macro' configure
+
+rm -rf autom4te*.cache
+
+$ACLOCAL -Wno-obsolete --acdir sys 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'macro .*AM_INIT_AUTOMAKE.* not found' stderr
+
+:
diff --git a/tests/autodist-acconfig.test b/tests/aclocal-print-acdir.test
similarity index 60%
copy from tests/autodist-acconfig.test
copy to tests/aclocal-print-acdir.test
index 49ab2f0..368416c 100755
--- a/tests/autodist-acconfig.test
+++ b/tests/aclocal-print-acdir.test
@@ -14,33 +14,22 @@
# 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 `acconfig.h' is automatically distributed if it exists
-# (at automake runtime).
-# Related to automake bug#7819.
+# Test on aclocal's `--print-ac-dir' option.
. ./defs || Exit 1
set -e
-cat >> configure.in <<END
-AC_OUTPUT
-END
+$ACLOCAL --print-ac-dir
+test "`$ACLOCAL --print-ac-dir`" = "$testaclocaldir/acdir"
-cat > Makefile.am <<'END'
-.PHONY: test
-test: distdir
- ls -l $(distdir)
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]acconfig\.h '
- test -f $(distdir)/acconfig.h
-END
+$ACLOCAL -Wno-obsolete --acdir foo --print-ac-dir
+test "`$ACLOCAL -Wno-obsolete --acdir foo --print-ac-dir`" = foo
-: > acconfig.h
+$ACLOCAL --system-acdir /bar --print-ac-dir
+test "`$ACLOCAL --system-acdir /bar --print-ac-dir`" = /bar
-$ACLOCAL
-$AUTOMAKE
-$AUTOCONF
-
-./configure
-$MAKE test
+$ACLOCAL --automake-acdir /bar --print-ac-dir
+test "`$ACLOCAL --automake-acdir /bar --print-ac-dir`" =
"$testaclocaldir/acdir"
:
diff --git a/tests/aclocal.in b/tests/aclocal.in
index 35b1619..5326ad0 100644
--- a/tests/aclocal.in
+++ b/tests/aclocal.in
@@ -12,7 +12,6 @@ fi
perllibdir="@abs_top_builddir@/address@hidden@@abs_top_srcdir@/lib"
export perllibdir
-# Most of the files are in $srcdir/../m4. However amversion.m4 is
-# generated in ../m4, so we include that directory in the search path too.
-exec "@abs_top_builddir@/aclocal" $ACLOCAL_TESTSUITE_FLAGS \
- -I "@abs_top_builddir@/m4" "address@hidden@/m4" ${1+"$@"}
+
+exec "@abs_top_builddir@/aclocal" "address@hidden@/m4" \
+ "address@hidden@/m4/acdir" ${1+"$@"}
diff --git a/tests/aclocal.test b/tests/aclocal.test
index da80d08..439faa9 100755
--- a/tests/aclocal.test
+++ b/tests/aclocal.test
@@ -15,8 +15,8 @@
# 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 to make sure that aclocal --output works. Report from
-# Alexandre Oliva.
+# Test on some aclocal options. Report from Alexandre Oliva.
+
. ./defs || Exit 1
set -e
@@ -41,6 +41,4 @@ grep '[Tt]ry.*--help.*for more information' stderr
$ACLOCAL --versi
-test "`$ACLOCAL --print-ac-dir`" = "$testaclocaldir"
-
:
diff --git a/tests/amhello-binpkg.test b/tests/amhello-binpkg.test
index f11421f..59813cc 100755
--- a/tests/amhello-binpkg.test
+++ b/tests/amhello-binpkg.test
@@ -34,16 +34,18 @@ cd inst
find . -type f -print > ../files.lst
tar cvf amhello-1.0-i686.tar.gz `cat ../files.lst` > tar.got 2>&1
+EXEEXT=`sed -n -e 's/^EXEEXT *= *//p' < ../Makefile`
+
if tar --version </dev/null | grep GNU; then
LC_ALL=C sort tar.got > t
mv -f t tar.got
- diff - tar.got <<'END'
-./usr/bin/hello
+ diff - tar.got <<END
+./usr/bin/hello$EXEEXT
./usr/share/doc/amhello/README
END
else
: Be laxer with other tar implementations, to avoid spurious failures.
- $EGREP '(^| )\./usr/bin/hello( |$)' tar.got
+ $EGREP '(^| )\./usr/bin/hello'$EXEEXT'( |$)' tar.got
$EGREP '(^| )\./usr/share/doc/amhello/README( |$)' tar.got
fi
diff --git a/tests/defs.in b/tests/defs.in
index 7759455..f999092 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -106,9 +106,6 @@ test -z "$MISSING" && MISSING=`pwd`/../lib/missing
# Use -Werror because this also turns some Perl warnings into error.
# (Tests for which this is inappropriate should use -Wno-error.)
test -z "$ACLOCAL" && ACLOCAL="aclocal-$APIVERSION -Werror"
-# Extra flags to pass to aclocal before all other flags added by this script.
-ACLOCAL_TESTSUITE_FLAGS=
-export ACLOCAL_TESTSUITE_FLAGS
# See how Automake should be run. We put --foreign as the default
# strictness to avoid having to create lots and lots of files. A test
diff --git a/tests/distcheck-hook-m4.am b/tests/distcheck-hook-m4.am
new file mode 100644
index 0000000..88681e9
--- /dev/null
+++ b/tests/distcheck-hook-m4.am
@@ -0,0 +1,30 @@
+## Data files for some tests. Not used in the automake build system.
+##
+## Copyright (C) 2011 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/>.
+
+distcheck-hook:
+ @fatal () { echo "$@: $$*" >&2; exit 1; }; \
+ $(am__cd) $(distdir) && chmod u+w . && mkdir _m4 \
+ || fatal "cannot setup distdir"; \
+ $(ACLOCAL) -I _m4 $(ACLOCAL_AMFLAGS) --install --output=_am.m4 \
+ || fatal "cannot regenerate aclocal.m4"; \
+ lst=`ls _m4 | tr '\012\015' ' '`; \
+ if test -n "$$lst"; then \
+ fatal "required m4 files not distributed or outdated: $$lst"; \
+ fi; \
+ $(AUTOCONF) -o /dev/null || fatal "can't remake configure"; \
+ rm -rf _m4 _am.m4 autom4te.cache && chmod a-w . \
+ || fatal "cannot reset distdir"
diff --git a/tests/distcheck-missing-m4.test b/tests/distcheck-missing-m4.test
new file mode 100755
index 0000000..f4e0eda
--- /dev/null
+++ b/tests/distcheck-missing-m4.test
@@ -0,0 +1,102 @@
+#! /bin/sh
+# Copyright (C) 2011 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 that we can define a distcheck-hook to diagnose m4 files
+# missing from the dist tarball (interaction with `--install').
+# See automake bug#9037.
+
+. ./defs || Exit 1
+
+set -e
+
+cwd=`pwd` || fatal_ "cannot get current working directory"
+
+cp "$testsrcdir"/distcheck-hook-m4.am . \
+ || fatal_ "cannot fetch makefile fragment \`distcheck-hook-m4.am'"
+
+cat > Makefile.am << 'END'
+## The lack of `--install' here is meant.
+ACLOCAL_AMFLAGS = -I m4
+include $(srcdir)/distcheck-hook-m4.am
+END
+
+cat >> configure.in << 'END'
+dnl We *deliberately* don't use m4_pattern_forbid here.
+AC_OUTPUT
+MY_FOO
+MY_BAR
+MY_BAZ
+END
+
+mkdir m4 acdir acdir1 acdir2
+
+cat > acdir/dirlist << END
+$cwd/acdir1
+$cwd/acdir2
+END
+
+echo 'AC_DEFUN([MY_FOO], [:])' > m4/foo.m4
+echo 'AC_DEFUN([MY_BAR], [:])' > acdir1/bar.m4
+echo 'AC_DEFUN([MY_BAZ], [:])' > acdir1/baz.m4
+echo 'AC_DEFUN([MY_QUX], [:])' > acdir2/qux.m4
+
+ACLOCAL="$ACLOCAL --system-acdir=$cwd/acdir"; export ACLOCAL
+
+# We don't use `--install' here. Our distcheck-hook should catch this.
+$ACLOCAL -I m4
+$AUTOCONF
+$EGREP 'MY_(FOO|BAR|BAZ)' configure && Exit 1 # Sanity check.
+$AUTOMAKE
+
+./configure
+
+$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+cat output
+$EGREP "required m4 file.*not distributed.* bar.m4( |$)" output
+$EGREP "required m4 file.*not distributed.* baz.m4( |$)" output
+# Check that we don't fail for spurious errors.
+$EGREP -i 'mkdir:|autom4te.*\.cache|:.*(permission|denied)' output && Exit 1
+
+# Now we use `--install', and "make distcheck" should pass.
+$ACLOCAL -I m4 --install
+test -f m4/bar.m4 # Sanity check.
+test -f m4/baz.m4 # Likewise.
+using_gmake || $MAKE Makefile
+$MAKE distcheck
+
+# We start to use a new "third-party" macro from a new .m4 file, but forget
+# to re-run "aclocal --install" by hand, relying on automatic remake rules.
+# Our distcheck-hook should catch this too.
+echo MY_QUX >> configure.in
+
+$MAKE
+$EGREP 'MY_(FOO|BAR|BAZ|QUX)' configure && Exit 1 # Sanity check.
+
+$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+cat output
+$EGREP "required m4 file.*not distributed.* qux.m4( |$)" output
+# Check that we don't fail for spurious errors.
+$EGREP -i 'mkdir:|autom4te.*\.cache|permission|denied' output && Exit 1
+# Check that we don't complain for files that should have been found.
+grep " ba[rz].m4" output && Exit 1
+
+# Now we again use `--install', and "make distcheck" should pass.
+$ACLOCAL -I m4 --install
+test -f m4/qux.m4 # Sanity check.
+using_gmake || $MAKE Makefile
+$MAKE distcheck
+
+:
diff --git a/tests/distcheck-outdated-m4.test b/tests/distcheck-outdated-m4.test
new file mode 100755
index 0000000..74f2922
--- /dev/null
+++ b/tests/distcheck-outdated-m4.test
@@ -0,0 +1,88 @@
+#! /bin/sh
+# Copyright (C) 2011 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 that we can define a distcheck-hook to diagnose outdated m4
+# files in a dist tarball (interaction with `--install').
+# See automake bug#9037.
+
+. ./defs || Exit 1
+
+set -e
+
+cwd=`pwd` || fatal_ "cannot get current working directory"
+
+cp "$testsrcdir"/distcheck-hook-m4.am . \
+ || fatal_ "cannot fetch makefile fragment \`distcheck-hook-m4.am'"
+
+cat > Makefile.am << 'END'
+## The lack of `--install' here is meant.
+ACLOCAL_AMFLAGS = -I m4
+include $(srcdir)/distcheck-hook-m4.am
+END
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+MY_FOO
+MY_BAR
+MY_BAZ
+END
+
+mkdir m4 acdir
+echo 'AC_DEFUN([MY_FOO], [:])' > m4/foo.m4
+echo 'AC_DEFUN([MY_BAR], [:])' > acdir/bar.m4
+cat > acdir/baz.m4 << 'END'
+# serial 1
+AC_DEFUN([MY_BAZ], [:])
+END
+
+ACLOCAL="$ACLOCAL --system-acdir=$cwd/acdir"; export ACLOCAL
+
+# We don't use `--install' here. Our distcheck-hook should catch this.
+$ACLOCAL -I m4 --install
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE distcheck # Sanity check.
+
+# We start to use a new "third-party" macro in a new version
+# of a pre-existing third-party m4 file, but forget to re-run
+# "aclocal --install" by hand, relying on automatic remake
+# rules. Our distcheck-hook should catch this too.
+echo MY_ZARDOZ >> configure.in
+
+cat > acdir/baz.m4 << 'END'
+# serial 2
+AC_DEFUN([MY_BAZ], [:])
+AC_DEFUN([MY_ZARDOZ], [:])
+END
+
+$MAKE # Rebuild configure and makefiles.
+$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+cat output
+
+$EGREP "required m4 file.* outdated.* baz.m4( |$)" output
+# Check that we don't fail for spurious errors.
+$EGREP -i 'mkdir:|autom4te.*\.cache|permission|denied' output && Exit 1
+# Check that we don't complain for files that should have been found.
+$EGREP " (foo|bar).m4" output && Exit 1
+
+# Now we again use `--install', and "make distcheck" should pass.
+$ACLOCAL -I m4 --install
+using_gmake || $MAKE Makefile
+$MAKE distcheck
+
+:
diff --git a/tests/distcheck-hook.test
b/tests/doc-parsing-buglets-colneq-subst.test
similarity index 56%
copy from tests/distcheck-hook.test
copy to tests/doc-parsing-buglets-colneq-subst.test
index 9a2c384..685d2b6 100755
--- a/tests/distcheck-hook.test
+++ b/tests/doc-parsing-buglets-colneq-subst.test
@@ -14,40 +14,26 @@
# 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 basic support for distcheck-hook.
+# Check a documented limitation of the Automake's Makefile parser
+# w.r.t. POSIX variable substitutions used in the name of targets.
+# See Section "General Operation" in the Automake manual.
+# If you cause some parts of this test to fail, chances are that you've
+# improved the Automake parser ;-)
+# See: <http://lists.gnu.org/archive/html/automake/2010-08/msg00074.html>
+# or:
<http://thread.gmane.org/gmane.comp.sysutils.automake.general/11943/focus=11962>
. ./defs || Exit 1
set -e
-cat >> configure.in << 'END'
-AC_OUTPUT
-END
-
cat > Makefile.am <<'END'
-distcheck-hook:
- ls -l $(distdir)
- chmod u+w $(distdir)
- : > $(distdir)/dc-hook-has-run
- chmod a-w $(distdir)
-check-local:
- ls -l $(srcdir)
- test -f $(srcdir)/dc-hook-has-run
+$(FOO:=x): bar
END
$ACLOCAL
-$AUTOMAKE
-$FGREP 'distcheck-hook' Makefile.in
-$FGREP '$(MAKE) $(AM_MAKEFLAGS) distcheck-hook' Makefile.in
-grep '^distcheck-hook:' Makefile.in
-
-$AUTOCONF
-./configure
+AUTOMAKE_fails
-$MAKE
-$MAKE check && Exit 1
-$MAKE distdir
-test -f $distdir/dc-hook-has-run && Exit 1
-$MAKE distcheck
+grep 'bad characters.*variable name.*\$(FOO' stderr
+grep ':=.*assignments.*not portable' stderr
:
diff --git a/tests/doc-parsing-buglets-tabs.test
b/tests/doc-parsing-buglets-tabs.test
new file mode 100755
index 0000000..acff363
--- /dev/null
+++ b/tests/doc-parsing-buglets-tabs.test
@@ -0,0 +1,61 @@
+#! /bin/sh
+# Copyright (C) 2011 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/>.
+
+# Check the documented limitation of the Automake's Makefile parser w.r.t.
+# use of TAB characters; see Section "General Operation" in the Automake
+# manual, and automake bug#8360.
+# If you cause some parts of this test to fail, chances are that you've
+# improved the Automake parser ;-)
+
+. ./defs || Exit 1
+
+set -e
+
+cat > Makefile.am <<END
+.PHONY: test
+test: all check
+
+fail:
address@hidden "'\$@ recipe executed'"; exit 1
+
+## This won't be recognized as a target+recipe by Automake.
+all-local${tab}:
address@hidden 1
+
+## This won't be recognized as a target+rdependency by Automake.
+all-local${tab}: fail
+
+just_to_separate: dummy deps
+
+## This won't be recognized as a variable assignment by Automake.
+${tab}bin_PROGRAMS = foo
+END
+
+echo AC_OUTPUT >> configure.in
+
+$ACLOCAL
+$AUTOMAKE
+
+$FGREP '$(EXEEEXT)' Makefile.in && Exit 1
+grep 'all:.*all-local' Makefile.in && Exit 1
+grep "^${tab}bin_PROGRAMS = foo" Makefile.in
+
+$AUTOCONF
+./configure
+
+$MAKE test
+
+:
diff --git a/tests/java-empty-classpath.test b/tests/java-empty-classpath.test
index 230bb7c..e94f885 100755
--- a/tests/java-empty-classpath.test
+++ b/tests/java-empty-classpath.test
@@ -37,8 +37,8 @@ cat > Makefile.am <<END
CLEANFILES = *.class
SUBDIRS = org
END
-echo SUBDIRS = gnu > org/Makefile.am
-echo SUBDIRS = bug > org/gnu/Makefile.am
+echo SUBDIRS = gnu > org/Makefile.am
+echo SUBDIRS = bug > org/gnu/Makefile.am
cat > org/gnu/bug/Makefile.am <<'END'
JAVAROOT = ../../..
dist_noinst_JAVA = Library.java Application.java
diff --git a/tests/distcheck-hook.test b/tests/vala-vpath.test
similarity index 61%
copy from tests/distcheck-hook.test
copy to tests/vala-vpath.test
index 9a2c384..98e0f43 100755
--- a/tests/distcheck-hook.test
+++ b/tests/vala-vpath.test
@@ -14,40 +14,45 @@
# 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 basic support for distcheck-hook.
+# Test to make sure vala support handles from-scratch VPATH builds.
+# See automake bug#8753.
+required="valac"
. ./defs || Exit 1
set -e
+mkdir src
+
cat >> configure.in << 'END'
+AC_CONFIG_SRCDIR([hello.vala])
+AC_PROG_CC
+AM_PROG_VALAC([0.7])
AC_OUTPUT
END
+
cat > Makefile.am <<'END'
-distcheck-hook:
- ls -l $(distdir)
- chmod u+w $(distdir)
- : > $(distdir)/dc-hook-has-run
- chmod a-w $(distdir)
-check-local:
- ls -l $(srcdir)
- test -f $(srcdir)/dc-hook-has-run
+bin_PROGRAMS = foo
+foo_SOURCES = hello.vala
END
-$ACLOCAL
-$AUTOMAKE
-$FGREP 'distcheck-hook' Makefile.in
-$FGREP '$(MAKE) $(AM_MAKEFLAGS) distcheck-hook' Makefile.in
-grep '^distcheck-hook:' Makefile.in
+cat > hello.vala <<'END'
+void main ()
+{
+ stdout.printf ("foo\n");
+ return 0;
+}
+END
-$AUTOCONF
-./configure
+$ACLOCAL || framework_failure_ "aclocal error"
+$AUTOCONF || framework_failure_ "autoconf error"
+$AUTOMAKE || framework_failure_ "automake error"
+mkdir build
+cd build
+../configure || Exit 77
$MAKE
-$MAKE check && Exit 1
-$MAKE distdir
-test -f $distdir/dc-hook-has-run && Exit 1
$MAKE distcheck
:
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, python-work, updated. v1.11-456-g20787ab,
Stefano Lattarini <=