Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -164,14 +164,16 @@ QString DebuggingHelperLibrary::buildDebuggingHelperLibrary(const QString &direc ...@@ -164,14 +164,16 @@ QString DebuggingHelperLibrary::buildDebuggingHelperLibrary(const QString &direc
output += "\n"; output += "\n";
QString makeFullPath = env.searchInPath(makeCommand); QString makeFullPath = env.searchInPath(makeCommand);
if (!makeFullPath.isEmpty()) { if (QFileInfo(directory + "/Makefile").exists()) {
output += QString("Running %1 clean...\n").arg(makeFullPath); if (!makeFullPath.isEmpty()) {
proc.start(makeFullPath, QStringList() << "clean"); output += QString("Running %1 clean...\n").arg(makeFullPath);
proc.waitForFinished(); proc.start(makeFullPath, QStringList() << "clean");
output += proc.readAll(); proc.waitForFinished();
} else { output += proc.readAll();
output += QString("%1 not found in PATH\n").arg(makeCommand); } else {
return output; output += QString("%1 not found in PATH\n").arg(makeCommand);
return output;
}
} }
output += QString("\nRunning %1 ...\n").arg(qmakeCommand); output += QString("\nRunning %1 ...\n").arg(qmakeCommand);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment