Commit e9069668 authored by dt's avatar dt
Browse files

Check for a Makefile before running make clean in the debugging helper

directory

Fixes smart make scripts that try to guess the correct working directory
for make.
parent a678cf51
......@@ -164,14 +164,16 @@ QString DebuggingHelperLibrary::buildDebuggingHelperLibrary(const QString &direc
output += "\n";
QString makeFullPath = env.searchInPath(makeCommand);
if (!makeFullPath.isEmpty()) {
output += QString("Running %1 clean...\n").arg(makeFullPath);
proc.start(makeFullPath, QStringList() << "clean");
proc.waitForFinished();
output += proc.readAll();
} else {
output += QString("%1 not found in PATH\n").arg(makeCommand);
return output;
if (QFileInfo(directory + "/Makefile").exists()) {
if (!makeFullPath.isEmpty()) {
output += QString("Running %1 clean...\n").arg(makeFullPath);
proc.start(makeFullPath, QStringList() << "clean");
proc.waitForFinished();
output += proc.readAll();
} else {
output += QString("%1 not found in PATH\n").arg(makeCommand);
return output;
}
}
output += QString("\nRunning %1 ...\n").arg(qmakeCommand);
......
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