QmakePM: Fix redundant execution of qmake on build file

... when Makefile is customized.

The resolved makefile was <directory>Makefile.custom instead of
<directory>/Makefile.custom.

Change-Id: I01c4ef8b6d4ba64fc6663219c2eab7a39e03888b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2017-06-18 12:08:29 +03:00
committed by Orgad Shaneh
parent ea86ff5eb0
commit b57553b7a2

View File

@@ -225,19 +225,18 @@ bool QMakeStep::init(QList<const BuildStep *> &earlierSteps)
m_makeArguments.clear();
}
QString makefile = workingDirectory;
QString makefile = workingDirectory + '/';
if (qmakeBc->subNodeBuild()) {
QmakeProFile *pro = qmakeBc->subNodeBuild()->proFile();
if (pro && !pro->makefile().isEmpty())
makefile.append(pro->makefile());
else
makefile.append(QLatin1String("/Makefile"));
makefile.append("Makefile");
} else if (!qmakeBc->makefile().isEmpty()) {
makefile.append(QLatin1Char('/'));
makefile.append(qmakeBc->makefile());
} else {
makefile.append(QLatin1String("/Makefile"));
makefile.append("Makefile");
}
// Check whether we need to run qmake