Debian Codegraph @

qmake/library/qmakeevaluator_p.h

raw
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 QMAKEEVALUATOR_P_H
5 #define QMAKEEVALUATOR_P_H
6
7 #include "proitems.h"
8
9 #define debugMsg if (!m_debugLevel) {} else debugMsgInternal
10 #define traceMsg if (!m_debugLevel) {} else traceMsgInternal
11 #ifdef PROEVALUATOR_DEBUG
12 # define dbgBool(b) (b ? "true" : "false")
13 # define dbgReturn(r) \
14 (r == ReturnError ? "error" : \
15 r == ReturnBreak ? "break" : \
16 r == ReturnNext ? "next" : \
17 r == ReturnReturn ? "return" : \
18 "<invalid>")
19 # define dbgKey(s) s.toString().toQStringView().toLocal8Bit().constData()
20 # define dbgStr(s) qPrintable(formatValue(s, true))
21 # define dbgStrList(s) qPrintable(formatValueList(s))
22 # define dbgSepStrList(s) qPrintable(formatValueList(s, true))
23 # define dbgStrListList(s) qPrintable(formatValueListList(s))
24 # define dbgQStr(s) dbgStr(ProString(s))
25 #else
26 # define dbgBool(b) 0
27 # define dbgReturn(r) 0
28 # define dbgKey(s) 0
29 # define dbgStr(s) 0
30 # define dbgStrList(s) 0
31 # define dbgSepStrList(s) 0
32 # define dbgStrListList(s) 0
33 # define dbgQStr(s) 0
34 #endif
35
36 QT_BEGIN_NAMESPACE
37
38 namespace QMakeInternal {
39
40 struct QMakeBuiltinInit
41 {
42 const char *name;
43 int func;
44 enum { VarArgs = 1000 };
45 int min_args, max_args;
46 const char *args;
47 };
48
49 struct QMakeBuiltin
50 {
51 QMakeBuiltin(const QMakeBuiltinInit &data);
52 QString usage;
53 int index, minArgs, maxArgs;
54 };
55
56 struct QMakeStatics {
57 QString field_sep;
58 QString strtrue;
59 QString strfalse;
60 ProKey strCONFIG;
61 ProKey strARGS;
62 ProKey strARGC;
63 QString strDot;
64 QString strDotDot;
65 QString strever;
66 QString strforever;
67 QString strhost_build;
68 ProKey strTEMPLATE;
69 ProKey strQMAKE_PLATFORM;
70 ProKey strQMAKE_DIR_SEP;
71 ProKey strQMAKESPEC;
72 #ifdef PROEVALUATOR_FULL
73 ProKey strREQUIRES;
74 #endif
75 QHash<ProKey, QMakeBuiltin> expands;
76 QHash<ProKey, QMakeBuiltin> functions;
77 QHash<ProKey, ProKey> varMap;
78 ProStringList fakeValue;
79 };
80
81 extern QMakeStatics statics;
82
83 }
84
85 Q_DECLARE_TYPEINFO(QMakeInternal::QMakeBuiltin, Q_RELOCATABLE_TYPE);
86
87 QT_END_NAMESPACE
88
89 #endif // QMAKEEVALUATOR_P_H