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>
This commit is contained in:
parent
13ed47690d
commit
bbb40616d2
@ -1168,30 +1168,16 @@ MakefileGenerator::writeObj(QTextStream &t, const char *src)
|
|||||||
t << escapeDependencyPath(dstf) << ": " << escapeDependencyPath(srcf)
|
t << escapeDependencyPath(dstf) << ": " << escapeDependencyPath(srcf)
|
||||||
<< " " << escapeDependencyPaths(findDependencies(srcf)).join(" \\\n\t\t");
|
<< " " << 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) {
|
for(QStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) {
|
||||||
if((*sit).endsWith((*cppit))) {
|
if((*sit).endsWith((*cppit))) {
|
||||||
comp = "QMAKE_RUN_CXX";
|
comp = "QMAKE_RUN_CXX";
|
||||||
cimp = "QMAKE_RUN_CXX_IMP";
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(comp.isEmpty()) {
|
if (comp.isEmpty())
|
||||||
comp = "QMAKE_RUN_CC";
|
comp = "QMAKE_RUN_CC";
|
||||||
cimp = "QMAKE_RUN_CC_IMP";
|
if (!project->isEmpty(comp)) {
|
||||||
}
|
|
||||||
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)) {
|
|
||||||
QString p = var(comp);
|
QString p = var(comp);
|
||||||
p.replace(stringSrc, escapeFilePath(srcf));
|
p.replace(stringSrc, escapeFilePath(srcf));
|
||||||
p.replace(stringObj, escapeFilePath(dstf));
|
p.replace(stringObj, escapeFilePath(dstf));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user