Commit 9b9f19dd authored by dt's avatar dt

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

Task-Nr:
parent 80f8d3eb
......@@ -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);
}
......
......@@ -115,6 +115,7 @@ protected:
private:
void ctor();
bool m_clean;
bool m_makeFileExists;
QString m_userArgs;
QString m_makeCmd;
QList<ProjectExplorer::Task> m_tasks;
......
......@@ -257,7 +257,6 @@ void QMakeStep::run(QFutureInterface<bool> &fi)
}
// Warn on common error conditions:
bool canContinue = true;
foreach (const ProjectExplorer::Task &t, m_tasks) {
addTask(t);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment