diff options
-rw-r--r-- | src/plugins/projectexplorer/makestep.cpp | 8 | ||||
-rw-r--r-- | src/plugins/projectexplorer/makestep.h | 1 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakemakestep.cpp | 8 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakemakestep.h | 1 |
4 files changed, 18 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/makestep.cpp b/src/plugins/projectexplorer/makestep.cpp index 91cbfc4351..add3f56fee 100644 --- a/src/plugins/projectexplorer/makestep.cpp +++ b/src/plugins/projectexplorer/makestep.cpp @@ -323,6 +323,11 @@ void MakeStep::setUserArguments(const QString &args) m_userArguments = args; } +QStringList MakeStep::autoArguments() const +{ + return {}; +} + FilePath MakeStep::makeCommand() const { return m_makeCommand; @@ -332,6 +337,7 @@ CommandLine MakeStep::effectiveMakeCommand() const { CommandLine cmd(m_makeCommand.isEmpty() ? defaultMakeCommand() : m_makeCommand); + cmd.addArgs(autoArguments()); cmd.addArgs(m_userArguments, CommandLine::Raw); cmd.addArgs(jobArguments()); cmd.addArgs(m_buildTargets); @@ -422,6 +428,8 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep) this, &MakeStepConfigWidget::updateDetails); connect(m_makeStep->buildConfiguration(), &BuildConfiguration::buildDirectoryChanged, this, &MakeStepConfigWidget::updateDetails); + connect(m_makeStep->project(), &Project::parsingFinished, + this, &MakeStepConfigWidget::updateDetails); Core::VariableChooser::addSupportForChildWidgets(this, m_makeStep->macroExpander()); } diff --git a/src/plugins/projectexplorer/makestep.h b/src/plugins/projectexplorer/makestep.h index 9bde1c41a4..57482992ee 100644 --- a/src/plugins/projectexplorer/makestep.h +++ b/src/plugins/projectexplorer/makestep.h @@ -83,6 +83,7 @@ public: protected: bool fromMap(const QVariantMap &map) override; + virtual QStringList autoArguments() const; private: QVariantMap toMap() const override; diff --git a/src/plugins/qmakeprojectmanager/qmakemakestep.cpp b/src/plugins/qmakeprojectmanager/qmakemakestep.cpp index ec318b63e6..e3d20491f5 100644 --- a/src/plugins/qmakeprojectmanager/qmakemakestep.cpp +++ b/src/plugins/qmakeprojectmanager/qmakemakestep.cpp @@ -212,6 +212,14 @@ void QmakeMakeStep::finish(bool success) MakeStep::finish(success); } +QStringList QmakeMakeStep::autoArguments() const +{ + const auto bc = static_cast<QmakeBuildConfiguration *>(buildConfiguration()); + if (bc && !bc->makefile().isEmpty()) + return {"-f", bc->makefile()}; + return {}; +} + /// // QmakeMakeStepFactory /// diff --git a/src/plugins/qmakeprojectmanager/qmakemakestep.h b/src/plugins/qmakeprojectmanager/qmakemakestep.h index a1bd2b1649..a1552bfe3c 100644 --- a/src/plugins/qmakeprojectmanager/qmakemakestep.h +++ b/src/plugins/qmakeprojectmanager/qmakemakestep.h @@ -53,6 +53,7 @@ private: void finish(bool success) override; bool init() override; void doRun() override; + QStringList autoArguments() const override; bool m_scriptTarget = false; QString m_makeFileToCheck; |