[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05-more-xfiles.patch
From: |
Akim Demaille |
Subject: |
05-more-xfiles.patch |
Date: |
Sun, 21 Oct 2001 20:03:48 +0200 |
Index: automake.in
--- automake.in Fri, 28 Sep 2001 09:30:37 +0200 akim
+++ automake.in Sun, 30 Sep 2001 19:22:37 +0200 akim
@@ -1314,13 +1293,7 @@ sub generate_makefile
}
}
- my $gm_file = new IO::File "> $out_file";
- if (! $gm_file)
- {
- warn "$me: ${am_file}.in: cannot write: $!\n";
- $exit_status = 1;
- return;
- }
+ my $gm_file = new Automake::XFile "> $out_file";
print "$me: creating ", $makefile, ".in\n" if $verbose;
# In case we're running under MSWindows, don't write with CRLF
@@ -1334,13 +1307,6 @@ sub generate_makefile
print $gm_file $output_header;
print $gm_file $output_rules;
print $gm_file $output_trailer;
-
- if (! $gm_file->close)
- {
- warn "$me: $am_file.in: cannot close: $!\n";
- $exit_status = 1;
- return;
- }
}
################################################################
@@ -2973,12 +2939,7 @@ sub scan_texinfo_file
# is not created.
my @syncodeindexes = ();
- my $texi = new IO::File ("< $filename");
- if (! $texi)
- {
- &am_error ("couldn't open `$filename': $!");
- return '';
- }
+ my $texi = new Automake::XFile ("< $filename");
print "$me: reading $filename\n" if $verbose;
my ($outfile, $vfile);
@@ -3597,16 +3558,12 @@ sub scan_aclocal_m4
&define_variable ("ACLOCAL_M4", '$(top_srcdir)/aclocal.m4');
&push_dist_common ('aclocal.m4');
- my $aclocal = new IO::File ("< aclocal.m4");
- if ($aclocal)
- {
- my $line = $aclocal->getline;
- $aclocal->close;
+ my $aclocal = new Automake::XFile ("< aclocal.m4");
+ my $line = $aclocal->getline;
- if ($line =~ 'generated automatically by aclocal')
- {
- $regen_aclocal = 1;
- }
+ if ($line =~ 'generated automatically by aclocal')
+ {
+ $regen_aclocal = 1;
}
}
@@ -7962,6 +7903,7 @@ sub set_strictness
# Ensure a file exists.
sub create
{
+ use IO::File;
my ($file) = @_;
my $touch = new IO::File (">> $file");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 05-more-xfiles.patch,
Akim Demaille <=