mirror of
git://git.sv.gnu.org/autoconf
synced 2025-01-18 10:45:15 +08:00
* lib/Autom4te/FileUtils.pm, lib/Autom4te/Struct.pm: Sync
from Automake.
This commit is contained in:
parent
d53aec7560
commit
df756e0046
@ -1,5 +1,8 @@
|
|||||||
2006-04-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
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.
|
* doc/make-stds.texi: Sync from gnulib.
|
||||||
|
|
||||||
2006-04-06 Eric Blake <ebb9@byu.net>
|
2006-04-06 Eric Blake <ebb9@byu.net>
|
||||||
|
@ -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
|
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
|
=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];
|
$command = (split (' ', $command))[0];
|
||||||
if ($!)
|
if ($!)
|
||||||
@ -235,7 +235,8 @@ sub handle_exec_errors ($)
|
|||||||
# Propagate exit codes.
|
# Propagate exit codes.
|
||||||
fatal ('',
|
fatal ('',
|
||||||
"$command failed with exit status: $status",
|
"$command failed with exit status: $status",
|
||||||
exit_code => $status);
|
exit_code => $status)
|
||||||
|
unless $status == $expected;
|
||||||
}
|
}
|
||||||
elsif (WIFSIGNALED ($?))
|
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.
|
in verbose mode.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
# xsystem ($COMMAND)
|
sub xsystem (@)
|
||||||
# ------------------
|
|
||||||
sub xsystem ($)
|
|
||||||
{
|
{
|
||||||
my ($command) = @_;
|
my (@command) = @_;
|
||||||
|
|
||||||
verb "running: $command";
|
verb "running: @command";
|
||||||
|
|
||||||
$! = 0;
|
$! = 0;
|
||||||
handle_exec_errors $command
|
handle_exec_errors "@command"
|
||||||
if system $command;
|
if system @command;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -508,7 +508,7 @@ accessor accordingly.
|
|||||||
The constructor of a generated class can be passed a list
|
The constructor of a generated class can be passed a list
|
||||||
of I<element>=>I<value> pairs, with which to initialize the struct.
|
of I<element>=>I<value> pairs, with which to initialize the struct.
|
||||||
If no initializer is specified for a particular element, its default
|
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.
|
elements are silently ignored.
|
||||||
|
|
||||||
Note that the initializer for a nested struct is specified
|
Note that the initializer for a nested struct is specified
|
||||||
|
Loading…
Reference in New Issue
Block a user