1 /****************************************************************************
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (qt-info@nokia.com)
7 ** This file is part of the tools applications of the Qt Toolkit.
9 ** $QT_BEGIN_LICENSE:LGPL$
11 ** Licensees holding valid Qt Commercial licenses may use this file in
12 ** accordance with the Qt Commercial License Agreement provided with the
13 ** Software or, alternatively, in accordance with the terms contained in
14 ** a written agreement between you and Nokia.
16 ** GNU Lesser General Public License Usage
17 ** Alternatively, this file may be used under the terms of the GNU Lesser
18 ** General Public License version 2.1 as published by the Free Software
19 ** Foundation and appearing in the file LICENSE.LGPL included in the
20 ** packaging of this file. Please review the following information to
21 ** ensure the GNU Lesser General Public License version 2.1 requirements
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 ** In addition, as a special exception, Nokia gives you certain additional
25 ** rights. These rights are described in the Nokia Qt LGPL Exception
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 ** GNU General Public License Usage
29 ** Alternatively, this file may be used under the terms of the GNU
30 ** General Public License version 3.0 as published by the Free Software
31 ** Foundation and appearing in the file LICENSE.GPL included in the
32 ** packaging of this file. Please review the following information to
33 ** ensure the GNU General Public License version 3.0 requirements will be
34 ** met: http://www.gnu.org/copyleft/gpl.html.
36 ** If you have questions regarding the use of this file, please contact
37 ** Nokia at qt-info@nokia.com.
40 ****************************************************************************/
44 #include <qstringlist.h>
46 #include <qtextstream.h>
56 Configure( int& argc
, char** argv
);
65 QString
defaultTo(const QString
&option
);
66 bool checkAvailability(const QString
&part
);
68 bool verifyConfiguration();
70 void generateOutputVars();
72 void generateHeaders();
73 void generateBuildKey();
74 void generateCachefile();
77 void buildHostTools();
79 void generateMakefiles();
80 void appendMakeItem(int inList
, const QString
&item
);
82 void generateConfigfiles();
85 void findProjects( const QString
& dirName
);
86 QString
firstLicensePath();
89 bool showLicense(QString licenseFile
);
93 QString
addDefine(QString def
);
101 ProjectType
projectType( const QString
& proFileName
);
105 // Our variable dictionaries
106 QMap
<QString
,QString
> dictionary
;
107 QStringList licensedModules
;
108 QStringList allSqlDrivers
;
109 QStringList allConfigs
;
110 QStringList disabledModules
;
111 QStringList enabledModules
;
113 QStringList disabledBuildParts
;
114 // QStringList sqlDrivers;
115 QStringList configCmdLine
;
116 QStringList qmakeConfig
;
117 QStringList qtConfig
;
119 QStringList qmakeSql
;
120 QStringList qmakeSqlPlugins
;
122 QStringList qmakeStyles
;
123 QStringList qmakeStylePlugins
;
125 QStringList qmakeFormatPlugins
;
127 QStringList qmakeVars
;
128 QStringList qmakeDefines
;
129 // makeList[0] for qt and qtmain
130 // makeList[1] for subdirs and libs
131 // makeList[2] for the rest
132 QList
<MakeItem
*> makeList
[3];
133 QStringList qmakeIncludes
;
134 QStringList qmakeLibs
;
137 QMap
<QString
,QString
> licenseInfo
;
140 QTextStream outStream
;
141 QString sourcePath
, buildPath
;
142 QDir sourceDir
, buildDir
;
144 // Variables for usage output
149 bool useUnixSeparators
;
150 QString
fixSeparators(QString somePath
);
151 bool filesDiffer(const QString
&file1
, const QString
&file2
);
153 static bool findFile(const QString
&fileName
);
154 static bool findFileInPaths(const QString
&fileName
, const QStringList
&paths
);
156 void reloadCmdLine();
160 void desc(const char *description
, int startingAt
= 0, int wrapIndent
= 0);
161 void desc(const char *option
, const char *description
, bool skipIndent
= false, char fillChar
= '.');
162 void desc(const char *mark_option
, const char *mark
, const char *option
, const char *description
, char fillChar
= '.');
163 void applySpecSpecifics();
164 static QString
locateFile(const QString
&fileName
);
165 static QString
locateFileInPaths(const QString
&fileName
, const QStringList
&paths
);
171 MakeItem( const QString
&d
, const QString
&p
, const QString
&t
, Configure::ProjectType qt
)
181 Configure::ProjectType qmakeTemplate
;