changeset 18915:3e4e2cfba186 stable

Stop mkoctfile process if any part of compilation or linking fails (bug #42704). * mkoctfile.in.cc (main): Add additional exit condition to for loops of !result where result is the exit status of the last system command.
author Rik <rik@octave.org>
date Sun, 13 Jul 2014 20:43:25 -0700
parents bebe22d2cb58
children 5999e654f256
files src/mkoctfile.in.cc
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/mkoctfile.in.cc	Sun Jul 13 19:46:57 2014 -0700
+++ b/src/mkoctfile.in.cc	Sun Jul 13 20:43:25 2014 -0700
@@ -626,7 +626,7 @@
       return 0;
     }
 
-  for (it = f77files.begin (); it != f77files.end (); ++it)
+  for (it = f77files.begin (); it != f77files.end () && !result; ++it)
     {
       std::string f = *it, b = basename (f, true);
       if (!vars["F77"].empty ())
@@ -655,7 +655,7 @@
         }
     }
 
-  for (it = cfiles.begin (); it != cfiles.end (); ++it)
+  for (it = cfiles.begin (); it != cfiles.end () && !result; ++it)
     {
       std::string f = *it;
       if (!vars["CC"].empty ())
@@ -685,7 +685,7 @@
         }
     }
 
-  for (it = ccfiles.begin (); it != ccfiles.end (); ++it)
+  for (it = ccfiles.begin (); it != ccfiles.end () && !result; ++it)
     {
       std::string f = *it;
       if (!vars["CXX"].empty ())
@@ -715,7 +715,7 @@
         }
     }
 
-  if (link && !objfiles.empty ())
+  if (link && !objfiles.empty () && !result)
     {
       if (link_stand_alone)
         {