(generate_makefile): Detect write/close failure.
authorJim Meyering <jim@meyering.net>
Sat, 4 Mar 2000 08:51:51 +0000 (08:51 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 4 Mar 2000 08:51:51 +0000 (08:51 +0000)
automake.in

index 5f666c1..da265cf 100755 (executable)
@@ -687,7 +687,12 @@ sub generate_makefile
     print GM_FILE $output_rules;
     print GM_FILE $output_trailer;
 
-    close (GM_FILE);
+    if (! close (GM_FILE))
+      {
+       warn "automake: $am_file.in: cannot close: $!\n";
+       $exit_status = 1;
+       return;
+      }
 }
 
 ################################################################