forked from qt-creator/qt-creator
Profile introduction
Introduce Profiles to store sets of values that describe a system/device. These profiles are held by a target, getting rid of much of the information stored in the Build-/Run-/DeployConfigurations, greatly simplifying those. This is a squash of the wip/profile branch which has been on gerrit for a while, rebased to current master. Change-Id: I25956c8dd4d1962b2134bfaa8a8076ae3909460f Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -36,11 +36,12 @@
|
||||
#include "autotoolsproject.h"
|
||||
#include "autotoolsprojectconstants.h"
|
||||
#include "autotoolsbuildconfiguration.h"
|
||||
#include "autotoolstarget.h"
|
||||
|
||||
#include <projectexplorer/buildsteplist.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <projectexplorer/toolchain.h>
|
||||
#include <projectexplorer/gnumakeparser.h>
|
||||
#include <projectexplorer/profileinformation.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
@@ -65,8 +66,7 @@ const char MAKE_STEP_ADDITIONAL_ARGUMENTS_KEY[] = "AutotoolsProjectManager.MakeS
|
||||
//////////////////////////
|
||||
MakeStepFactory::MakeStepFactory(QObject *parent) :
|
||||
IBuildStepFactory(parent)
|
||||
{
|
||||
}
|
||||
{ setObjectName(QLatin1String("Autotools::MakeStepFactory")); }
|
||||
|
||||
QList<Core::Id> MakeStepFactory::availableCreationIds(BuildStepList *parent) const
|
||||
{
|
||||
@@ -87,9 +87,6 @@ bool MakeStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
|
||||
if (parent->target()->project()->id() != Core::Id(AUTOTOOLS_PROJECT_ID))
|
||||
return false;
|
||||
|
||||
if (parent->id() != Core::Id(BUILDSTEPS_BUILD))
|
||||
return false;
|
||||
|
||||
return Core::Id(MAKE_STEP_ID) == id;
|
||||
}
|
||||
|
||||
@@ -178,16 +175,18 @@ bool MakeStep::init()
|
||||
|
||||
setIgnoreReturnValue(m_clean);
|
||||
|
||||
ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(bc->target()->profile());
|
||||
|
||||
ProcessParameters *pp = processParameters();
|
||||
pp->setMacroExpander(bc->macroExpander());
|
||||
pp->setEnvironment(bc->environment());
|
||||
pp->setWorkingDirectory(bc->buildDirectory());
|
||||
pp->setCommand(bc->toolChain()->makeCommand());
|
||||
pp->setCommand(tc ? tc->makeCommand() : QLatin1String("make"));
|
||||
pp->setArguments(arguments);
|
||||
|
||||
setOutputParser(new GnuMakeParser());
|
||||
if (bc->autotoolsTarget()->autotoolsProject()->toolChain())
|
||||
appendOutputParser(bc->autotoolsTarget()->autotoolsProject()->toolChain()->outputParser());
|
||||
if (tc)
|
||||
appendOutputParser(tc->outputParser());
|
||||
outputParser()->setWorkingDirectory(pp->effectiveWorkingDirectory());
|
||||
|
||||
return AbstractProcessStep::init();
|
||||
@@ -291,7 +290,7 @@ QString MakeStepConfigWidget::summaryText() const
|
||||
void MakeStepConfigWidget::updateDetails()
|
||||
{
|
||||
AutotoolsBuildConfiguration *bc = m_makeStep->autotoolsBuildConfiguration();
|
||||
ToolChain *tc = bc->toolChain();
|
||||
ToolChain *tc = ProjectExplorer::ToolChainProfileInformation::toolChain(m_makeStep->target()->profile());
|
||||
|
||||
if (tc) {
|
||||
QString arguments = Utils::QtcProcess::joinArgs(m_makeStep->m_buildTargets);
|
||||
@@ -305,7 +304,7 @@ void MakeStepConfigWidget::updateDetails()
|
||||
param.setArguments(arguments);
|
||||
m_summaryText = param.summary(displayName());
|
||||
} else {
|
||||
m_summaryText = tr("<b>Unknown tool chain</b>");
|
||||
m_summaryText = tr("<b>No tool chain set up for this profile</b>");
|
||||
}
|
||||
|
||||
emit updateSummary();
|
||||
|
||||
Reference in New Issue
Block a user