diff --git a/src/plugins/autotoolsprojectmanager/configurestep.cpp b/src/plugins/autotoolsprojectmanager/configurestep.cpp index cd8676d0b85..0b21d0ec061 100644 --- a/src/plugins/autotoolsprojectmanager/configurestep.cpp +++ b/src/plugins/autotoolsprojectmanager/configurestep.cpp @@ -86,6 +86,8 @@ public: private: void doRun() final; + CommandLine getCommandLine(const QString &arguments); + bool m_runConfigure = false; }; @@ -105,11 +107,7 @@ ConfigureStep::ConfigureStep(BuildStepList *bsl, Id id) setWorkingDirectoryProvider([this] { return project()->projectDirectory(); }); setCommandLineProvider([this, arguments] { - BuildConfiguration *bc = buildConfiguration(); - - return CommandLine({FilePath::fromString(projectDirRelativeToBuildDir(bc) + "configure"), - arguments->value(), - CommandLine::Raw}); + return getCommandLine(arguments->value()); }); setSummaryUpdater([this] { @@ -120,6 +118,15 @@ ConfigureStep::ConfigureStep(BuildStepList *bsl, Id id) }); } +CommandLine ConfigureStep::getCommandLine(const QString &arguments) +{ + BuildConfiguration *bc = buildConfiguration(); + + return CommandLine({FilePath::fromString(projectDirRelativeToBuildDir(bc) + "configure"), + arguments, + CommandLine::Raw}); +} + void ConfigureStep::doRun() { //Check whether we need to run configure @@ -138,6 +145,12 @@ void ConfigureStep::doRun() return; } + ProcessParameters *param = processParameters(); + if (!param->effectiveCommand().exists()) { + param->setCommandLine(getCommandLine(param->command().arguments())); + setSummaryText(param->summaryInWorkdir(displayName())); + } + m_runConfigure = false; AbstractProcessStep::doRun(); }