summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-10-31 18:01:29 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-18 12:12:07 +0100
commit0e5e10808de28025b1c3e198ef3b7c83a64c9394 (patch)
treec5ba10cb92b6a265a62aeae8903b19397d0f627c
parent0bf84aa7873edd7bb411fabb94481b03d1501c68 (diff)
move setting of _QMAKE_{SUPER,CONF,CACHE}_ to a more logical location
there is no point in setting the variables already when peeking into the caches, as that is done in a separate evaluator anyway. it also makes no sense to have them set while loading the spec itself, as it's not permitted to do anything with the caches. so set them at the next convenient point, which is right before actually loading the caches. Change-Id: I3717ddf94353dc04e12c52e542f16ed27b578e14 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> (cherry picked from qtbase/0f68222e9ebdf42778d4bb84260268764eb55b30) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
-rw-r--r--src/linguist/shared/qmakeevaluator.cpp49
1 files changed, 25 insertions, 24 deletions
diff --git a/src/linguist/shared/qmakeevaluator.cpp b/src/linguist/shared/qmakeevaluator.cpp
index e5715fa5b..398536296 100644
--- a/src/linguist/shared/qmakeevaluator.cpp
+++ b/src/linguist/shared/qmakeevaluator.cpp
@@ -1193,23 +1193,18 @@ bool QMakeEvaluator::loadSpec()
QMakeEvaluator evaluator(m_option, m_parser, m_vfs, m_handler);
evaluator.m_sourceRoot = m_sourceRoot;
evaluator.m_buildRoot = m_buildRoot;
- if (!m_superfile.isEmpty()) {
- valuesRef(ProKey("_QMAKE_SUPER_CACHE_")) << ProString(m_superfile);
- if (evaluator.evaluateFile(
- m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue)
- return false;
+
+ if (!m_superfile.isEmpty() && evaluator.evaluateFile(
+ m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly|LoadHidden) != ReturnTrue) {
+ return false;
}
- if (!m_conffile.isEmpty()) {
- valuesRef(ProKey("_QMAKE_CONF_")) << ProString(m_conffile);
- if (evaluator.evaluateFile(
- m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue)
- return false;
+ if (!m_conffile.isEmpty() && evaluator.evaluateFile(
+ m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly|LoadHidden) != ReturnTrue) {
+ return false;
}
- if (!m_cachefile.isEmpty()) {
- valuesRef(ProKey("_QMAKE_CACHE_")) << ProString(m_cachefile);
- if (evaluator.evaluateFile(
- m_cachefile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue)
- return false;
+ if (!m_cachefile.isEmpty() && evaluator.evaluateFile(
+ m_cachefile, QMakeHandler::EvalConfigFile, LoadProOnly|LoadHidden) != ReturnTrue) {
+ return false;
}
if (qmakespec.isEmpty()) {
if (!m_hostBuild)
@@ -1243,19 +1238,25 @@ bool QMakeEvaluator::loadSpec()
cool:
m_qmakespec = QDir::cleanPath(qmakespec);
- if (!m_superfile.isEmpty()
- && evaluateFile(m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly|LoadHidden) != ReturnTrue) {
- return false;
+ if (!m_superfile.isEmpty()) {
+ valuesRef(ProKey("_QMAKE_SUPER_CACHE_")) << ProString(m_superfile);
+ if (evaluateFile(
+ m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly|LoadHidden) != ReturnTrue)
+ return false;
}
if (!loadSpecInternal())
return false;
- if (!m_conffile.isEmpty()
- && evaluateFile(m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue) {
- return false;
+ if (!m_conffile.isEmpty()) {
+ valuesRef(ProKey("_QMAKE_CONF_")) << ProString(m_conffile);
+ if (evaluateFile(
+ m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue)
+ return false;
}
- if (!m_cachefile.isEmpty()
- && evaluateFile(m_cachefile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue) {
- return false;
+ if (!m_cachefile.isEmpty()) {
+ valuesRef(ProKey("_QMAKE_CACHE_")) << ProString(m_cachefile);
+ if (evaluateFile(
+ m_cachefile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue)
+ return false;
}
return true;
}