diff options
author | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2014-11-03 17:13:17 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-01-13 11:47:39 +0100 |
commit | bbb40616d25b1a1378050bca4de98ebc454bd2b7 (patch) | |
tree | 39d56d5ec5dbed7a36464b9d7cf8ea1c601c0a13 | |
parent | 13ed47690da658c3e9b9f445458156acc6dee986 (diff) |
remove dead code
In ancient times, the existence of QMAKE_RUN_CXX_IMP determined the
use of implicit rules. The code path for implicit rules was turned
off in 2006 (0287fe3c), which probably was a refactoring artifact.
Later, implicit rules were enabled again using a different approach.
These days, the non-existence of QMAKE_RUN_CXX determines the use of
implicit rules.
We remove the dead code path now and rely on the latter condition.
One part of the dead code is a feature that turns off inference rules if
the OBJECTS_DIR is set or source file names do not match expectations.
If somebody ever missed this, it has been reimplemented otherwise.
Or not.
Change-Id: If3ce9904d9c1df6e4048c58c2452854cce7fa206
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
-rw-r--r-- | qmake/generators/makefile.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 4c501983d8..3b807c4ccf 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1168,30 +1168,16 @@ MakefileGenerator::writeObj(QTextStream &t, const char *src) t << escapeDependencyPath(dstf) << ": " << escapeDependencyPath(srcf) << " " << escapeDependencyPaths(findDependencies(srcf)).join(" \\\n\t\t"); - ProKey comp, cimp; + ProKey comp; for(QStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) { if((*sit).endsWith((*cppit))) { comp = "QMAKE_RUN_CXX"; - cimp = "QMAKE_RUN_CXX_IMP"; break; } } - if(comp.isEmpty()) { + if (comp.isEmpty()) comp = "QMAKE_RUN_CC"; - cimp = "QMAKE_RUN_CC_IMP"; - } - bool use_implicit_rule = !project->isEmpty(cimp); - use_implicit_rule = false; - if(use_implicit_rule) { - if(!project->isEmpty("OBJECTS_DIR")) { - use_implicit_rule = false; - } else { - int dot = (*sit).lastIndexOf('.'); - if(dot == -1 || ((*sit).left(dot) + Option::obj_ext != (*oit))) - use_implicit_rule = false; - } - } - if (!use_implicit_rule && !project->isEmpty(comp)) { + if (!project->isEmpty(comp)) { QString p = var(comp); p.replace(stringSrc, escapeFilePath(srcf)); p.replace(stringObj, escapeFilePath(dstf)); |