Reported by Raja R. Harinath.
* bin/autoheader.in, bin/autoreconf.in, bin/autoscan.in,
* bin/autoupdate.in: Use error instead of die.
+2002-09-02 Akim Demaille <akim@epita.fr>
+
+ * lib/Autom4te/General.pm (&update_file): s/die/error/.
+ Reported by Raja R. Harinath.
+ * bin/autoheader.in, bin/autoreconf.in, bin/autoscan.in,
+ * bin/autoupdate.in: Use error instead of die.
+
2002-09-01 Paul Eggert <eggert@twinsun.com>
* tests/mktests.sh (ac_exclude_egrep, au_exclude_egrep): Use
if (! @ARGV)
{
my $configure_ac = find_configure_ac;
- die "$me: no input file\n"
+ error "no input file"
unless $configure_ac;
push @ARGV, $configure_ac;
}
local (%verbatim, %symbol);
do "$tmp/traces.pl";
warn "couldn't parse $tmp/traces.pl: $@" if $@;
-die "$me: error: AC_CONFIG_HEADERS not found in $ARGV[0]\n"
+error "error: AC_CONFIG_HEADERS not found in $ARGV[0]"
unless $config_h;
# We template only the first CONFIG_HEADER.
verbose "working in `$directory'";
chdir $directory
- or die "$me: cannot chdir to $directory: $!\n";
+ or error "cannot chdir to $directory: $!";
my $configure_ac = find_configure_ac;
- die "$me: cannot find `configure.ac' in `$directory'\n"
+ error "cannot find `configure.ac' in `$directory'"
unless $configure_ac;
# ---------------------- #
}
chdir $cwd
- or die "$me: cannot chdir to $cwd: $!\n";
+ or error "cannot chdir to $cwd: $!";
}
my $srcdir = $ARGV[0] || ".";
verbose "srcdir = $srcdir";
- chdir $srcdir || die "$me: cannot cd to $srcdir: $!\n";
+ chdir $srcdir || error "cannot cd to $srcdir: $!";
}
if /^\s*$/ || /^\s*\#/;
unless (/^(\S+)\s+(\S.*)$/ || /^(\S+)\s*$/)
{
- die "$me: cannot parse definition in $file:\n$_\n";
+ error "cannot parse definition in $file:\n$_";
}
my $word = $1;
my $macro = $2 || $generic_macro{$kind};
$table->close;
}
- die "$me: some tables are inconsistent\n"
+ error "some tables are inconsistent"
if !$tables_are_consistent;
}
if (! @ARGV)
{
my $configure_ac = find_configure_ac;
- die "$me: no input file\n"
+ error "no input file"
unless $configure_ac;
push @ARGV, $configure_ac;
}
# aclocal.m4 -> aclocal
my $set = basename (dirname ($file));
$set = 'aclocal' if $file eq 'aclocal.m4';
- die "$me: unknown set: $set: $_\n"
+ error "unknown set: $set: $_"
unless $set =~ /^(m4sugar|aclocal|autoconf)$/;
if ($domain eq "AC")
{
# such as `builtin', `changequote' etc. See autoconf/autoconf.m4.
delete $ac_macros{$_}
foreach (@m4_builtins);
- die "$me: no current Autoconf macros found\n"
+ error "no current Autoconf macros found"
unless keys %ac_macros;
- die "$me: no obsolete Autoconf macros found\n"
+ error "no obsolete Autoconf macros found"
unless keys %au_macros;
if ($debug)
# prepared input -- input, but reenables the quote before each AU macro.
open INPUT_M4, ">$tmp/input.m4"
- or die "$me: cannot open: $!\n";
+ or error "cannot open: $!";
open FILE, "<$file"
- or die "$me: cannot open: $!\n";
+ or error "cannot open: $!";
print INPUT_M4 "$input_m4";
while (<FILE>)
{
print INPUT_M4;
}
close FILE
- or die "$me: cannot close $file: $!\n";
+ or error "cannot close $file: $!";
close INPUT_M4
- or die "$me: cannot close $tmp/input.m4: $!\n";
+ or error "cannot close $tmp/input.m4: $!";
# Now ask m4 to perform the update.
xsystem ("$m4 --include=$tmp"
}
$in->close;
unlink ($from)
- or die "cannot not remove $from: $!";
+ or error "cannot not remove $from: $!";
return;
}