]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/Autom4te/FileUtils.pm, lib/Autom4te/Struct.pm: Sync
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Thu, 6 Apr 2006 22:39:22 +0000 (22:39 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Thu, 6 Apr 2006 22:39:22 +0000 (22:39 +0000)
from Automake.

ChangeLog
lib/Autom4te/FileUtils.pm
lib/Autom4te/Struct.pm

index aad227939808e80f9e4edc8d9b70ce9640ddc37a..af3467fd6e1bb1ff4f1e9cb62413ac176fcbbef9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-04-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       * lib/Autom4te/FileUtils.pm, lib/Autom4te/Struct.pm: Sync
+       from Automake.
+
        * doc/make-stds.texi: Sync from gnulib.
 
 2006-04-06  Eric Blake  <ebb9@byu.net>
index c8a5beb5b4fe449da8a23a2db31d3b515710cf4e..4b1f89271a5bbeba9b68c41084461617cd7dd614 100644 (file)
@@ -207,18 +207,18 @@ sub up_to_date_p ($@)
 }
 
 
-=item C<handle_exec_errors ($command)>
+=item C<handle_exec_errors ($command, [$expected_exit_code = 0])>
 
 Display an error message for C<$command>, based on the content of
-C<$?> and C<$!>.
+C<$?> and C<$!>.  Be quiet if the command exited normally
+with C<$expected_exit_code>.
 
 =cut
 
-# handle_exec_errors ($COMMAND)
-# -----------------------------
-sub handle_exec_errors ($)
+sub handle_exec_errors ($;$)
 {
-  my ($command) = @_;
+  my ($command, $expected) = @_;
+  $expected = 0 unless defined $expected;
 
   $command = (split (' ', $command))[0];
   if ($!)
@@ -235,7 +235,8 @@ sub handle_exec_errors ($)
          # Propagate exit codes.
          fatal ('',
                 "$command failed with exit status: $status",
-                exit_code => $status);
+                exit_code => $status)
+           unless $status == $expected;
        }
       elsif (WIFSIGNALED ($?))
        {
@@ -272,24 +273,22 @@ sub xqx ($)
 }
 
 
-=item C<xsystem ($command)>
+=item C<xsystem (@argv)>
 
-Same as C<system>, but fails on errors, and reports the C<$command>
+Same as C<system>, but fails on errors, and reports the C<@argv>
 in verbose mode.
 
 =cut
 
-# xsystem ($COMMAND)
-# ------------------
-sub xsystem ($)
+sub xsystem (@)
 {
-  my ($command) = @_;
+  my (@command) = @_;
 
-  verb "running: $command";
+  verb "running: @command";
 
   $! = 0;
-  handle_exec_errors $command
-    if system $command;
+  handle_exec_errors "@command"
+    if system @command;
 }
 
 
index 36fdc2c398073ecdc7d555d26b2639cf49f30f0b..7c7f3b51b459fc0c06eeab9b4548c55ca70f36d0 100644 (file)
@@ -508,7 +508,7 @@ accessor accordingly.
 The constructor of a generated class can be passed a list
 of I<element>=>I<value> pairs, with which to initialize the struct.
 If no initializer is specified for a particular element, its default
-initialization is performed instead. Initializers for nonexistent
+initialization is performed instead. Initializers for non-existent
 elements are silently ignored.
 
 Note that the initializer for a nested struct is specified