From ee052e66c884bb5573fe812707d794f916444ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 15 Feb 2013 12:24:22 +0100 Subject: [PATCH] Update feature paths on assignment to QMAKE_PLATFORM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of after parsing the makespecs, were we assumed QMAKE_PLATFORM had been set by the makespec and did an explicit update. Allows loading platform specific features from within a makespec after updating QMAKE_PLATFORM. Change-Id: I0eb3b7fb88ce48b00a384850c5d87223c06234d7 Reviewed-by: Tor Arne Vestbø (cherry picked from qtbase/4dd29248cd43ff730f7432b51a443b72fad3523d) --- src/shared/proparser/qmakeevaluator.cpp | 4 +++- src/shared/proparser/qmakeevaluator_p.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shared/proparser/qmakeevaluator.cpp b/src/shared/proparser/qmakeevaluator.cpp index b2ce9d0374f..a5a21c4b15f 100644 --- a/src/shared/proparser/qmakeevaluator.cpp +++ b/src/shared/proparser/qmakeevaluator.cpp @@ -114,6 +114,7 @@ void QMakeEvaluator::initStatics() statics.strforever = QLatin1String("forever"); statics.strhost_build = QLatin1String("host_build"); statics.strTEMPLATE = ProKey("TEMPLATE"); + statics.strQMAKE_PLATFORM = ProKey("QMAKE_PLATFORM"); #ifdef PROEVALUATOR_FULL statics.strREQUIRES = ProKey("REQUIRES"); #endif @@ -912,6 +913,8 @@ void QMakeEvaluator::visitProVariable( if (varName == statics.strTEMPLATE) setTemplate(); + else if (varName == statics.strQMAKE_PLATFORM) + updateFeaturePaths(); #ifdef PROEVALUATOR_FULL else if (varName == statics.strREQUIRES) checkRequirements(values(varName)); @@ -1202,7 +1205,6 @@ bool QMakeEvaluator::loadSpec() } if (!loadSpecInternal()) return false; - updateFeaturePaths(); // The spec extends the feature search path, so rebuild the cache. if (!m_conffile.isEmpty() && !evaluateFile(m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly)) { return false; diff --git a/src/shared/proparser/qmakeevaluator_p.h b/src/shared/proparser/qmakeevaluator_p.h index 49cced3927a..d17b4843124 100644 --- a/src/shared/proparser/qmakeevaluator_p.h +++ b/src/shared/proparser/qmakeevaluator_p.h @@ -77,6 +77,7 @@ struct QMakeStatics { QString strforever; QString strhost_build; ProKey strTEMPLATE; + ProKey strQMAKE_PLATFORM; #ifdef PROEVALUATOR_FULL ProKey strREQUIRES; #endif