surround loading of spec with loading spec_pre.prf and spec_post.prf

follow suit with qmake ...

once we move currently builtin functionality to these feature files,
things would break with qt4 (which does not have them). consequently,
we provide our own fallback versions of them.

Change-Id: Ie318f3419d78214472835c41ec1388977f2e9269
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Oswald Buddenhagen
2012-05-04 22:12:17 +02:00
parent ca2816db1a
commit 41bf7c896b
6 changed files with 17 additions and 0 deletions

View File

@@ -885,6 +885,8 @@ bool QMakeEvaluator::loadSpec()
cool:
m_option->qmakespec = QDir::cleanPath(qmakespec);
if (!evaluateFeatureFile(QLatin1String("spec_pre.prf")))
return false;
QString spec = m_option->qmakespec + QLatin1String("/qmake.conf");
if (!evaluateFileDirect(spec, QMakeHandler::EvalConfigFile, LoadProOnly)) {
m_handler->configError(
@@ -901,6 +903,8 @@ bool QMakeEvaluator::loadSpec()
QString real_spec = orig_spec.isEmpty() ? m_option->qmakespec : orig_spec.toQString();
#endif
m_option->qmakespec_name = IoUtils::fileName(real_spec).toString();
if (!evaluateFeatureFile(QLatin1String("spec_post.prf")))
return false;
if (!m_option->cachefile.isEmpty()
&& !evaluateFileDirect(m_option->cachefile, QMakeHandler::EvalConfigFile, LoadProOnly)) {
return false;
@@ -1900,6 +1904,11 @@ bool QMakeEvaluator::evaluateFeatureFile(const QString &fileName)
goto cool;
}
}
#ifdef QMAKE_BUILTIN_PRFS
fn.prepend(QLatin1String(":/qmake/features/"));
if (QFileInfo(fn).exists())
goto cool;
#endif
return false;
cool: