diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-09-18 18:32:53 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-21 01:25:19 +0200 |
commit | e582d742cced16cb8c71ef83b651f0907beff0e8 (patch) | |
tree | d29f1b8c4ac6a87519fe748a3e0b999f35a43a81 /qmake | |
parent | 15e9c3301ce90a24de909e36d8091782987c34bf (diff) |
Sanitize QMAKE_EXTRA_COMPILERS paths in makefiles
There was a mismatch of how we sanitized paths for dependencies of the
target and how those dependencies were sanitized (or not sanitized),
resulting in the target depending on 'some/path/foo.o' while the
extra compiler target was named 'some/path//foo.o', with an extra
slash. This confused 'make' enough to decide that it didn't know
how to build the dependencies for the target.
Change-Id: I181b86c291286cbbbb1f7b4c3b929a5f1dc163a3
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/makefile.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index f85433c6a1..d924b391a7 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1886,10 +1886,10 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) if (config.indexOf("combine") != -1) { // compilers with a combined input only have one output QString input = project->first(ProKey(*it + ".output")).toQString(); - t << " " << escapeDependencyPath(replaceExtraCompilerVariables(tmp_out, input, QString())); + t << " " << escapeDependencyPath(Option::fixPathToTargetOS(replaceExtraCompilerVariables(tmp_out, input, QString()))); } else { for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) { - t << " " << escapeDependencyPath(replaceExtraCompilerVariables(tmp_out, (*input).toQString(), QString())); + t << " " << escapeDependencyPath(Option::fixPathToTargetOS(replaceExtraCompilerVariables(tmp_out, (*input).toQString(), QString()))); } } t << endl; @@ -1920,8 +1920,8 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) if(project->isActiveConfig("no_delete_multiple_files")) { for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) { QString tinp = (*input).toQString(); - cleans.append(" " + replaceExtraCompilerVariables(tmp_clean, tinp, - replaceExtraCompilerVariables(tmp_out, tinp, QString()))); + cleans.append(" " + Option::fixPathToTargetOS(replaceExtraCompilerVariables(tmp_clean, tinp, + replaceExtraCompilerVariables(tmp_out, tinp, QString())))); } } else { QString files, file; @@ -1935,7 +1935,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) cleans.append(files); files.clear(); } - files += file; + files += Option::fixPathToTargetOS(file); } if(!files.isEmpty()) cleans.append(files); @@ -2033,7 +2033,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) QString out = replaceExtraCompilerVariables(tmp_out, QString(), QString()); QString cmd = replaceExtraCompilerVariables(tmp_cmd, escapeFilePaths(inputs), QStringList() << out); - t << escapeDependencyPath(out) << ":"; + t << escapeDependencyPath(Option::fixPathToTargetOS(out)) << ":"; // compiler.CONFIG+=explicit_dependencies means that ONLY compiler.depends gets to cause Makefile dependencies if (config.indexOf("explicit_dependencies") != -1) { t << " " << valList(escapeDependencyPaths(fileFixify(tmp_dep, Option::output_dir, Option::output_dir))); @@ -2048,7 +2048,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) QString in = Option::fixPathToTargetOS(inpf, false); QStringList deps = findDependencies(inpf); deps += escapeDependencyPath(in); - QString out = unescapeFilePath(replaceExtraCompilerVariables(tmp_out, inpf, QString())); + QString out = unescapeFilePath(Option::fixPathToTargetOS(replaceExtraCompilerVariables(tmp_out, inpf, QString()))); if(!tmp_dep.isEmpty()) { QStringList pre_deps = fileFixify(tmp_dep, Option::output_dir, Option::output_dir); for(int i = 0; i < pre_deps.size(); ++i) |