From 5ad378859a185c681cdea39a21c850b46e1369bb Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 18 Sep 2012 18:19:29 +0200 Subject: [PATCH] move syncqt call to qt_module_headers.prf for one, the syncqt invocation is qt module magic and thus simply does not belong into the generic default_pre file. second, this way the forwarding header generation is now linked to the rest of the build magic for a particular module, which is way less confusing for the unsuspecting developer. Change-Id: Idc8e420d3faf173d7fff4a41e6e1c59af15c3023 Reviewed-by: Thiago Macieira Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen --- mkspecs/features/default_pre.prf | 15 --------------- mkspecs/features/qt_module_headers.prf | 9 +++++++++ src/tools/bootstrap/bootstrap.pro | 13 +++++++++++++ 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf index 5ba2fdb..8b9cae5 100644 --- a/mkspecs/features/default_pre.prf +++ b/mkspecs/features/default_pre.prf @@ -12,21 +12,6 @@ CONFIG = lex yacc warn_on debug exceptions depend_includepath $$CONFIG cache(QMAKEMODULES, add super, modpath) unset(modpath) } - } else { - # When doing a build without -prefix, put the headers directly into qtbase. - isEmpty(MODULE_BASE_OUTDIR): MODULE_BASE_OUTDIR = $$[QT_HOST_DATA] - } - - qtPrepareTool(QMAKE_SYNCQT, syncqt) - contains(QT_CONFIG, private_tests): \ # -developer-build - QMAKE_SYNCQT += -check-includes - isEmpty(MODULE_BASE_OUTDIR): MODULE_BASE_OUTDIR = $$OUT_PWD - MSG = $$quote($$QMAKE_SYNCQT -qtdir $$[QT_HOST_DATA/get] -outdir $$MODULE_BASE_OUTDIR $$_PRO_FILE_PWD_) - !silent:message($$MSG) - system($$MSG) { - # success! Nothing to do - } else { - error("Failed to run: $$MSG") } } diff --git a/mkspecs/features/qt_module_headers.prf b/mkspecs/features/qt_module_headers.prf index cd41c17..ef2f72f 100644 --- a/mkspecs/features/qt_module_headers.prf +++ b/mkspecs/features/qt_module_headers.prf @@ -4,6 +4,15 @@ QTDIR = $$[QT_HOST_PREFIX] else: \ mod_component_base = $$MODULE_BASE_OUTDIR +!build_pass { + qtPrepareTool(QMAKE_SYNCQT, syncqt) + contains(QT_CONFIG, private_tests): \ # -developer-build + QMAKE_SYNCQT += -check-includes + QMAKE_SYNCQT += -module $$TARGET -qtdir $$[QT_HOST_DATA/get] -outdir $$mod_component_base $$MODULE_BASE_DIR + !silent: message($$QMAKE_SYNCQT) + system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT") +} + #load up the headers info include($$mod_component_base/include/$$TARGET/headers.pri, "", true) diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index 0392771..0aa9436 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -127,3 +127,16 @@ QMAKE_EXTRA_TARGETS += freeze_target docs.commands = docs.depends = first QMAKE_EXTRA_TARGETS += docs + +# We need the forwarding headers before their respective modules are built, +# so do a minimal syncqt run. +qtPrepareTool(QMAKE_SYNCQT, syncqt) +QTDIR = $$[QT_HOST_PREFIX] +exists($$QTDIR/.qmake.cache): \ + mod_component_base = $$QTDIR +else: \ + mod_component_base = $$dirname(_QMAKE_CACHE_) +QMAKE_SYNCQT += -minimal -module QtCore -module QtDBus -module QtXml \ + -qtdir $$[QT_HOST_DATA/get] -outdir $$mod_component_base $$dirname(_QMAKE_CONF_) +!silent:message($$QMAKE_SYNCQT) +system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT") -- 2.7.4