aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/autotoolsprojectmanager/makestep.cpp
blob: dba3e01825a39f4d1d8761e46fea9775a62f13c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright (C) 2016 Openismus GmbH.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#include "makestep.h"
#include "autotoolsprojectconstants.h"

#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/projectexplorerconstants.h>

using namespace AutotoolsProjectManager::Constants;

namespace AutotoolsProjectManager {
namespace Internal {

// MakeStep

class MakeStep : public ProjectExplorer::MakeStep
{
public:
    MakeStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id);
};

MakeStep::MakeStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id)
    : ProjectExplorer::MakeStep(bsl, id)
{
    setAvailableBuildTargets({"all", "clean"});
    if (bsl->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN) {
        setSelectedBuildTarget("clean");
        setIgnoreReturnValue(true);
    } else {
        setSelectedBuildTarget("all");
    }
}

// MakeStepFactory

MakeStepFactory::MakeStepFactory()
{
    registerStep<MakeStep>(MAKE_STEP_ID);
    setDisplayName(ProjectExplorer::MakeStep::defaultDisplayName());
    setSupportedProjectType(AUTOTOOLS_PROJECT_ID);
}

} // Internal
} // AutotoolsProjectManager