[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, test-protocols, updated. v1
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, test-protocols, updated. v1.11-1177-gf64cc0d |
Date: |
Tue, 20 Sep 2011 18:58:29 +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=f64cc0d2b2ac5d3579c1916a10999561d2a36a58
The branch, test-protocols has been updated
via f64cc0d2b2ac5d3579c1916a10999561d2a36a58 (commit)
via cb387adeb06f92656007a4983b23c077f7843de7 (commit)
via 9bb2b6f474d6a1e1371c82323726449ef2daac02 (commit)
via 60a52756639ead678f500a25c094fd525c9cdef5 (commit)
via 15721c4885b8f24ca9ce2c5f2c42899277a11261 (commit)
via 8f80364582061d4bb13b74de9cd1ad35556a7afe (commit)
via 122cb639106d5b3a8dad966e43af03426670642a (commit)
via 2c57ac68468784a67c7ed8dced20cd5ac2b63e61 (commit)
via 73497948db0d2c6c7418f7df5c129eeee16ddf51 (commit)
via 9393a25995d4bbedc5103cce3e7dd9a7dd39e8d6 (commit)
via d5ebf21cccd0597f53e7b3c4063dff4704e454a6 (commit)
via 0209b6ddef31d414e59c6f34ae7642e9785b5770 (commit)
via 7aea1edaab587725f4a9becd30c00b5917cfe3f0 (commit)
via fb7141a5a2f1da7ec13f3cb14043a0591e8ff3ea (commit)
via c9dfc368a623178f32b67b164f051e9ab65edd99 (commit)
from f15d31661ef94e5d549dbdfb0f60cea1bc17683a (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 -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 88 ++++++++++++++++++
NEWS | 15 +++-
aclocal.in | 21 ++++-
automake.in | 4 +-
doc/automake.texi | 77 ++++++++++++----
tests/Makefile.am | 8 ++-
tests/Makefile.in | 8 ++-
tests/aclocal-path-install-serial.test | 86 ++++++++++++++++++
tests/aclocal-path-install.test | 55 ++++++++++++
...p-python.test => aclocal-path-nonexistent.test} | 23 +++---
tests/aclocal-path-precedence.test | 93 ++++++++++++++++++++
tests/aclocal-path.test | 58 ++++++++++++
tests/distcheck-missing-m4.test | 27 ++++--
tests/distcheck-outdated-m4.test | 51 ++++++++++-
tests/instdir-java.test | 1 +
...todist-acconfig.test => javadir-undefined.test} | 31 +++----
tests/primary-prefix-valid-couples.test | 2 -
17 files changed, 579 insertions(+), 69 deletions(-)
create mode 100755 tests/aclocal-path-install-serial.test
create mode 100755 tests/aclocal-path-install.test
copy tests/{help-python.test => aclocal-path-nonexistent.test} (72%)
create mode 100755 tests/aclocal-path-precedence.test
create mode 100755 tests/aclocal-path.test
copy tests/{autodist-acconfig.test => javadir-undefined.test} (61%)
diff --git a/ChangeLog b/ChangeLog
index 856c92f..40587c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,91 @@
+2011-09-20 Stefano Lattarini <address@hidden>
+
+ docs: remove mention of deprecated option `--acdir'
+ * doc/automake.texi (aclocal Options): Remove mention of
+ deprecated `--acdir' option.
+
+2011-09-20 Stefano Lattarini <address@hidden>
+
+ * NEWS: Cleanup after botched merges.
+
+2011-09-20 Stefano Lattarini <address@hidden>
+
+ * NEWS: Fix typo.
+
+2011-09-20 Stefano Lattarini <address@hidden>
+
+ docs: document planned precedence changes in aclocal search path
+ * doc/automake.texi (Macro Search Path): Explicitly state that the
+ lookup order for extra directories of `.m4' files will be changed
+ in the next major release.
+ * NEWS: Likewise.
+
+2011-09-19 Paolo Bonzini <address@hidden>
+ Stefano Lattarini <address@hidden>
+
+ aclocal: handle ACLOCAL_PATH environment variable
+ * aclocal.in (parse_ACLOCAL_PATH): New function, parse ACLOCAL_PATH
+ as a colon-separated list of directories to be included in the
+ search path.
+ * doc/automake.texi (Macro Search Path): Document new behavior and
+ the precedence rules for various elements of the search path.
+ * tests/aclocal-path.test: New test.
+ * tests/aclocal-path-install.test: Likewise.
+ * tests/aclocal-path-install-serial.test: Likewise.
+ * tests/aclocal-path-precedence.test: Likewise.
+ * tests/aclocal-path-nonexistent.test: Likewise.
+ * tests/Makefile.am (TESTS): Add them.
+ * NEWS: Update.
+ * tests/distcheck-missing-m4.test: Extend by also checking
+ interactions with ACLOCAL_PATH.
+ * tests/distcheck-outdated-m4.test: Likewise, and fix a couple
+ of botched comments since we are at it.
+
+2011-09-19 Stefano Lattarini <address@hidden>
+
+ tests: fix spurious failure in 'primary-prefix-valid-couples.test'
+ * tests/primary-prefix-valid-couples.test: After commit
+ v1.11-464-gc9dfc36, `java_JAVA' is not a valid prefix/primary
+ combination by default anymore: one has to explicitly define
+ $(javadir) to make it so. So just drop `java_JAVA' from our
+ Makefile.am Also, since we are at it, ...
+ (configure.in): ... remove AM_PROG_GCJ from here, as it's not
+ really required.
+
+2011-09-19 Stefano Lattarini <address@hidden>
+
+ docs: deprecate JAVA primary
+ * doc/automake.texi (Java): Deprecate the JAVA primary, stating
+ that it will become obsolete in automake 1.12 and probably removed
+ altogether in automake 1.13. Reflect this in the section title,
+ by appending the string "(deprecated feature)".
+ (@menu, @detailmenu): Update.
+ (Java Support with gcj): The cross-referenced support for bytecode
+ compilation with the JAVA primary is rudimentary and deprecated.
+ State that explicitly.
+
+2011-09-19 Stefano Lattarini <address@hidden>
+
+ docs: clearer distinction between `.java' with javac and with gcj
+ * doc/automake.texi (Java support): Rename this node ...
+ (Java support with gcj): ... to this, and change its title from
+ "Compiling Java sources" to "Compiling Java sources using gcj".
+ (@detailmenu, @menu, @cindex): Update and make more precise.
+ (Java): Change the title of this node from simply "Java" to
+ "Java bytecode compilation".
+ (@detailmenu, @menu, @cindex): Update and make more precise.
+
+2011-09-18 Stefano Lattarini <address@hidden>
+
+ java: complain if java_JAVA is used but $(javadir) is undefined
+ Fixes automake bug#8461.
+ * automake.in (handle_java): Remove inappropriate "java" argument
+ from the calls to `&am_install_var' and `&am_primary_prefixes'.
+ * tests/instdir-java.test (Makefile.am): Define `$(javadir)'.
+ * tests/javadir-undefined.test: New test.
+ * tests/Makefile.am (TESTS): Add it.
+ * NEWS: Update.
+
2011-09-18 Stefano Lattarini <address@hidden>
parallel-tests: expose automake bug#9546
diff --git a/NEWS b/NEWS
index 2278f6d..34b1bc6 100644
--- a/NEWS
+++ b/NEWS
@@ -9,9 +9,18 @@ New in 1.11a:
* Changes to aclocal:
- - The `--acdir' option is deprecated. Now you should use th new options
+ - The `--acdir' option is deprecated. Now you should use the new options
`--automake-acdir' and `--system-acdir' instead.
+ - The `ACLOCAL_PATH' environment variable is now interpreted as a
+ colon-separated list of additional directories to search after the
+ automake internal acdir (by default ${prefix}/share/aclocal-APIVERSION)
+ and before the system acdir (by default ${prefix}/share/aclocal).
+
+ - The exact order in which the directories in the aclocal macro
+ search path are looked up is probably going to be changed in the
+ next Automake release (1.12).
+
* New targets:
- New `cscope' target to build a cscope database for the source tree.
@@ -223,6 +232,10 @@ Bugs fixed in 1.11a:
- Java sources specified with check_JAVA are not compiled anymore upon
"make all", but only upon "make check".
+ - An usage like "java_JAVA = foo.java" will now cause Automake to warn
+ and error out if `javadir' is undefined, instead of silently producing
+ a broken Makefile.in.
+
- Now aclocal and automake, when they've to spawn autoconf or autom4te
processes, honour the configure-time definitions of AUTOCONF and
AUTOM4TE.
diff --git a/aclocal.in b/aclocal.in
index bc0804a..93ed5eb 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -57,8 +57,9 @@ $perl_threads = 0;
# 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.
+# @system_includes can be augmented with the `dirlist' file or the
+# ACLOCAL_PATH environment variable, and reset with the `--system-acdir'
+# option.
my @user_includes = ();
my @automake_includes = ("@datadir@/aclocal-$APIVERSION");
my @system_includes = ('@datadir@/aclocal');
@@ -1045,10 +1046,26 @@ sub parse_arguments ()
}
}
+# Add any directory listed in the `ACLOCAL_PATH' environment variable
+# to the list of system include directories.
+sub parse_ACLOCAL_PATH ()
+{
+ return if not defined $ENV{"ACLOCAL_PATH"};
+ # Directories in ACLOCAL_PATH should take precedence over system
+ # directories, so we use unshift. However, directories that
+ # come first in ACLOCAL_PATH take precedence over directories
+ # coming later, which is why the result of split is reversed.
+ foreach my $dir (reverse split /:/, $ENV{"ACLOCAL_PATH"})
+ {
+ unshift (@system_includes, $dir) if $dir ne '' && -d $dir;
+ }
+}
+
################################################################
parse_WARNINGS; # Parse the WARNINGS environment variable.
parse_arguments;
+parse_ACLOCAL_PATH;
$configure_ac = require_configure_ac;
# We may have to rerun aclocal if some file have been installed, but
diff --git a/automake.in b/automake.in
index 7297a85..91ae825 100644
--- a/automake.in
+++ b/automake.in
@@ -5003,11 +5003,11 @@ sub handle_java
{
my @sourcelist = &am_install_var ('-candist',
'java', 'JAVA',
- 'java', 'noinst', 'check');
+ 'noinst', 'check');
return if ! @sourcelist;
my @prefixes = am_primary_prefixes ('JAVA', 1,
- 'java', 'noinst', 'check');
+ 'noinst', 'check');
my $dir;
my @java_sources = ();
diff --git a/doc/automake.texi b/doc/automake.texi
index 507a4a9..c75b866 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -230,7 +230,7 @@ Building Programs and Libraries
* Assembly Support:: Compiling assembly sources
* Fortran 77 Support:: Compiling Fortran 77 sources
* Fortran 9x Support:: Compiling Fortran 9x sources
-* Java Support:: Compiling Java sources
+* Java Support with gcj:: Compiling Java sources using gcj
* Vala Support:: Compiling Vala sources
* Support for Other Languages:: Compiling other languages
* Dependencies:: Automatic dependency tracking
@@ -290,7 +290,7 @@ Other GNU Tools
* Emacs Lisp:: Emacs Lisp
* gettext:: Gettext
* Libtool:: Libtool
-* Java:: Java
+* Java:: Java bytecode compilation (deprecated)
* Python:: Python
Building documentation
@@ -3244,11 +3244,6 @@ Look for the system-wide third-party macro files (and
the special
@file{dirlist} file) in @var{dir} instead of in the installation
directory. This is typically used for debugging.
address@hidden address@hidden
address@hidden --acdir
address@hidden shorthand for address@hidden@var{dir}
address@hidden''. Will be removed in future aclocal versions.
-
@item address@hidden
@opindex --diff
Run @var{command} on M4 file that would be installed or overwritten
@@ -3477,6 +3472,40 @@ Similarly, @file{dirlist} can be handy if you have
installed a local
copy of Automake in your account and want @command{aclocal} to look for
macros installed at other places on the system.
address@hidden Modifying the Macro Search Path: @file{ACLOCAL_PATH}
address@hidden @env{ACLOCAL_PATH}
+
+The fourth and last mechanism to customize the macro search path is
+also the simplest. Any directory included in the colon-separated
+environment variable @env{ACLOCAL_PATH} is added to the search path
address@hidden Keep in sync with aclocal-path-precedence.test.
+and takes precedence over system directories (including those found via
address@hidden), with the exception of the versioned directory
address@hidden (@pxref{Macro Search Path}). However, directories
+passed via @option{-I} will take precedence over directories in
address@hidden
+
address@hidden Keep in sync with aclocal-path-installed.test.
+Also note that, if the @option{--install} option is used, any @file{.m4}
+file containing a required macro that is found in a directory listed in
address@hidden will be installed locally.
address@hidden Keep in sync with aclocal-path-installed-serial.test.
+In this case, serial numbers in @file{.m4} are honoured too,
address@hidden
+
+Conversely to @file{dirlist}, @env{ACLOCAL_PATH} is useful if you are
+using a global copy of Automake and want @command{aclocal} to look for
+macros somewhere under your home directory.
+
address@hidden Planned future incompatibilities
+
+The order in which the directories in the macro search path are currently
+looked up is confusing and/or suboptimal in various aspects, and is
+probably going to be changed in the future Automake release. In
+particular, directories in @env{ACLOCAL_PATH} and @address@hidden
+might end up taking precedence over @address@hidden, and
+directories in @address@hidden/dirlist} might end up taking precedence
+over @address@hidden @emph{This is a possible future incompatibility!}
@node Extending aclocal
@subsection Writing your own aclocal macros
@@ -4665,7 +4694,7 @@ to build programs and libraries.
* Assembly Support:: Compiling assembly sources
* Fortran 77 Support:: Compiling Fortran 77 sources
* Fortran 9x Support:: Compiling Fortran 9x sources
-* Java Support:: Compiling Java sources
+* Java Support with gcj:: Compiling Java sources using gcj
* Vala Support:: Compiling Vala sources
* Support for Other Languages:: Compiling other languages
* Dependencies:: Automatic dependency tracking
@@ -6736,17 +6765,19 @@ is as follows:
@end table
address@hidden Java Support
address@hidden Java Support with gcj
@comment node-name, next, previous, up
address@hidden Java Support
address@hidden Compiling Java sources using gcj
address@hidden Java support
address@hidden Support for Java
address@hidden Java support with gcj
address@hidden Support for Java with gcj
address@hidden Java to native code, compilation
address@hidden Compilation of Java to native code
Automake includes support for natively compiled Java, using @command{gcj},
-the Java front end to the GNU Compiler Collection (preliminary support
+the Java front end to the GNU Compiler Collection (rudimentary support
for compiling Java to bytecode using the @command{javac} compiler is
-also present; @pxref{Java}).
+also present, @emph{albeit deprecated}; @pxref{Java}).
Any package including Java code to be compiled must define the output
variable @code{GCJ} in @file{configure.ac}; the variable @code{GCJFLAGS}
@@ -6840,8 +6871,9 @@ source file.
Automake currently only includes full support for C, C++ (@pxref{C++
Support}), Objective C (@pxref{Objective C Support}), Fortran 77
(@pxref{Fortran 77 Support}), Fortran 9x (@pxref{Fortran 9x Support}),
-and Java (@pxref{Java Support}). There is only rudimentary support for other
-languages, support for which will be improved based on user demand.
+and Java (@pxref{Java Support with gcj}). There is only rudimentary
+support for other languages, support for which will be improved based
+on user demand.
Some limited support for adding your own languages is available via the
suffix rule handling (@pxref{Suffixes}).
@@ -7436,7 +7468,7 @@ use in GNU programs, it tries hard to interoperate with
other GNU tools.
* Emacs Lisp:: Emacs Lisp
* gettext:: Gettext
* Libtool:: Libtool
-* Java:: Java
+* Java:: Java bytecode compilation (deprecated)
* Python:: Python
@end menu
@@ -7529,15 +7561,22 @@ libtool, The Libtool Manual}) with the
@code{LTLIBRARIES} primary.
@node Java
address@hidden Java
address@hidden Java bytecode compilation (deprecated)
@cindex @code{_JAVA} primary, defined
@cindex @code{JAVA} primary, defined
@cindex Primary variable, @code{JAVA}
address@hidden Java to bytecode, compilation
address@hidden Compilation of Java to bytecode
Automake provides some minimal support for Java bytecode compilation with
the @code{JAVA} primary (in addition to the support for compiling Java to
-native machine code; @pxref{Java Support}).
+native machine code; @pxref{Java Support with gcj}). Note however that
address@hidden interface and most features described here are deprecated}; the
+next automake release will strive to provide a better and cleaner
+interface, which however @emph{won't be backward-compatible}; the present
+interface will probably be removed altogether in future automake releases
+(1.13 or later), so don't use it in new code.
Any @file{.java} files listed in a @code{_JAVA} variable will be
compiled with @code{JAVAC} at build time. By default, @file{.java}
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2e7e17f..632197f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -138,9 +138,14 @@ acloca20.test \
acloca21.test \
acloca22.test \
acloca23.test \
-ac-output-old.tap \
aclocal-acdir.test \
aclocal-print-acdir.test \
+aclocal-path.test \
+aclocal-path-install.test \
+aclocal-path-install-serial.test \
+aclocal-path-nonexistent.test \
+aclocal-path-precedence.test \
+ac-output-old.tap \
acsilent.test \
acsubst.test \
acsubst2.test \
@@ -543,6 +548,7 @@ java3.test \
java-check.test \
java-clean.test \
java-empty-classpath.test \
+javadir-undefined.test \
javaprim.test \
javasubst.test \
javaflags.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 8248330..82040e9 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -396,9 +396,14 @@ acloca20.test \
acloca21.test \
acloca22.test \
acloca23.test \
-ac-output-old.tap \
aclocal-acdir.test \
aclocal-print-acdir.test \
+aclocal-path.test \
+aclocal-path-install.test \
+aclocal-path-install-serial.test \
+aclocal-path-nonexistent.test \
+aclocal-path-precedence.test \
+ac-output-old.tap \
acsilent.test \
acsubst.test \
acsubst2.test \
@@ -801,6 +806,7 @@ java3.test \
java-check.test \
java-clean.test \
java-empty-classpath.test \
+javadir-undefined.test \
javaprim.test \
javasubst.test \
javaflags.test \
diff --git a/tests/aclocal-path-install-serial.test
b/tests/aclocal-path-install-serial.test
new file mode 100755
index 0000000..15b4204
--- /dev/null
+++ b/tests/aclocal-path-install-serial.test
@@ -0,0 +1,86 @@
+#! /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/>.
+
+# ACLOCAL_PATH, acdir and `--install' interactions when serial number
+# are involved.
+
+am_create_testdir=empty
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in << 'END'
+AC_INIT
+AM_FOO
+END
+
+set_serial ()
+{
+ serial=$1 file=$2
+ sed '/^# serial/d' $file > t
+ case $serial in
+ none) mv -f t $file;;
+ *) (echo "# serial $serial" && cat t) > $file; rm -f t;;
+ esac
+ cat $file # For debugging.
+}
+
+win ()
+{
+ case $1 in
+ sdir) ok=sdir ko=pdir;;
+ pdir) ok=pdir ko=sdir;;
+ *) fatal_ "win(): invalud argument \`$1'";;
+ esac
+ rm -rf aclocal.m4 autom4te*.cache m4/*
+ $ACLOCAL -I m4 --install
+ test -f m4/foo.m4 # Sanity check.
+ $AUTOCONF
+ $FGREP "::$ok:" m4/foo.m4
+ $FGREP "::$ok::" configure
+ $FGREP "::$ko::" m4/foo.m4 configure && Exit 1
+ :
+}
+
+mkdir sdir pdir m4
+
+ACLOCAL="$ACLOCAL --system-acdir=`pwd`/sdir"
+ACLOCAL_PATH=./pdir; export ACLOCAL_PATH
+
+cat > sdir/foo.m4 << 'END'
+AC_DEFUN([AM_FOO], [::sdir::])
+END
+cat > pdir/foo.m4 << 'END'
+AC_DEFUN([AM_FOO], [::pdir::])
+END
+
+set_serial 2 sdir/foo.m4
+set_serial 1 pdir/foo.m4
+win sdir
+
+set_serial 3.3 sdir/foo.m4
+set_serial 5.7 pdir/foo.m4
+win pdir
+
+set_serial 0 sdir/foo.m4
+set_serial none pdir/foo.m4
+win sdir
+
+set_serial none sdir/foo.m4
+set_serial 1.2.3 pdir/foo.m4
+win pdir
+
+:
diff --git a/tests/aclocal-path-install.test b/tests/aclocal-path-install.test
new file mode 100755
index 0000000..5e46eb6
--- /dev/null
+++ b/tests/aclocal-path-install.test
@@ -0,0 +1,55 @@
+#! /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/>.
+
+# ACLOCAL_PATH and `--install' interactions.
+
+am_create_testdir=empty
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in << 'END'
+AC_INIT
+AM_FOO
+END
+
+mkdir acdir pdir ldir
+
+ACLOCAL="$ACLOCAL --system-acdir=`pwd`/acdir"
+ACLOCAL_PATH=./pdir; export ACLOCAL_PATH
+
+cat > acdir/foo.m4 << 'END'
+AC_DEFUN([AM_FOO], [:])
+END
+
+cat > pdir/bar.m4 << 'END'
+AC_DEFUN([AM_BAR], [:])
+END
+
+# The `--install' option should never cause anything to be installed
+# in a directory specified in ACLOCAL_PATH.
+$ACLOCAL --install 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep ' no -I was supplied' stderr
+test ! -f pdir/foo.m4
+
+# The `--install' option should cause a required macro found in a
+# directory specified in ACLOCAL_PATH to be installed locally.
+echo AM_BAR >> configure.in
+$ACLOCAL --install -I ldir
+diff pdir/bar.m4 ldir/bar.m4
+
+:
diff --git a/tests/help-python.test b/tests/aclocal-path-nonexistent.test
similarity index 72%
copy from tests/help-python.test
copy to tests/aclocal-path-nonexistent.test
index e6a6fd3..e1157a1 100755
--- a/tests/help-python.test
+++ b/tests/aclocal-path-nonexistent.test
@@ -14,22 +14,23 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure that macro `AM_PATH_PYTHON' adds proper text to the
-# configure help screen.
+# Non-existent directories in ACLOCAL_PATH are ok.
+am_create_testdir=empty
. ./defs || Exit 1
-cat > configure.in <<END
-AC_INIT([$me], [1.0])
-AM_PATH_PYTHON
-END
+set -e
-$ACLOCAL
-$AUTOCONF
+cat > configure.in << 'END'
+AC_INIT
+AM_FOO
+END
-./configure --help >stdout || { cat stdout; Exit 1; }
-cat stdout
+mkdir mdir
+echo 'AC_DEFUN([AM_FOO], [am--foo])' > mdir/foo.m4
-grep '^ *PYTHON *the Python interpreter$' stdout
+ACLOCAL_PATH=./nonesuch:./mdir:`pwd`/nonesuch2:nonesuch3 $ACLOCAL
+$AUTOCONF
+$FGREP 'am--foo' configure
:
diff --git a/tests/aclocal-path-precedence.test
b/tests/aclocal-path-precedence.test
new file mode 100755
index 0000000..0378fb2
--- /dev/null
+++ b/tests/aclocal-path-precedence.test
@@ -0,0 +1,93 @@
+#! /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 precedence rules for ACLOCAL_PATH.
+
+am_create_testdir=empty
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_INIT
+AM_INIT_AUTOMAKE([parallel-tests])
+FOO_MACRO
+BAR_MACRO
+AC_PROG_LIBTOOL
+AM_GNU_GETTEXT
+END
+
+mkdir mdir1 mdir2 mdir3 sysdir extradir
+
+cat > mdir1/foo1.m4 << 'END'
+AC_DEFUN([FOO_MACRO], [::pass-foo::])
+END
+
+cat > mdir2/foo2.m4 << 'END'
+AC_DEFUN([FOO_MACRO], [::fail-foo::])
+END
+
+cat > mdir1/baz.m4 << 'END'
+AC_DEFUN([BAR_MACRO], [::fail-bar::])
+END
+
+cat > mdir3/bar.m4 << 'END'
+AC_DEFUN([BAR_MACRO], [::pass-bar::])
+END
+
+cat > mdir2/quux.m4 << 'END'
+AC_DEFUN([AM_INIT_AUTOMAKE], [::fail-init::])
+AC_DEFUN([AC_PROG_LIBTOOL], [::pass-libtool::])
+AC_DEFUN([AM_GNU_GETTEXT], [::pass-gettext::])
+END
+
+cat > sysdir/libtool.m4 << 'END'
+AC_DEFUN([AC_PROG_LIBTOOL], [::fail-libtool::])
+END
+
+cat > extradir/gettext.m4 << 'END'
+AC_DEFUN([AM_GNU_GETTEXT], [::fail-gettext::])
+END
+
+echo ./extradir > sysdir/dirlist
+
+ACLOCAL_PATH=mdir1:mdir2 $ACLOCAL -I mdir3
+$AUTOCONF
+
+$FGREP '::' configure # For debugging.
+
+# Directories coming first in ACLOCAL_PATH should take precedence
+# over those coming later.
+$FGREP '::pass-foo::' configure
+
+# Directories from `-I' options should take precedence over directories
+# in ACLOCAL_PATH.
+$FGREP '::pass-bar::' configure
+
+# Directories in ACLOCAL_PATH should take precedence over system acdir
+# (typically `${prefix}/share/aclocal'), and any directory added through
+# the `dirlist' special file.
+$FGREP '::pass-gettext::' configure
+$FGREP '::pass-libtool::' configure
+
+# Directories in ACLOCAL_PATH shouldn't take precedence over the internal
+# automake acdir (typically `${prefix}/share/aclocal-${APIVERSION}').
+$FGREP 'am__api_version' configure
+
+# A final sanity check.
+$FGREP '::fail' configure && Exit 1
+
+:
diff --git a/tests/aclocal-path.test b/tests/aclocal-path.test
new file mode 100755
index 0000000..16fd3f9
--- /dev/null
+++ b/tests/aclocal-path.test
@@ -0,0 +1,58 @@
+#! /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 basic ACLOCAL_PATH support.
+
+am_create_testdir=empty
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in << 'END'
+AC_INIT
+AM_FOO_MACRO
+AM_BAR_MACRO
+AM_BAZ_MACRO
+END
+
+mkdir mdir1 mdir2 mdir3
+
+cat > mdir1/foo.m4 << 'END'
+AC_DEFUN([AM_FOO_MACRO], [am--foo])
+END
+
+cat > mdir2/bar.m4 << 'END'
+AC_DEFUN([AM_BAR_MACRO], [am--bar])
+END
+
+cat > mdir3/baz.m4 << 'END'
+AC_DEFUN([AM_BAZ_MACRO], [am--baz])
+END
+
+ACLOCAL_PATH=mdir1:./mdir2:`pwd`/mdir3 $ACLOCAL
+$AUTOCONF
+
+# there should be no m4_include in aclocal.m4, even though ACLOCAL_PATH
+# contains `mdir1' and `./mdir2' as relative directories. Only -I
+# directories should be subject to file inclusion.
+$FGREP m4_include aclocal.m4 && Exit 1
+
+$EGREP 'AM_(FOO|BAR|BAZ)_MACRO' configure && Exit 1
+$FGREP 'am--foo' configure
+$FGREP 'am--bar' configure
+$FGREP 'am--baz' configure
+
+:
diff --git a/tests/distcheck-missing-m4.test b/tests/distcheck-missing-m4.test
index f4e0eda..1a2b62f 100755
--- a/tests/distcheck-missing-m4.test
+++ b/tests/distcheck-missing-m4.test
@@ -39,9 +39,10 @@ AC_OUTPUT
MY_FOO
MY_BAR
MY_BAZ
+MY_ZAR
END
-mkdir m4 acdir acdir1 acdir2
+mkdir m4 acdir acdir1 acdir2 pth
cat > acdir/dirlist << END
$cwd/acdir1
@@ -52,21 +53,25 @@ 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
+echo 'AC_DEFUN([MY_ZAR], [:])' > pth/zar.m4
+echo 'AC_DEFUN([MY_BLA], [:])' > pth/bla.m4
ACLOCAL="$ACLOCAL --system-acdir=$cwd/acdir"; export ACLOCAL
+ACLOCAL_PATH=$cwd/pth; export ACLOCAL_PATH
# 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.
+$EGREP 'MY_(FOO|BAR|BAZ|ZAR)' 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
+for x in bar baz zar; do
+ $EGREP "required m4 file.*not distributed.* $x.m4( |$)" output
+done
# Check that we don't fail for spurious errors.
$EGREP -i 'mkdir:|autom4te.*\.cache|:.*(permission|denied)' output && Exit 1
@@ -74,28 +79,34 @@ $EGREP -i 'mkdir:|autom4te.*\.cache|:.*(permission|denied)'
output && Exit 1
$ACLOCAL -I m4 --install
test -f m4/bar.m4 # Sanity check.
test -f m4/baz.m4 # Likewise.
+test -f m4/zar.m4 # Likewise.
using_gmake || $MAKE Makefile
$MAKE distcheck
-# We start to use a new "third-party" macro from a new .m4 file, but forget
+# We start to use new "third-party" macros from new .m4 files, 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
+cat >> configure.in << 'END'
+MY_QUX
+MY_BLA
+END
$MAKE
-$EGREP 'MY_(FOO|BAR|BAZ|QUX)' configure && Exit 1 # Sanity check.
+$EGREP 'MY_(FOO|BAR|BAZ|QUX|ZAR|BLA)' 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
+$EGREP "required m4 file.*not distributed.* bla.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
+$FGREP " (bar|baz|zar).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.
+test -f m4/bla.m4 # Likewise.
using_gmake || $MAKE Makefile
$MAKE distcheck
diff --git a/tests/distcheck-outdated-m4.test b/tests/distcheck-outdated-m4.test
index 74f2922..7a3ade8 100755
--- a/tests/distcheck-outdated-m4.test
+++ b/tests/distcheck-outdated-m4.test
@@ -50,7 +50,8 @@ END
ACLOCAL="$ACLOCAL --system-acdir=$cwd/acdir"; export ACLOCAL
-# We don't use `--install' here. Our distcheck-hook should catch this.
+# The use of `--install' here won't help when the installed file `.m4'
+# will become out-of-date w.r.t. the one in the system acdir.
$ACLOCAL -I m4 --install
$AUTOCONF
$AUTOMAKE
@@ -77,10 +78,54 @@ 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.
+# Check that we don't complain for files that aren't outdated.
$EGREP " (foo|bar).m4" output && Exit 1
-# Now we again use `--install', and "make distcheck" should pass.
+# Now we again use `--install' explicitly, and "make distcheck"
+# should pass.
+$ACLOCAL -I m4 --install
+using_gmake || $MAKE Makefile
+$MAKE distcheck
+
+# Similar to what have been done above, but this time we:
+# - use ACLOCAL_PATH, and
+# - do not add the use of a new macro.
+
+echo MY_FNORD >> configure.in
+
+mkdir pth
+cat > pth/fnord.m4 << 'END'
+# serial 1
+AC_DEFUN([MY_FNORD], [:])
+END
+
+ACLOCAL_PATH="$cwd/pth"; export ACLOCAL_PATH
+
+# The explicit use of `--install' here won't help when the installed file
+# `.m4' will become out-of-date w.r.t. the one in the system acdir.
+$ACLOCAL -I m4 --install
+using_gmake || $MAKE Makefile
+$MAKE distcheck
+
+# Only increase serial number, without changing the other contents; this
+# is deliberate.
+cat > pth/fnord.m4 << 'END'
+# serial 2
+AC_DEFUN([MY_FNORD], [:])
+END
+
+$MAKE # Rebuild configure and makefiles.
+$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+cat output
+
+$EGREP "required m4 file.* outdated.* fnord.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 aren't outdated.
+$EGREP " (foo|bar|baz).m4" output && Exit 1
+
+# Now we again use `--install' explicitly, and "make distcheck"
+# should pass.
$ACLOCAL -I m4 --install
using_gmake || $MAKE Makefile
$MAKE distcheck
diff --git a/tests/instdir-java.test b/tests/instdir-java.test
index 8cad153..eaf2981 100755
--- a/tests/instdir-java.test
+++ b/tests/instdir-java.test
@@ -24,6 +24,7 @@ AC_OUTPUT
END
cat >Makefile.am <<'END'
+javadir = $(datarootdir)/java
java_JAVA = foo.java
END
diff --git a/tests/autodist-acconfig.test b/tests/javadir-undefined.test
similarity index 61%
copy from tests/autodist-acconfig.test
copy to tests/javadir-undefined.test
index 5674e27..9b6d1f3 100755
--- a/tests/autodist-acconfig.test
+++ b/tests/javadir-undefined.test
@@ -14,31 +14,24 @@
# 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.
+# Use of JAVA primary should not allow the use of the `java_' prefix
+# when $(javadir) is undefined. Otherwise, we could silently end up
+# with a broken Makefile.in (where "make install" doesn't install
+# the *.class files).
+# See automake bug#8461.
. ./defs || Exit 1
-cat >> configure.in <<END
-AC_OUTPUT
-END
+set -e
-cat > Makefile.am <<'END'
-.PHONY: test
-test: distdir
- ls -l $(distdir)
- echo ' ' $(DIST_COMMON) ' ' | grep '[ /]acconfig\.h '
- test -f $(distdir)/acconfig.h
-END
+$ACLOCAL
-: > acconfig.h
+echo java_JAVA = a.java > Makefile.am
+AUTOMAKE_fails
+grep '^Makefile\.am:1:.*java_JAVA.*javadir.* undefined' stderr
+$EGREP '(uninitialized|line) ' stderr && Exit 1
-$ACLOCAL
+echo javadir = a-dummy-value >> Makefile.am
$AUTOMAKE
-$AUTOCONF
-
-./configure
-$MAKE test
:
diff --git a/tests/primary-prefix-valid-couples.test
b/tests/primary-prefix-valid-couples.test
index f326808..36ff5d8 100755
--- a/tests/primary-prefix-valid-couples.test
+++ b/tests/primary-prefix-valid-couples.test
@@ -25,7 +25,6 @@ cat >> configure.in <<'END'
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_LIBTOOL
-AM_PROG_GCJ
AM_PATH_PYTHON
AM_PATH_LISPDIR
END
@@ -78,7 +77,6 @@ done
echo "info_TEXINFOS = foo.texi" >> Makefile.am
echo "lisp_LISP = foo.el" >> Makefile.am
echo "python_PYTHON = foo.py" >> Makefile.am
-echo "java_JAVA = foo.java" >> Makefile.am
awk '{print NR ":" $0}' Makefile.am # For debugging.
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, test-protocols, updated. v1.11-1177-gf64cc0d,
Stefano Lattarini <=