From: Tom Tromey Date: Wed, 9 May 2001 00:23:57 +0000 (+0000) Subject: Fix for PR automake/149 and werror.test: X-Git-Tag: Release-1-4f~57 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=e3005dc3c9e5f78971d0ff0812b19ec3aa4c3af2;p=automake.git Fix for PR automake/149 and werror.test: * automake.in (require_file_internal): Use am_line_warning or am_conf_line_warning when suppressing error. (am_line_warning): New sub. (am_conf_line_warning): Save and restore warning signal. * tests/Makefile.am (XFAIL_TESTS): Removed werror.test. --- diff --git a/ChangeLog b/ChangeLog index ab6886c2..8adede90 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2001-05-08 Tom Tromey + Fix for PR automake/149 and werror.test: + * automake.in (require_file_internal): Use am_line_warning or + am_conf_line_warning when suppressing error. + (am_line_warning): New sub. + (am_conf_line_warning): Save and restore warning signal. + * tests/Makefile.am (XFAIL_TESTS): Removed werror.test. + Fix for PR automake/36: * tests/Makefile.am (TESTS): Added asm.test. * tests/asm.test: New file. diff --git a/automake.in b/automake.in index 91b12155..7524fc42 100755 --- a/automake.in +++ b/automake.in @@ -7665,18 +7665,32 @@ sub require_file_internal $file, $errfile); } - my $save = $exit_status; - if ($is_configure) + if ($suppress) { - # FIXME: allow actual file to be specified. - &am_conf_line_error ($configure_ac, $line, - "$message$trailer"); + if ($is_configure) + { + # FIXME: allow actual file to be specified. + &am_conf_line_warning ($configure_ac, $line, + "$message$trailer"); + } + else + { + &am_line_warning ($line, "$message$trailer"); + } } else { - &am_line_error ($line, "$message$trailer"); + if ($is_configure) + { + # FIXME: allow actual file to be specified. + &am_conf_line_error ($configure_ac, $line, + "$message$trailer"); + } + else + { + &am_line_error ($line, "$message$trailer"); + } } - $exit_status = $save if $suppress; } } } @@ -7846,7 +7860,6 @@ sub am_error $exit_status = 1; } - # am_file_error ($FILE, @ARGS) # ---------------------------- sub am_file_error @@ -7924,8 +7937,22 @@ sub am_conf_line_error sub am_conf_line_warning { my $saved_exit_status = $exit_status; + my $sig = $SIG{'__WARN__'}; + $SIG{'__WARN__'} = 'DEFAULT'; &am_conf_line_error (@_); $exit_status = $saved_exit_status; + $SIG{'__WARN__'} = $sig; +} + +# Like am_line_error, but doesn't affect exit status. +sub am_line_warning +{ + my $saved_exit_status = $exit_status; + my $sig = $SIG{'__WARN__'}; + $SIG{'__WARN__'} = 'DEFAULT'; + &am_line_warning (@_); + $exit_status = $saved_exit_status; + $SIG{'__WARN__'} = $sig; } # Tell user where our aclocal.m4 is, but only once. diff --git a/tests/Makefile.am b/tests/Makefile.am index 881d77bc..ab886ad1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,8 +2,7 @@ AUTOMAKE_OPTIONS = gnits -XFAIL_TESTS = subobj2.test yaccvpath.test texinfo10.test subdir5.test \ -werror.test +XFAIL_TESTS = subobj2.test yaccvpath.test texinfo10.test subdir5.test TESTS = \ acinclude.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index dc5e675b..bdb453e8 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -74,9 +74,7 @@ install_sh = @install_sh@ AUTOMAKE_OPTIONS = gnits -XFAIL_TESTS = subobj2.test yaccvpath.test texinfo10.test subdir5.test \ -werror.test - +XFAIL_TESTS = subobj2.test yaccvpath.test texinfo10.test subdir5.test TESTS = \ acinclude.test \