diff --git a/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp b/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp index a32191be83b..3d545a6e754 100644 --- a/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp +++ b/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp @@ -13,6 +13,7 @@ #include #include +#include using namespace ProjectExplorer; using namespace Utils; @@ -61,20 +62,24 @@ public: void doRun() override { - // Check whether we need to run autoreconf - const FilePath configure = project()->projectDirectory() / "configure"; - if (!configure.exists()) - m_runAutoreconf = true; + using namespace Tasking; - if (!m_runAutoreconf) { - emit addOutput(Tr::tr("Configuration unchanged, skipping autoreconf step."), - OutputFormat::NormalMessage); - emit finished(true); - return; - } + const auto onSetup = [this] { + // Check whether we need to run autoreconf + const FilePath configure = project()->projectDirectory() / "configure"; + if (!configure.exists()) + m_runAutoreconf = true; - m_runAutoreconf = false; - AbstractProcessStep::doRun(); + if (!m_runAutoreconf) { + emit addOutput(Tr::tr("Configuration unchanged, skipping autoreconf step."), + OutputFormat::NormalMessage); + return SetupResult::StopWithDone; + } + return SetupResult::Continue; + }; + const auto onDone = [this] { m_runAutoreconf = false; }; + + runTaskTree({onGroupSetup(onSetup), onGroupDone(onDone), defaultProcessTask()}); } private: