+2006-08-25 Noah Misch <address@hidden>
+
+ * lib/Autom4te/General.pm (END): Use `File::Path::rmtree' to
+ simplify the code.
+
2006-08-25 Paul Eggert <eggert@cs.ucla.edu>
Fix Lex library problem reported to us by Julio Garvia.
# autoconf -- create `configure' using m4 macros
-# Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
use Autom4te::ChannelDefs;
use Autom4te::Channels;
use File::Basename;
+use File::Path ();
use File::stat;
use IO::File;
use Carp;
if (!$debug && defined $tmp && -d $tmp)
{
- if (<$tmp/*>)
- {
- while (<$tmp/*>)
- {
- if (! unlink $_)
- {
- print STDERR "$me: cannot empty $tmp ($_): $!\n";
- $? = 1;
- return;
- }
- }
- }
- if (! rmdir $tmp)
- {
- print STDERR "$me: cannot remove $tmp: $!\n";
- $? = 1;
- return;
- }
+ local $SIG{__WARN__} = sub { $status = 1; warn $_[0] };
+ File::Path::rmtree $tmp;
}
# This is required if the code might send any output to stdout