Mercurial > octave
changeset 25510:2710440ea566
mkoctfile: fix logic error with handling of -c option (bug #54182)
* mkoctfile.in.cc (main): Fix logic error with handling of -c option.
Don't exit early if compile_only. We could exit early if both -c and
-o are given, but there is really no need to do that either, so just
allow processing to continue.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 27 Jun 2018 13:29:51 -0400 |
parents | e00aa6a75edd |
children | 49d3c6344afe |
files | src/mkoctfile.in.cc |
diffstat | 1 files changed, 3 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/mkoctfile.in.cc Mon Jun 25 16:14:52 2018 -0500 +++ b/src/mkoctfile.in.cc Wed Jun 27 13:29:51 2018 -0400 @@ -880,10 +880,6 @@ std::string o; if (compile_only) { - // There will be only one source file, so we are done - // after executing the command below and we don't need to - // keep track of the object file name. - if (! outputfile.empty ()) o = outputfile; else @@ -905,7 +901,7 @@ int status = run_command (cmd, printonly); - if (compile_only || status) + if (status) return status; } else @@ -923,10 +919,6 @@ std::string o; if (compile_only) { - // There will be only one source file, so we are done - // after executing the command below and we don't need to - // keep track of the object file name. - if (! outputfile.empty ()) o = outputfile; else @@ -949,7 +941,7 @@ int status = run_command (cmd, printonly); - if (compile_only || status) + if (status) return status; } else @@ -967,10 +959,6 @@ std::string o; if (compile_only) { - // There will be only one source file, so we are done - // after executing the command below and we don't need to - // keep track of the object file name. - if (! outputfile.empty ()) o = outputfile; else @@ -993,7 +981,7 @@ int status = run_command (cmd, printonly); - if (compile_only || status) + if (status) return status; } else