make evaluation of spec+cache independent of build pass context
don't inject the build pass specific variables into the project even before evaluating the .spec file and the .qmake.cache. they are not supposed to base configuration on that - feature files should do that later. the immediate advantage of this is that base_vars is never manipulated upfront any more, which allows for cleaner setup paths. also, we can do more caching of the spec+cache contents. Change-Id: I19d7f8bec1fb7c3b54121e26794340b287055ebf Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
This commit is contained in:
parent
cd6e90c70a
commit
dce3821b8a
3
dist/changes-5.0.0
vendored
3
dist/changes-5.0.0
vendored
@ -200,7 +200,8 @@ information about a particular change.
|
|||||||
|
|
||||||
- qmake
|
- qmake
|
||||||
* Projects which explicitly set an empty TARGET are considered broken now.
|
* Projects which explicitly set an empty TARGET are considered broken now.
|
||||||
* several functions and built-in variables were modified to return normalized paths.
|
* The makespec and .qmake.cache do not see build pass specific variables any more.
|
||||||
|
* Several functions and built-in variables were modified to return normalized paths.
|
||||||
|
|
||||||
- QTextCodecPlugin has been removed since it is no longer used. All text codecs
|
- QTextCodecPlugin has been removed since it is no longer used. All text codecs
|
||||||
are now built into QtCore.
|
are now built into QtCore.
|
||||||
|
@ -243,13 +243,13 @@ MakefileGenerator
|
|||||||
basecfgs = project->values(build + ".CONFIG");
|
basecfgs = project->values(build + ".CONFIG");
|
||||||
basecfgs += build;
|
basecfgs += build;
|
||||||
basecfgs += "build_pass";
|
basecfgs += "build_pass";
|
||||||
basevars["CONFIG"] = basecfgs;
|
|
||||||
basevars["BUILD_PASS"] = QStringList(build);
|
basevars["BUILD_PASS"] = QStringList(build);
|
||||||
QStringList buildname = project->values(build + ".name");
|
QStringList buildname = project->values(build + ".name");
|
||||||
basevars["BUILD_NAME"] = (buildname.isEmpty() ? QStringList(build) : buildname);
|
basevars["BUILD_NAME"] = (buildname.isEmpty() ? QStringList(build) : buildname);
|
||||||
|
|
||||||
//create project
|
//create project
|
||||||
QMakeProject *build_proj = new QMakeProject(project->properties(), basevars);
|
QMakeProject *build_proj = new QMakeProject(project->properties());
|
||||||
|
build_proj->setExtraVars(basevars);
|
||||||
build_proj->setExtraConfigs(basecfgs);
|
build_proj->setExtraConfigs(basecfgs);
|
||||||
|
|
||||||
build_proj->read(project->projectFile());
|
build_proj->read(project->projectFile());
|
||||||
|
@ -1292,6 +1292,10 @@ QMakeProject::read(uchar cmd)
|
|||||||
|
|
||||||
vars = base_vars; // start with the base
|
vars = base_vars; // start with the base
|
||||||
|
|
||||||
|
for (QHash<QString, QStringList>::ConstIterator it = extra_vars.constBegin();
|
||||||
|
it != extra_vars.constEnd(); ++it)
|
||||||
|
vars.insert(it.key(), it.value());
|
||||||
|
|
||||||
if(cmd & ReadFeatures) {
|
if(cmd & ReadFeatures) {
|
||||||
debug_msg(1, "Processing default_pre: %s", vars["CONFIG"].join("::").toLatin1().constData());
|
debug_msg(1, "Processing default_pre: %s", vars["CONFIG"].join("::").toLatin1().constData());
|
||||||
doProjectInclude("default_pre", IncludeFlagFeature, vars);
|
doProjectInclude("default_pre", IncludeFlagFeature, vars);
|
||||||
|
@ -85,7 +85,7 @@ class QMakeProject
|
|||||||
QMakeProperty *prop;
|
QMakeProperty *prop;
|
||||||
void reset();
|
void reset();
|
||||||
QStringList extra_configs;
|
QStringList extra_configs;
|
||||||
QHash<QString, QStringList> vars, base_vars;
|
QHash<QString, QStringList> vars, base_vars, extra_vars;
|
||||||
bool parse(const QString &text, QHash<QString, QStringList> &place, int line_count=1);
|
bool parse(const QString &text, QHash<QString, QStringList> &place, int line_count=1);
|
||||||
|
|
||||||
enum IncludeStatus {
|
enum IncludeStatus {
|
||||||
@ -119,6 +119,7 @@ public:
|
|||||||
QMakeProject(QMakeProperty *p, const QHash<QString, QStringList> &nvars) { init(p, &nvars); }
|
QMakeProject(QMakeProperty *p, const QHash<QString, QStringList> &nvars) { init(p, &nvars); }
|
||||||
~QMakeProject();
|
~QMakeProject();
|
||||||
|
|
||||||
|
void setExtraVars(const QHash<QString, QStringList> &_vars) { extra_vars = _vars; }
|
||||||
void setExtraConfigs(const QStringList &_cfgs) { extra_configs = _cfgs; }
|
void setExtraConfigs(const QStringList &_cfgs) { extra_configs = _cfgs; }
|
||||||
|
|
||||||
enum { ReadProFile=0x01, ReadSetup=0x02, ReadFeatures=0x04, ReadAll=0xFF };
|
enum { ReadProFile=0x01, ReadSetup=0x02, ReadFeatures=0x04, ReadAll=0xFF };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user