From fd60ad28737e90d8732f28ce85d6cdaa781bdeed Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Wed, 4 Jul 2012 15:37:46 +0200 Subject: aclocal: diagnose non-existing directories in AC_CONFIG_MACRO_DIRS better This new implementation ensures that any directory (possibly excluding the first one, if the '--install' option is used) that is declared with AC_CONFIG_MACRO_DIRS and that is non-existent will cause an error from aclocal. * aclocal.in (scan_m4_dirs): Add a new argument, telling whether it's OK for the scanned directory to be non-existing. Adjust the implementation accordingly. ($first_user_m4dir): Remove, no more needed. (scan_m4_files): Update 'scan_m4_dirs' invocations so that aclocal will not complain if the first user macro directory is non-existing and the '--install' option is given: such directory will be created later by aclocal itself. * t/aclocal-macrodir.tap: Do not mark the last test as TODO anymore; it now passes. Make stricter by ensuring a non-existing directory in AC_CONFIG_MACRO_DIRS causes an hard error, not a warning. Signed-off-by: Stefano Lattarini --- t/aclocal-macrodirs.tap | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 't/aclocal-macrodirs.tap') diff --git a/t/aclocal-macrodirs.tap b/t/aclocal-macrodirs.tap index aaac4b45e..2440d8f3f 100755 --- a/t/aclocal-macrodirs.tap +++ b/t/aclocal-macrodirs.tap @@ -294,8 +294,7 @@ test_end #--------------------------------------------------------------------------- -test_begin "AC_CONFIG_MACRO_DIRS([non-existent]) errors out (tricky setup)" \ - TODO +test_begin "AC_CONFIG_MACRO_DIRS([non-existent]) errors out (tricky setup)" cat > configure.ac << 'END' AC_INIT([oops], [1.0]) @@ -305,7 +304,7 @@ END mkdir dir-ok -not $ACLOCAL --install 2>stderr \ +not $ACLOCAL -Wnone --install 2>stderr \ && cat stderr >&2 \ && grep "couldn't open directory 'dir-ko'" stderr \ && test ! -e dir-ko \ -- cgit v1.2.1