forked from qt-creator/qt-creator
Autotools: setup configure command if it did not exist
since 'configure' file does not exist before 'autoreconf' is executed first time, it is possible that initially 'configure' does not exist. Therefore command need to be recalculated again when step is about to be executed Change-Id: I7eeeaefd6d41adb2bcb247e35a3de5862899c8db Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user