# HG changeset patch # User Rik # Date 1405309405 25200 # Node ID 3e4e2cfba18640eee534ab902868acc485486c80 # Parent bebe22d2cb582dbe3b345ac9c970411891afb3e4 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. diff -r bebe22d2cb58 -r 3e4e2cfba186 src/mkoctfile.in.cc --- 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) {