]> sourceware.org Git - automake.git/commitdiff
* automake.in (switch_warning): Subject Perl warnings to -Werror.
authorAlexandre Duret-Lutz <adl@gnu.org>
Thu, 7 Nov 2002 23:03:15 +0000 (23:03 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Thu, 7 Nov 2002 23:03:15 +0000 (23:03 +0000)
ChangeLog
automake.in

index 99fff09d02ea2cf1584b8582dff8cbcde62c0469..0f483597770bf5321b2d159caf1fc8d6b9b3721a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2002-11-07  Alexandre Duret-Lutz  <adl@gnu.org>
 
+       * automake.in (switch_warning): Subject Perl warnings to -Werror.
+
        * automake.texi (Extending): Complete unterminated sentence.
        Reported by Mike Castle.
 
index 6026b74194b15bfac1cfb98c0a92e0dce166f546..13c7edd2b253efde4da4564bc34735c9c6e66129 100755 (executable)
@@ -1431,11 +1431,15 @@ sub switch_warning ($)
     }
   elsif ($cat eq 'none')
     {
-      setup_channel_type 'warning', silent => 1 - $has_no;
+      setup_channel_type 'warning', silent => ! $has_no;
     }
   elsif ($cat eq 'error')
     {
-      $warnings_are_errors = 1 - $has_no;
+      $warnings_are_errors = ! $has_no;
+      # Set exit code if Perl warns about something
+      # (like uninitialized variables).
+      $SIG{"__WARN__"} =
+       $has_no ? 'DEFAULT' : sub { print STDERR @_; $exit_code = 1; };
     }
   elsif (channel_type ($cat) eq 'warning')
     {
This page took 0.042049 seconds and 5 git commands to generate.