diff options
author | Pavel Raiskup <praiskup@redhat.com> | 2013-02-11 13:11:52 +0100 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-02-21 15:34:24 +0100 |
commit | 7a3d7cee2b3270443bcd3b91e7e4ada8a1a858a1 (patch) | |
tree | 7ba067741c0b86717b09a11134e250d2f5098d69 /t/aclocal-macrodir.tap | |
parent | c83c133556205402d44e81d492efb0b2fe3e3584 (diff) | |
download | automake-7a3d7cee2b3270443bcd3b91e7e4ada8a1a858a1.tar.gz |
aclocal: fix for more-than-once specified directories
Related to automake bug#13514.
Do not consider directories for extra m4 files multiple times in
'aclocal'. Doing so caused problems on older packages that specify
configure.ac: AC_CONFIG_MACRO_DIRS([m4])
Makefile.am: ACLOCAL_AMFLAGS = -I m4
if the 'm4' directory does not exist when aclocal is called the first
time by autoreconf.
See:
<http://lists.gnu.org/archive/html/bug-automake/2013-01/msg00115.html>
* aclocal.in (scan_m4_files): Remove duplicates in @user_includes.
* t/aclocal-macrodir.tap: Extend.
* t/aclocal-macrodirs.tap: Likewise.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/aclocal-macrodir.tap')
-rwxr-xr-x | t/aclocal-macrodir.tap | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/t/aclocal-macrodir.tap b/t/aclocal-macrodir.tap index a480c4cd4..051fdb517 100755 --- a/t/aclocal-macrodir.tap +++ b/t/aclocal-macrodir.tap @@ -20,7 +20,7 @@ am_create_testdir=empty . test-init.sh -plan_ 6 +plan_ 7 ocwd=$(pwd) || fatal_ "getting current working directory" ACLOCAL_PATH=; unset ACLOCAL_PATH @@ -181,6 +181,26 @@ test_end #--------------------------------------------------------------------------- +test_begin "AC_CONFIG_MACRO_DIR([not-exist]) and ACLOCAL_AMFLAGS = -I not-exist" + +cat > configure.ac << 'END' +AC_INIT([oops], [1.0]) +AC_CONFIG_MACRO_DIR([not-exist]) +END + +cat > Makefile.am << 'END' +ACLOCAL_AMFLAGS = -I not-exist +END + +$ACLOCAL -Wno-error 2>stderr \ + && cat stderr >&2 \ + && test $(grep -c "couldn't open directory 'not-exist'" stderr) -eq 1 \ + || r='not ok' + +test_end + +#--------------------------------------------------------------------------- + # Avoid spurious failures with pre-2.70 autoconf. # FIXME: remove this in automake 1.14, once we require Autoconf 2.70. if echo 'AC_INIT AC_CONFIG_MACRO_DIRS' | $AUTOCONF -o/dev/null -; then |