From aa198b7e885c447651c652ed98f2e9604f65201b Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sat, 21 Sep 2019 23:45:56 +0300 Subject: [PATCH] Qmake: Show real effective make call on Make step Include custom Makefile. Change-Id: I4b3b4d4fb64eea97ab4630ff6909c7df67291ba5 Reviewed-by: Orgad Shaneh --- src/plugins/projectexplorer/makestep.cpp | 8 ++++++++ src/plugins/projectexplorer/makestep.h | 1 + src/plugins/qmakeprojectmanager/qmakemakestep.cpp | 8 ++++++++ src/plugins/qmakeprojectmanager/qmakemakestep.h | 1 + 4 files changed, 18 insertions(+) diff --git a/src/plugins/projectexplorer/makestep.cpp b/src/plugins/projectexplorer/makestep.cpp index 91cbfc43516..add3f56feee 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 9bde1c41a41..57482992ee1 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 ec318b63e63..e3d20491f5c 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(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 a1bd2b16493..a1552bfe3ce 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;