AutoTools: Use new AbstractProcessStep convenience functions

Change-Id: I994343d3d5cccf7ced6f2e576bd1c1cd5055fc47
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2020-08-13 16:48:25 +02:00
parent 69ff17aa2d
commit 1d6779f185
3 changed files with 29 additions and 42 deletions

View File

@@ -83,15 +83,17 @@ AutoreconfStep::AutoreconfStep(BuildStepList *bsl, Utils::Id id)
m_runAutoreconf = true;
});
setCommandLineProvider([this] {
return Utils::CommandLine(Utils::FilePath::fromString("autoreconf"),
m_additionalArgumentsAspect->value(),
Utils::CommandLine::Raw);
});
setWorkingDirectoryProvider([this] { return project()->projectDirectory(); });
setSummaryUpdater([this] {
ProcessParameters param;
param.setMacroExpander(macroExpander());
param.setEnvironment(buildEnvironment());
param.setWorkingDirectory(project()->projectDirectory());
param.setCommandLine({Utils::FilePath::fromString("autoreconf"),
m_additionalArgumentsAspect->value(),
Utils::CommandLine::Raw});
setupProcessParameters(&param);
return param.summary(displayName());
});
}
@@ -99,12 +101,7 @@ AutoreconfStep::AutoreconfStep(BuildStepList *bsl, Utils::Id id)
bool AutoreconfStep::init()
{
ProcessParameters *pp = processParameters();
pp->setMacroExpander(macroExpander());
pp->setEnvironment(buildEnvironment());
pp->setWorkingDirectory(project()->projectDirectory());
pp->setCommandLine({Utils::FilePath::fromString("autoreconf"),
m_additionalArgumentsAspect->value(), Utils::CommandLine::Raw});
setupProcessParameters(pp);
return AbstractProcessStep::init();
}