From 3ac3237f44f93205966998265008dc7b70f345c3 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 9 May 2001 00:23:57 +0000 Subject: [PATCH] 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. --- ChangeLog | 7 +++++++ automake.in | 43 +++++++++++++++++++++++++++++++++++-------- tests/Makefile.am | 3 +-- tests/Makefile.in | 4 +--- 4 files changed, 44 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index ab6886c..8adede9 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 91b1215..7524fc4 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 881d77b..ab886ad 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 dc5e675..bdb453e 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 \ -- 2.7.4