summaryrefslogtreecommitdiff
path: root/qmake/option.h
Unidiff
Diffstat (limited to 'qmake/option.h') (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/option.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/qmake/option.h b/qmake/option.h
index 9a5a85a..8bd348e 100644
--- a/qmake/option.h
+++ b/qmake/option.h
@@ -1,122 +1,125 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2** $Id$
3** 3**
4** Definition of ________ class. 4** Definition of ________ class.
5** 5**
6** Created : 970521 6** Created : 970521
7** 7**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
9** 9**
10** This file is part of the network module of the Qt GUI Toolkit. 10** This file is part of the network module of the Qt GUI Toolkit.
11** 11**
12** This file may be distributed under the terms of the Q Public License 12** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file. 14** LICENSE.QPL included in the packaging of this file.
15** 15**
16** This file may be distributed and/or modified under the terms of the 16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software 17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the 18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file. 19** packaging of this file.
20** 20**
21** Licensees holding valid Qt Enterprise Edition licenses may use this 21** Licensees holding valid Qt Enterprise Edition licenses may use this
22** file in accordance with the Qt Commercial License Agreement provided 22** file in accordance with the Qt Commercial License Agreement provided
23** with the Software. 23** with the Software.
24** 24**
25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27** 27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for 28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements. 29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information. 30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information. 31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32** 32**
33** Contact info@trolltech.com if any conditions of this licensing are 33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you. 34** not clear to you.
35** 35**
36**********************************************************************/ 36**********************************************************************/
37#ifndef __OPTION_H__ 37#ifndef __OPTION_H__
38#define __OPTION_H__ 38#define __OPTION_H__
39 39
40#include "project.h" 40#include "project.h"
41#include <qstring.h> 41#include <qstring.h>
42#include <qstringlist.h> 42#include <qstringlist.h>
43#include <qfile.h> 43#include <qfile.h>
44 44
45#define QMAKE_VERSION_MAJOR 1 45#define QMAKE_VERSION_MAJOR 1
46#define QMAKE_VERSION_MINOR 4 46#define QMAKE_VERSION_MINOR 5
47#define QMAKE_VERSION_PATCH 0 47#define QMAKE_VERSION_PATCH 0
48const char *qmake_version(); 48const char *qmake_version();
49 49
50void fixEnvVariables(QString &x); 50void fixEnvVariables(QString &x);
51void debug_msg(int level, const char *fmt, ...); 51void debug_msg(int level, const char *fmt, ...);
52enum QMakeWarn { 52enum QMakeWarn {
53 WarnNone = 0x00, 53 WarnNone = 0x00,
54 WarnParser = 0x01, 54 WarnParser = 0x01,
55 WarnLogic = 0x02, 55 WarnLogic = 0x02,
56 WarnAll = 0xFF 56 WarnAll = 0xFF
57}; 57};
58void warn_msg(QMakeWarn t, const char *fmt, ...); 58void warn_msg(QMakeWarn t, const char *fmt, ...);
59 59
60struct Option 60struct Option
61{ 61{
62 //simply global convenience 62 //simply global convenience
63 static QString prf_ext; 63 static QString prf_ext;
64 static QString prl_ext; 64 static QString prl_ext;
65 static QString ui_ext; 65 static QString ui_ext;
66 static QStringList h_ext; 66 static QStringList h_ext;
67 static QStringList cpp_ext; 67 static QStringList cpp_ext;
68 static QString moc_ext; 68 static QString moc_ext;
69 static QString obj_ext; 69 static QString obj_ext;
70 static QString lex_ext; 70 static QString lex_ext;
71 static QString yacc_ext; 71 static QString yacc_ext;
72 static QString moc_mod; 72 static QString moc_mod;
73 static QString lex_mod; 73 static QString lex_mod;
74 static QString yacc_mod; 74 static QString yacc_mod;
75 static QString dir_sep; 75 static QString dir_sep;
76 //both of these must be called.. 76 //both of these must be called..
77 static bool parseCommandLine(int argc, char **argv); //parse cmdline 77 static bool parseCommandLine(int argc, char **argv); //parse cmdline
78 static bool postProcessProject(QMakeProject *); 78 static bool postProcessProject(QMakeProject *);
79 79
80 //and convenience functions 80 //and convenience functions
81 static QString fixPathToLocalOS(const QString& in, bool fix_env=TRUE, bool canonical=TRUE); 81 static QString fixPathToLocalOS(const QString& in, bool fix_env=TRUE, bool canonical=TRUE);
82 static QString fixPathToTargetOS(const QString& in, bool fix_env=TRUE, bool canonical=TRUE); 82 static QString fixPathToTargetOS(const QString& in, bool fix_env=TRUE, bool canonical=TRUE);
83 83
84 //global qmake mode, can only be in one mode per invocation! 84 //global qmake mode, can only be in one mode per invocation!
85 enum QMAKE_MODE { QMAKE_GENERATE_NOTHING, QMAKE_GENERATE_PROJECT, QMAKE_GENERATE_MAKEFILE, 85 enum QMAKE_MODE { QMAKE_GENERATE_NOTHING, QMAKE_GENERATE_PROJECT, QMAKE_GENERATE_MAKEFILE,
86 QMAKE_GENERATE_PRL }; 86 QMAKE_GENERATE_PRL };
87 static QMAKE_MODE qmake_mode; 87 static QMAKE_MODE qmake_mode;
88 88
89 //all modes 89 //all modes
90 static QFile output; 90 static QFile output;
91 static QString output_dir; 91 static QString output_dir;
92 static int debug_level; 92 static int debug_level;
93 static int warn_level; 93 static int warn_level;
94 static QStringList before_user_vars, after_user_vars; 94 static QStringList before_user_vars, after_user_vars;
95 enum TARG_MODE { TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE, TARG_MAC9_MODE, TARG_QNX6_MODE }; 95 enum TARG_MODE { TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE, TARG_MAC9_MODE, TARG_QNX6_MODE };
96 static TARG_MODE target_mode; 96 static TARG_MODE target_mode;
97 static QString user_template, user_template_prefix; 97 static QString user_template, user_template_prefix;
98 98
99 //QMAKE_GENERATE_PROJECT options 99 //QMAKE_GENERATE_PROJECT options
100 struct projfile { 100 struct projfile {
101 static bool do_pwd; 101 static bool do_pwd;
102 static bool do_recursive; 102 static bool do_recursive;
103 static QStringList project_dirs; 103 static QStringList project_dirs;
104 }; 104 };
105 105
106 //QMAKE_GENERATE_MAKEFILE options 106 //QMAKE_GENERATE_MAKEFILE options
107 struct mkfile { 107 struct mkfile {
108 static QString qmakespec; 108 static QString qmakespec;
109 static bool do_cache; 109 static bool do_cache;
110 static bool do_deps; 110 static bool do_deps;
111 static bool do_mocs; 111 static bool do_mocs;
112 static bool do_dep_heuristics; 112 static bool do_dep_heuristics;
113 static bool do_preprocess; 113 static bool do_preprocess;
114 static QString cachefile; 114 static QString cachefile;
115 static int cachefile_depth; 115 static int cachefile_depth;
116 static QStringList project_files; 116 static QStringList project_files;
117 static QString qmakespec_commandline; 117 static QString qmakespec_commandline;
118 }; 118 };
119
120private:
121 static bool internalParseCommandLine(int, char **, int=0);
119}; 122};
120 123
121 124
122#endif /* __OPTION_H__ */ 125#endif /* __OPTION_H__ */