1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 |
3 | |
4 | #ifndef PBUILDER_PBX_H |
5 | #define PBUILDER_PBX_H |
6 | |
7 | #include "unixmake.h" |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | class ProjectBuilderMakefileGenerator : public UnixMakefileGenerator |
12 | { |
13 | bool writingUnixMakefileGenerator; |
14 | mutable QString pbx_dir; |
15 | int pbuilderVersion() const; |
16 | bool writeSubDirs(QTextStream &); |
17 | bool writeMakeParts(QTextStream &); |
18 | bool writeMakefile(QTextStream &) override; |
19 | bool replaceLibrarySuffix(const QString &lib_file, const ProString &opt, QString &name, |
20 | QString &library); |
21 | |
22 | QString pbxbuild(); |
23 | QHash<QString, QString> keys; |
24 | QString keyFor(const QString &file); |
25 | QString findProgram(const ProString &prog); |
26 | QString fixForOutput(const QString &file); |
27 | ProStringList fixListForOutput(const char *where); |
28 | ProStringList fixListForOutput(const ProStringList &list); |
29 | int reftypeForFile(const QString &where); |
30 | QString projectSuffix() const; |
31 | enum { SettingsAsList=0x01, SettingsNoQuote=0x02 }; |
32 | inline QString writeSettings(const QString &var, const char *val, int flags=0, int indent_level=0) |
33 | { return writeSettings(var, val: ProString(val), flags, indent_level); } |
34 | inline QString writeSettings(const QString &var, const ProString &val, int flags=0, int indent_level=0) |
35 | { return writeSettings(var, vals: ProStringList(val), flags, indent_level); } |
36 | QString writeSettings(const QString &var, const ProStringList &vals, int flags=0, int indent_level=0); |
37 | |
38 | public: |
39 | bool supportsMetaBuild() override { return false; } |
40 | bool openOutput(QFile &, const QString &) const override; |
41 | protected: |
42 | bool () const override { return false; } |
43 | bool doDepends() const override { return writingUnixMakefileGenerator && UnixMakefileGenerator::doDepends(); } |
44 | bool inhibitMakeDirOutPath(const ProKey &path) const override; |
45 | }; |
46 | QT_END_NAMESPACE |
47 | |
48 | #endif // PBUILDER_PBX_H |
49 | |