997b2a96c1
An extra script is added (qtmodule-configtests) which is currently invoked from syncqt (with some derived parameters passed to it). The module can optionally have an entry in the module's sync.profile file in the form of a perl map of "test name" => parameters. Tests can print an advisory message if they fail (e.g. "Install this SDK/dev package"), or abort the syncqt process (e.g. mandatory prereq missing). Also, if the test has a "requires(foo)" line that results in it being skipped, this is also supported. Change-Id: Ic3c820a488a0992c944994d4d7dc283da36742d6 Reviewed-on: http://codereview.qt.nokia.com/928 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
44 lines
1.6 KiB
Plaintext
44 lines
1.6 KiB
Plaintext
load(exclusive_builds)
|
|
### Qt 5: remove "uic" and "resources" - or add "qt"
|
|
CONFIG = lex yacc warn_on debug uic resources $$CONFIG
|
|
|
|
!build_pass:exists($$_PRO_FILE_PWD_/sync.profile) {
|
|
PRO_BASENAME = $$basename(_PRO_FILE_)
|
|
|
|
# Try to detect proper QTDIR path. We require QTDIR, as syncqt uses that to create qt_module.pri
|
|
# forwarding files. If we don't find QTDIR, we avoid creating the fwd files, since you then need
|
|
# to do a 'make install;' before you can use the module
|
|
# (ie. we don't use QT_INSTALL_DATA for fwd includes. This path needs a full copy)
|
|
isEmpty(QTDIR) {
|
|
QTDIR = $$(QTDIR)
|
|
isEmpty(QTDIR):QTDIR = $$QT_BUILD_TREE
|
|
isEmpty(QTDIR) { # figure out QTDIR based on qmake binary
|
|
QMAKE_BASED_QTDIR = $$dirname(QMAKE_QMAKE)
|
|
QTDIR = $$dirname(QMAKE_BASED_QTDIR)
|
|
unset(QMAKE_BASED_QTDIR)
|
|
}
|
|
}
|
|
|
|
QTFWD = -module-fwd $$OUT_PWD/module-paths/modules -cache-module-fwd
|
|
!isEmpty(QTDIR) {
|
|
# Only if QTDIR points to an actual build directory
|
|
# and this build directory is the install directory
|
|
# can we tell syncqt to do a -developer-build
|
|
exists($$QTDIR/.qmake.cache):contains(QTDIR, $$[QT_INSTALL_PREFIX]) {
|
|
QTFWD = -qtdir $$QTDIR -module-fwd $$QTDIR/mkspecs/modules -developer-build
|
|
}
|
|
}
|
|
|
|
qtPrepareTool(QMAKE_SYNCQT, syncqt)
|
|
|
|
MSG = $$quote($$QMAKE_SYNCQT $$QTFWD -generator $$MAKEFILE_GENERATOR -outdir $$OUT_PWD $$_PRO_FILE_PWD_)
|
|
!silent:message($$MSG)
|
|
system($$MSG) {
|
|
# success! Nothing to do
|
|
} else {
|
|
error("Failed to run: $$MSG")
|
|
}
|
|
unset(QTFWD)
|
|
unset(PRO_BASENAME)
|
|
}
|