Qt4Project: do not show a error on make clean without a Makefile

Task-Nr:
This commit is contained in:
dt
2011-03-24 20:44:46 +01:00
parent 80f8d3eb00
commit 9b9f19dd7d
3 changed files with 23 additions and 8 deletions

View File

@@ -166,14 +166,23 @@ bool MakeStep::init()
ProjectExplorer::ToolChain *toolchain = bc->toolChain();
if (bc->subNodeBuild()){
if(!bc->subNodeBuild()->makefile().isEmpty()) {
if (bc->subNodeBuild()) {
QString makefile = bc->subNodeBuild()->makefile();
if(!makefile.isEmpty()) {
Utils::QtcProcess::addArg(&args, QLatin1String("-f"));
Utils::QtcProcess::addArg(&args, bc->subNodeBuild()->makefile());
Utils::QtcProcess::addArg(&args, makefile);
m_makeFileExists = QDir(workingDirectory).exists(makefile);
} else {
m_makeFileExists = QDir(workingDirectory).exists("Makefile");
}
} else {
if (!bc->makefile().isEmpty()) {
Utils::QtcProcess::addArg(&args, QLatin1String("-f"));
Utils::QtcProcess::addArg(&args, bc->makefile());
m_makeFileExists = QDir(workingDirectory).exists(bc->makefile());
} else {
m_makeFileExists = QDir(workingDirectory).exists("Makefile");
}
} else if (!bc->makefile().isEmpty()) {
Utils::QtcProcess::addArg(&args, QLatin1String("-f"));
Utils::QtcProcess::addArg(&args, bc->makefile());
}
Utils::QtcProcess::addArgs(&args, m_userArgs);
@@ -215,6 +224,13 @@ void MakeStep::run(QFutureInterface<bool> & fi)
return;
}
if (!m_makeFileExists) {
if (!m_clean)
emit addOutput(tr("Makefile not found. Please check your build settings"), BuildStep::MessageOutput);
fi.reportResult(m_clean);
return;
}
// Warn on common error conditions:
bool canContinue = true;
foreach (const ProjectExplorer::Task &t, m_tasks) {
@@ -228,7 +244,6 @@ void MakeStep::run(QFutureInterface<bool> & fi)
return;
}
AbstractProcessStep::run(fi);
}