00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef __OPTION_H__
00037 #define __OPTION_H__
00038
00039 #include "project.h"
00040 #include <qstring.h>
00041 #include <qstringlist.h>
00042 #include <qfile.h>
00043
00044 #define QMAKE_VERSION_MAJOR 1
00045 #define QMAKE_VERSION_MINOR 7
00046 #define QMAKE_VERSION_PATCH 0
00047 const char *qmake_version();
00048
00049 void fixEnvVariables(QString &x);
00050 void debug_msg(int level, const char *fmt, ...);
00051 enum QMakeWarn {
00052 WarnNone = 0x00,
00053 WarnParser = 0x01,
00054 WarnLogic = 0x02,
00055 WarnAll = 0xFF
00056 };
00057 void warn_msg(QMakeWarn t, const char *fmt, ...);
00058
00059 struct Option
00060 {
00061
00062 static QString libtool_ext;
00063 static QString pkgcfg_ext;
00064 static QString prf_ext;
00065 static QString prl_ext;
00066 static QString ui_ext;
00067 static QStringList h_ext;
00068 static QStringList cpp_ext;
00069 static QString h_moc_ext;
00070 static QString cpp_moc_ext;
00071 static QString obj_ext;
00072 static QString lex_ext;
00073 static QString yacc_ext;
00074 static QString h_moc_mod;
00075 static QString cpp_moc_mod;
00076 static QString lex_mod;
00077 static QString yacc_mod;
00078 static QString dir_sep;
00079
00080 static bool parseCommandLine(int argc, char **argv);
00081 static bool postProcessProject(QMakeProject *);
00082
00083
00084 static QString fixPathToLocalOS(const QString& in, bool fix_env=TRUE, bool canonical=TRUE);
00085 static QString fixPathToTargetOS(const QString& in, bool fix_env=TRUE, bool canonical=TRUE);
00086
00087
00088 enum QMAKE_MODE { QMAKE_GENERATE_NOTHING, QMAKE_GENERATE_PROJECT, QMAKE_GENERATE_MAKEFILE,
00089 QMAKE_GENERATE_PRL, QMAKE_SET_PROPERTY, QMAKE_QUERY_PROPERTY };
00090 static QMAKE_MODE qmake_mode;
00091
00092
00093 static QFile output;
00094 static QString output_dir;
00095 static int debug_level;
00096 static int warn_level;
00097 static QStringList before_user_vars, after_user_vars;
00098 enum TARG_MODE { TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE, TARG_MAC9_MODE, TARG_QNX6_MODE };
00099 static TARG_MODE target_mode;
00100 static QString user_template, user_template_prefix;
00101
00102
00103
00104 struct prop {
00105 static QStringList properties;
00106 };
00107
00108
00109 struct projfile {
00110 static bool do_pwd;
00111 static bool do_recursive;
00112 static QStringList project_dirs;
00113 };
00114
00115
00116 struct mkfile {
00117 static QString qmakespec;
00118 static bool do_cache;
00119 static bool do_deps;
00120 static bool do_mocs;
00121 static bool do_dep_heuristics;
00122 static bool do_preprocess;
00123 static QString cachefile;
00124 static int cachefile_depth;
00125 static QStringList project_files;
00126 static QString qmakespec_commandline;
00127 };
00128
00129 private:
00130 static int internalParseCommandLine(int, char **, int=0);
00131 };
00132
00133
00134 #endif