]> Savannah Git Hosting - gnulib.git/commitdiff
prefix-gnulib-mk: give better diagnostics
authorJim Meyering <meyering@fb.com>
Sun, 27 Jan 2013 17:54:55 +0000 (09:54 -0800)
committerJim Meyering <meyering@fb.com>
Sat, 16 Mar 2013 05:13:46 +0000 (22:13 -0700)
* build-aux/prefix-gnulib-mk: Don't just "die".
Give better diagnostics upon failure.

ChangeLog
build-aux/prefix-gnulib-mk

index 0b9f30fdc1dfe251c9f3daabb68ae99d6695a0fb..98d74d335f467f454fc94765735d25746de758fe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-01-27  Jim Meyering  <jim@meyering.net>
+
+       prefix-gnulib-mk: give better diagnostics
+       * build-aux/prefix-gnulib-mk: Don't just "die".
+       Give better diagnostics upon failure.
+
 2013-03-13  Paul Eggert  <eggert@cs.ucla.edu>
 
        putenv: port to Solaris 10
index 7553f6542d14471061a2f03503a226f7b6920b4c..4d0518fa1f2bcffb9a61dd52538b52b341381ec5 100755 (executable)
@@ -189,10 +189,11 @@ sub process ($)
 {
   my ($file) = @_;
   my ($bak) = "$file.bak";
-  rename ($file, $bak) or die;
+  rename ($file, $bak) or die "$ME: rename $file $bak failed: $!\n";
   my $contents = contents ($bak);
   $contents = prefix ($contents);
-  my $out = new IO::File(">$file") or die;
+  my $out = new IO::File(">$file")
+    or die "$ME: $file: failed to open for writing: $!\n";
   print $out $contents;
 }