Eneboo - Documentación para desarrolladores
src/qt/qmake/option.h
Ir a la documentación de este archivo.
00001 /****************************************************************************
00002 ** $Id: qt/option.h   3.3.8   edited Jan 11 14:37 $
00003 **
00004 ** Definition of Option class.
00005 **
00006 ** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
00007 **
00008 ** This file is part of qmake.
00009 **
00010 ** This file may be distributed under the terms of the Q Public License
00011 ** as defined by Trolltech ASA of Norway and appearing in the file
00012 ** LICENSE.QPL included in the packaging of this file.
00013 **
00014 ** This file may be distributed and/or modified under the terms of the
00015 ** GNU General Public License version 2 as published by the Free Software
00016 ** Foundation and appearing in the file LICENSE.GPL included in the
00017 ** packaging of this file.
00018 **
00019 ** Licensees holding valid Qt Enterprise Edition licenses may use this
00020 ** file in accordance with the Qt Commercial License Agreement provided
00021 ** with the Software.
00022 **
00023 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00024 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00025 **
00026 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00027 **   information about Qt Commercial License Agreements.
00028 ** See http://www.trolltech.com/qpl/ for QPL licensing information.
00029 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00030 **
00031 ** Contact info@trolltech.com if any conditions of this licensing are
00032 ** not clear to you.
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     //simply global convenience
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     //both of these must be called..
00080     static bool parseCommandLine(int argc, char **argv); //parse cmdline
00081     static bool postProcessProject(QMakeProject *); 
00082 
00083     //and convenience functions    
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     //global qmake mode, can only be in one mode per invocation!
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     //all modes
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     //QMAKE_*_PROPERTY options
00104     struct prop {
00105         static QStringList properties;
00106     };
00107 
00108     //QMAKE_GENERATE_PROJECT options
00109     struct projfile {
00110         static bool do_pwd;
00111         static bool do_recursive;
00112         static QStringList project_dirs;
00113     };
00114 
00115     //QMAKE_GENERATE_MAKEFILE options
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 /* __OPTION_H__ */
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'