diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-10-11 15:48:44 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-30 16:53:45 +0100 |
commit | 7385d7d366e6423ad574f6641277af6812a51051 (patch) | |
tree | 800a41a34de43618cdf1e07b8cb0c30e826fe63a | |
parent | 7eee2f66ef9e438565b9056e1f5ad73a62f15468 (diff) |
qmake: Update internal mkspec on changes to QMAKESPEC
Allows the macx-xcode mkspec to be a wrapper around other mkspecs.
Since QMAKESPEC can now be set in the spec, we have to ensure not
to append to QMAKESPEC.
Change-Id: Idf33ff38147f14c488f14b426c02d9a739fdaecf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
(cherry picked from qtbase/a9bad65b091d15b0446fa141e0a69ebb94b38b70)
-rw-r--r-- | src/linguist/shared/qmakeevaluator.cpp | 9 | ||||
-rw-r--r-- | src/linguist/shared/qmakeevaluator_p.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/linguist/shared/qmakeevaluator.cpp b/src/linguist/shared/qmakeevaluator.cpp index b589c176a..4401898dd 100644 --- a/src/linguist/shared/qmakeevaluator.cpp +++ b/src/linguist/shared/qmakeevaluator.cpp @@ -129,6 +129,7 @@ void QMakeEvaluator::initStatics() statics.strhost_build = QLatin1String("host_build"); statics.strTEMPLATE = ProKey("TEMPLATE"); statics.strQMAKE_PLATFORM = ProKey("QMAKE_PLATFORM"); + statics.strQMAKESPEC = ProKey("QMAKESPEC"); #ifdef PROEVALUATOR_FULL statics.strREQUIRES = ProKey("REQUIRES"); #endif @@ -944,6 +945,12 @@ void QMakeEvaluator::visitProVariable( setTemplate(); else if (varName == statics.strQMAKE_PLATFORM) m_featureRoots = 0; + else if (varName == statics.strQMAKESPEC) { + if (!values(varName).isEmpty()) { + m_qmakespec = values(varName).first().toQString(); + m_featureRoots = 0; + } + } #ifdef PROEVALUATOR_FULL else if (varName == statics.strREQUIRES) checkRequirements(values(varName)); @@ -1165,7 +1172,7 @@ bool QMakeEvaluator::loadSpecInternal() m_qmakespec = orig_spec.toQString(); # endif #endif - valuesRef(ProKey("QMAKESPEC")) << ProString(m_qmakespec); + valuesRef(ProKey("QMAKESPEC")) = ProString(m_qmakespec); m_qmakespecName = IoUtils::fileName(m_qmakespec).toString(); // This also ensures that m_featureRoots is valid. if (evaluateFeatureFile(QLatin1String("spec_post.prf")) != ReturnTrue) diff --git a/src/linguist/shared/qmakeevaluator_p.h b/src/linguist/shared/qmakeevaluator_p.h index 7a89a23e0..033070b36 100644 --- a/src/linguist/shared/qmakeevaluator_p.h +++ b/src/linguist/shared/qmakeevaluator_p.h @@ -91,6 +91,7 @@ struct QMakeStatics { QString strhost_build; ProKey strTEMPLATE; ProKey strQMAKE_PLATFORM; + ProKey strQMAKESPEC; #ifdef PROEVALUATOR_FULL ProKey strREQUIRES; #endif |