diff options
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/main.cpp | 6 | ||||
-rw-r--r-- | qmake/option.cpp | 1 | ||||
-rw-r--r-- | qmake/project.cpp | 29 | ||||
-rw-r--r-- | qmake/project.h | 2 |
4 files changed, 23 insertions, 15 deletions
diff --git a/qmake/main.cpp b/qmake/main.cpp index 45672c67ee..835849c652 100644 --- a/qmake/main.cpp +++ b/qmake/main.cpp @@ -173,8 +173,10 @@ int runQMake(int argc, char **argv) exit_val = 3; continue; } - if(Option::mkfile::do_preprocess) //no need to create makefile - continue; + if (Option::mkfile::do_preprocess) { + project.dump(); + continue; //no need to create makefile + } } bool success = true; diff --git a/qmake/option.cpp b/qmake/option.cpp index 7d6148ce0a..91ff4050d1 100644 --- a/qmake/option.cpp +++ b/qmake/option.cpp @@ -306,7 +306,6 @@ Option::parseCommandLine(int argc, char **argv, int skip) } else if(opt == "nodependheuristics") { Option::mkfile::do_dep_heuristics = false; } else if(opt == "E") { - fprintf(stderr, "-E is deprecated. Use -d instead.\n"); Option::mkfile::do_preprocess = true; } else if(opt == "cache") { Option::mkfile::cachefile = argv[++x]; diff --git a/qmake/project.cpp b/qmake/project.cpp index 80e95f392a..c2558cccf6 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -1128,14 +1128,6 @@ QMakeProject::parse(const QString &t, QHash<QString, QStringList> &place, int nu doVariableReplace(var, place); var = varMap(var); //backwards compatibility - if(!var.isEmpty() && Option::mkfile::do_preprocess) { - static QString last_file("*none*"); - if(parser.file != last_file) { - fprintf(stdout, "#file %s:%d\n", parser.file.toLatin1().constData(), parser.line_no); - last_file = parser.file; - } - fprintf(stdout, "%s %s %s\n", var.toLatin1().constData(), op.toLatin1().constData(), vals.toLatin1().constData()); - } if(vals.contains('=') && numLines > 1) warn_msg(WarnParser, "Possible accidental line continuation: {%s} at %s:%d", @@ -1850,10 +1842,6 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QHash<QString, QString } else if (!QFile::exists(file)) { return IncludeNoExist; } - if(Option::mkfile::do_preprocess) //nice to see this first.. - fprintf(stderr, "#switching file %s(%s) - %s:%d\n", (flags & IncludeFlagFeature) ? "load" : "include", - file.toLatin1().constData(), - parser.file.toLatin1().constData(), parser.line_no); debug_msg(1, "Project Parser: %s'ing file %s.", (flags & IncludeFlagFeature) ? "load" : "include", file.toLatin1().constData()); @@ -3781,4 +3769,21 @@ bool QMakeProject::isEmpty(const QString &v) const return it == vars.constEnd() || it->isEmpty(); } +void +QMakeProject::dump() const +{ + QStringList out; + for (QHash<QString, QStringList>::ConstIterator it = vars.begin(); it != vars.end(); ++it) { + if (!it.key().startsWith('.')) { + QString str = it.key() + " ="; + foreach (const QString &v, it.value()) + str += ' ' + quoteValue(v); + out << str; + } + } + out.sort(); + foreach (const QString &v, out) + puts(qPrintable(v)); +} + QT_END_NAMESPACE diff --git a/qmake/project.h b/qmake/project.h index 171016e264..57ea023acd 100644 --- a/qmake/project.h +++ b/qmake/project.h @@ -173,6 +173,8 @@ public: const QHash<QString, QStringList> &variables() const { return vars; } QHash<QString, QStringList> &variables() { return vars; } + void dump() const; + bool isRecursive() const { return recursive; } bool isHostBuild() const { return host_build; } |