comparison build-aux/prefix-gnulib-mk @ 17371:6959449c25f6

prefix-gnulib-mk: give better diagnostics * build-aux/prefix-gnulib-mk: Don't just "die". Give better diagnostics upon failure.
author Jim Meyering <meyering@fb.com>
date Sun, 27 Jan 2013 09:54:55 -0800
parents 4aefd9877c8a
children
comparison
equal deleted inserted replaced
17370:2a9ec0103b3c 17371:6959449c25f6
187 # ------------- 187 # -------------
188 sub process ($) 188 sub process ($)
189 { 189 {
190 my ($file) = @_; 190 my ($file) = @_;
191 my ($bak) = "$file.bak"; 191 my ($bak) = "$file.bak";
192 rename ($file, $bak) or die; 192 rename ($file, $bak) or die "$ME: rename $file $bak failed: $!\n";
193 my $contents = contents ($bak); 193 my $contents = contents ($bak);
194 $contents = prefix ($contents); 194 $contents = prefix ($contents);
195 my $out = new IO::File(">$file") or die; 195 my $out = new IO::File(">$file")
196 or die "$ME: $file: failed to open for writing: $!\n";
196 print $out $contents; 197 print $out $contents;
197 } 198 }
198 199
199 { 200 {
200 GetOptions 201 GetOptions