forked from qt-creator/qt-creator
AutoTools: Use new AbstractProcessStep convenience functions
Change-Id: I994343d3d5cccf7ced6f2e576bd1c1cd5055fc47 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -85,15 +85,15 @@ AutogenStep::AutogenStep(BuildStepList *bsl, Utils::Id id) : AbstractProcessStep
|
||||
m_runAutogen = true;
|
||||
});
|
||||
|
||||
setCommandLineProvider([this] {
|
||||
return CommandLine(FilePath::fromString("./autogen.sh"),
|
||||
m_additionalArgumentsAspect->value(),
|
||||
CommandLine::Raw);
|
||||
});
|
||||
|
||||
setSummaryUpdater([this] {
|
||||
ProcessParameters param;
|
||||
param.setMacroExpander(macroExpander());
|
||||
param.setEnvironment(buildEnvironment());
|
||||
param.setWorkingDirectory(project()->projectDirectory());
|
||||
param.setCommandLine({FilePath::fromString("./autogen.sh"),
|
||||
m_additionalArgumentsAspect->value(),
|
||||
CommandLine::Raw});
|
||||
|
||||
setupProcessParameters(¶m);
|
||||
return param.summary(displayName());
|
||||
});
|
||||
}
|
||||
@@ -101,13 +101,7 @@ AutogenStep::AutogenStep(BuildStepList *bsl, Utils::Id id) : AbstractProcessStep
|
||||
bool AutogenStep::init()
|
||||
{
|
||||
ProcessParameters *pp = processParameters();
|
||||
pp->setMacroExpander(macroExpander());
|
||||
pp->setEnvironment(buildEnvironment());
|
||||
pp->setWorkingDirectory(project()->projectDirectory());
|
||||
pp->setCommandLine({FilePath::fromString("./autogen.sh"),
|
||||
m_additionalArgumentsAspect->value(),
|
||||
CommandLine::Raw});
|
||||
|
||||
setupProcessParameters(pp);
|
||||
return AbstractProcessStep::init();
|
||||
}
|
||||
|
||||
|
||||
@@ -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(¶m);
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
@@ -105,16 +105,19 @@ ConfigureStep::ConfigureStep(BuildStepList *bsl, Utils::Id id)
|
||||
m_runConfigure = true;
|
||||
});
|
||||
|
||||
setSummaryUpdater([this] {
|
||||
setWorkingDirectoryProvider([this] { return project()->projectDirectory(); });
|
||||
|
||||
setCommandLineProvider([this] {
|
||||
BuildConfiguration *bc = buildConfiguration();
|
||||
|
||||
ProcessParameters param;
|
||||
param.setMacroExpander(macroExpander());
|
||||
param.setEnvironment(buildEnvironment());
|
||||
param.setWorkingDirectory(buildDirectory());
|
||||
param.setCommandLine({FilePath::fromString(projectDirRelativeToBuildDir(bc) + "configure"),
|
||||
return CommandLine({FilePath::fromString(projectDirRelativeToBuildDir(bc) + "configure"),
|
||||
m_additionalArgumentsAspect->value(),
|
||||
CommandLine::Raw});
|
||||
});
|
||||
|
||||
setSummaryUpdater([this] {
|
||||
ProcessParameters param;
|
||||
setupProcessParameters(¶m);
|
||||
|
||||
return param.summaryInWorkdir(displayName());
|
||||
});
|
||||
@@ -122,15 +125,8 @@ ConfigureStep::ConfigureStep(BuildStepList *bsl, Utils::Id id)
|
||||
|
||||
bool ConfigureStep::init()
|
||||
{
|
||||
BuildConfiguration *bc = buildConfiguration();
|
||||
|
||||
ProcessParameters *pp = processParameters();
|
||||
pp->setMacroExpander(macroExpander());
|
||||
pp->setEnvironment(buildEnvironment());
|
||||
pp->setWorkingDirectory(buildDirectory());
|
||||
pp->setCommandLine({FilePath::fromString(projectDirRelativeToBuildDir(bc) + "configure"),
|
||||
m_additionalArgumentsAspect->value(),
|
||||
CommandLine::Raw});
|
||||
setupProcessParameters(pp);
|
||||
|
||||
return AbstractProcessStep::init();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user