aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/autotoolsprojectmanager/makefileparser.h
blob: b7773aa7b8791d432f92f024f4bc8f54b7ae4b5e (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
// Copyright (C) 2016 Openismus GmbH.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include <projectexplorer/projectmacro.h>

#include <QFuture>
#include <QStringList>

namespace AutotoolsProjectManager::Internal {

class MakefileParserOutputData final
{
public:
    // File name of the executable.
    QString m_executable;
    // List of sources that are set for the _SOURCES target.
    // Sources in sub directorties contain the sub directory as prefix.
    QStringList m_sources;
    // List of Makefile.am files from the current directory and all sub directories.
    // The values for sub directories contain the sub directory as prefix.
    QStringList m_makefiles;
    // List of include paths. Should be invoked, after the signal finished() has been emitted.
    QStringList m_includePaths;
    // Concatenated normalized defines, just like in code:
    // #define X12_DEPRECATED __attribute__((deprecated))
    // #define X12_HAS_DEPRECATED
    ProjectExplorer::Macros m_macros;
    // List of compiler flags for C.
    QStringList m_cflags;
    // List of compiler flags for C++.
    QStringList m_cxxflags;
};

std::optional<MakefileParserOutputData> parseMakefile(const QString &makefile,
                                                      const QFuture<void> &future);

} // AutotoolsProjectManager::Internal