diff options
author | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2014-11-24 19:51:32 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-02-17 18:27:47 +0000 |
commit | 552741143724e43d8b06132537b389da7e4ff837 (patch) | |
tree | b26e1c9d2d19c9728cdfbc9cb2a5f387be107608 /qmake/generators/makefile.cpp | |
parent | e0962270d74db5950b9567d4996189f115a1c75a (diff) |
remove pointless fixPathToTargetOS() calls
it makes no sense to call it on paths that are fixified right before or
after, as fileFixify() calls it itself.
and verifyExtraCompiler() calls normalizePath() on its file argument.
Change-Id: I8fb21e129fd29428d1855de73483087842bc1bdd
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'qmake/generators/makefile.cpp')
-rw-r--r-- | qmake/generators/makefile.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 3e06f3fec0..5c0fd046bc 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -725,8 +725,7 @@ MakefileGenerator::init() if((*input).isEmpty()) continue; QString inpf = (*input).toQString(); - QString in = Option::fixPathToTargetOS(inpf, false); - if (!verifyExtraCompiler((*it).toQString(), in)) //verify + if (!verifyExtraCompiler((*it).toQString(), inpf)) //verify continue; QString out = replaceExtraCompilerVariables(tmp_out.toQString(), inpf, QString(), NoShell); out = fileFixify(out, Option::output_dir, Option::output_dir); @@ -1052,7 +1051,7 @@ MakefileGenerator::writeProjectMakefile() writeSubTargets(t, targets, SubTargetsNoFlags); if(!project->isActiveConfig("no_autoqmake")) { - QString mkf = escapeDependencyPath(Option::fixPathToTargetOS(fileFixify(Option::output.fileName()))); + QString mkf = escapeDependencyPath(fileFixify(Option::output.fileName())); for(QList<SubTarget*>::Iterator it = targets.begin(); it != targets.end(); ++it) t << escapeDependencyPath((*it)->makefile) << ": " << mkf << endl; } @@ -1509,7 +1508,6 @@ MakefileGenerator::createObjectList(const ProStringList &sources) if (project->isActiveConfig("object_parallel_to_source")) { // The source paths are relative to the output dir, but we need source-relative paths QString sourceRelativePath = fileFixify(sfn, qmake_getpwd(), Option::output_dir); - sourceRelativePath = Option::fixPathToTargetOS(sourceRelativePath, false); if (sourceRelativePath.startsWith(".." + Option::dir_sep)) sourceRelativePath = fileFixify(sourceRelativePath, FileFixifyAbsolute); @@ -1732,7 +1730,7 @@ MakefileGenerator::verifyExtraCompiler(const ProString &comp, const QString &fil if((*input).isEmpty()) continue; QString inpf = (*input).toQString(); - QString in = fileFixify(Option::fixPathToTargetOS(inpf, false)); + QString in = fileFixify(inpf); if(in == file) { bool pass = project->test(verify.toKey(), QList<ProStringList>() << ProStringList(replaceExtraCompilerVariables(tmp_out.toQString(), inpf, QString(), NoShell)) << @@ -1764,7 +1762,7 @@ MakefileGenerator::verifyExtraCompiler(const ProString &comp, const QString &fil if((*input).isEmpty()) continue; QString inpf = (*input).toQString(); - QString in = fileFixify(Option::fixPathToTargetOS(inpf, false)); + QString in = fileFixify(inpf); if(in == file) { QString out = replaceExtraCompilerVariables(tmp_out, inpf, QString(), NoShell); QString cmd = replaceExtraCompilerVariables(tmp_cmd, in, out, LocalShell); @@ -1832,8 +1830,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) for (ProStringList::ConstIterator it2 = comp_inputs.begin(); it2 != comp_inputs.end(); ++it2) { const ProStringList &tmp = project->values((*it2).toKey()); for (ProStringList::ConstIterator input = tmp.begin(); input != tmp.end(); ++input) { - QString in = Option::fixPathToTargetOS((*input).toQString(), false); - if(verifyExtraCompiler((*it), in)) + if (verifyExtraCompiler((*it), (*input).toQString())) tmp_inputs.append((*input)); } } @@ -2250,7 +2247,7 @@ QString MakefileGenerator::build_args(const QString &outdir) ret += buildArgs(); //output - QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName())); + QString ofile = fileFixify(Option::output.fileName()); if(!ofile.isEmpty() && ofile != project->first("QMAKE_MAKEFILE")) ret += " -o " + escapeFilePath(ofile); @@ -2579,7 +2576,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT if(suffix == "clean") { t << fixFileVarGlue("QMAKE_CLEAN", "\t-$(DEL_FILE) ", "\n\t-$(DEL_FILE) ", "\n"); } else if(suffix == "distclean") { - QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName())); + QString ofile = fileFixify(Option::output.fileName()); if(!ofile.isEmpty()) t << "\t-$(DEL_FILE) " << escapeFilePath(ofile) << endl; t << fixFileVarGlue("QMAKE_DISTCLEAN", "\t-$(DEL_FILE) ", " ", "\n"); @@ -2683,7 +2680,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT void MakefileGenerator::writeMakeQmake(QTextStream &t, bool noDummyQmakeAll) { - QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName())); + QString ofile = fileFixify(Option::output.fileName()); if(project->isEmpty("QMAKE_FAILED_REQUIREMENTS") && !project->isEmpty("QMAKE_INTERNAL_PRL_FILE")) { QStringList files = escapeFilePaths(fileFixify(Option::mkfile::project_files)); t << escapeDependencyPath(project->first("QMAKE_INTERNAL_PRL_FILE").toQString()) << ": \n\t" |