diff options
author | Andy Shaw <qt-info@nokia.com> | 2009-10-08 07:15:20 (GMT) |
---|---|---|
committer | Marius Storm-Olsen <marius.storm-olsen@nokia.com> | 2009-10-19 11:30:18 (GMT) |
commit | e1f691d84dad17c5ee47c97c31ae743093ad8bc9 (patch) | |
tree | 44191509230f34997040582706bb24c678b738cd /qmake/main.cpp | |
parent | f9e46cdb2d9a42d52f90fe50a53a76c03065b9ce (diff) | |
download | Qt-e1f691d84dad17c5ee47c97c31ae743093ad8bc9.zip Qt-e1f691d84dad17c5ee47c97c31ae743093ad8bc9.tar.gz Qt-e1f691d84dad17c5ee47c97c31ae743093ad8bc9.tar.bz2 |
Ensure that qmake doesn't lose the error code when processing subdirs
When processing a project in a subdirs template failed for whatever
reason then qmake would lose the result of that and would return an
error code of 0 if the subdirs project file itself was processed fine.
So now it ensures that any errors arising from processing a project
referenced in a subdirs project file are not lost so that the error code
returned from qmake will indicate an error actually occured.
Task-number: QTBUG-4065
Reviewed-by: mariusSO
Original-commit: c15b370c9db16fdbfd9e7bec89ee9bf8c1110827
Diffstat (limited to 'qmake/main.cpp')
-rw-r--r-- | qmake/main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qmake/main.cpp b/qmake/main.cpp index 73fdda9..a0346c5 100644 --- a/qmake/main.cpp +++ b/qmake/main.cpp @@ -168,7 +168,11 @@ int runQMake(int argc, char **argv) continue; } - MetaMakefileGenerator *mkfile = MetaMakefileGenerator::createMetaGenerator(&project, QString(), false); + bool success = true; + MetaMakefileGenerator *mkfile = MetaMakefileGenerator::createMetaGenerator(&project, QString(), false, &success); + if (!success) + exit_val = 3; + if(mkfile && !mkfile->write(oldpwd)) { if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT) fprintf(stderr, "Unable to generate project file.\n"); |