diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-09-05 18:29:19 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-11 00:13:01 +0200 |
commit | 0e78e5080262b8fa7a86f7cd0c8716839db048f6 (patch) | |
tree | 83ca3f608a6c9a359ba783d496ffdbc9ef7a6073 /qmake/main.cpp | |
parent | ed7594db5db7b28ce4c4646624de97b52fbf16d5 (diff) | |
download | qtbase-0e78e5080262b8fa7a86f7cd0c8716839db048f6.tar.gz qtbase-0e78e5080262b8fa7a86f7cd0c8716839db048f6.tar.bz2 qtbase-0e78e5080262b8fa7a86f7cd0c8716839db048f6.zip |
port qmake to qt creator's qmake language evaluator
this is a monster commit which does the following things:
- import the evaluator as-is from qt creator into qmake/library/
- integrate it into qmake's makefiles
- overwrite proitems.h with actual special types
- remove the parts of Option which are redundant with QMakeGlobals
- make QMakeProperty a singleton owned by Option::globals. the dynamic
handling so far made no sense.
- make QMakeProject a subclass of QMakeEvaluator, with relatively few
extensions
the changes to existing qmake code outside project.* and option.* are
minor. implementing the changes gradually would mean changing a lot of
code which will be just replaced in the next commit, so i'm not wasting
my time on it.
Change-Id: I9746650423b8c5b3fbd8c3979a73228982a46195
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'qmake/main.cpp')
-rw-r--r-- | qmake/main.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/qmake/main.cpp b/qmake/main.cpp index 91c8146c08..59e6f6794d 100644 --- a/qmake/main.cpp +++ b/qmake/main.cpp @@ -85,6 +85,9 @@ int runQMake(int argc, char **argv) // This is particularly important for things like QtCreator and scripted builds. setvbuf(stdout, (char *)NULL, _IONBF, 0); + QMakeGlobals globals; + Option::globals = &globals; + // parse command line int ret = Option::init(argc, argv); if(ret != Option::QMAKE_CMDLINE_SUCCESS) { @@ -125,8 +128,14 @@ int runQMake(int argc, char **argv) Option::qmake_mode == Option::QMAKE_SET_PROPERTY || Option::qmake_mode == Option::QMAKE_UNSET_PROPERTY) return prop.exec() ? 0 : 101; + globals.setQMakeProperty(&prop); + + ProFileCache proFileCache; + Option::proFileCache = &proFileCache; + QMakeParser parser(&proFileCache, &Option::evalHandler); + Option::parser = &parser; - QMakeProject project(&prop); + QMakeProject project; int exit_val = 0; QStringList files; if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT) |