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 <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Oswald Buddenhagen 2012-09-18 18:19:29 +02:00 committed by The Qt Project
parent 0da7f09724
commit 5ad378859a
3 changed files with 22 additions and 15 deletions

View File

@ -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")
}
}

View File

@ -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)

View File

@ -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")