From: Tor Arne Vestbø Date: Fri, 15 Feb 2013 11:24:22 +0000 (+0100) Subject: Update feature paths on assignment to QMAKE_PLATFORM X-Git-Tag: accepted/tizen/20131212.181521~101^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7676ab9cba4fe159f6f7679de8e9a23a8249fbd1;p=platform%2Fupstream%2Fqttools.git Update feature paths on assignment to QMAKE_PLATFORM 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) Reviewed-by: Joerg Bornemann --- diff --git a/src/linguist/shared/qmakeevaluator.cpp b/src/linguist/shared/qmakeevaluator.cpp index 7259e81..ce2a5d1 100644 --- a/src/linguist/shared/qmakeevaluator.cpp +++ b/src/linguist/shared/qmakeevaluator.cpp @@ -126,6 +126,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 @@ -924,6 +925,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)); @@ -1214,7 +1217,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/linguist/shared/qmakeevaluator_p.h b/src/linguist/shared/qmakeevaluator_p.h index 987fd68..025a913 100644 --- a/src/linguist/shared/qmakeevaluator_p.h +++ b/src/linguist/shared/qmakeevaluator_p.h @@ -89,6 +89,7 @@ struct QMakeStatics { QString strforever; QString strhost_build; ProKey strTEMPLATE; + ProKey strQMAKE_PLATFORM; #ifdef PROEVALUATOR_FULL ProKey strREQUIRES; #endif