2012-12-11 21:08:15 +00:00
|
|
|
#
|
|
|
|
# W A R N I N G
|
|
|
|
# -------------
|
|
|
|
#
|
|
|
|
# This file is not part of the Qt API. It exists purely as an
|
|
|
|
# implementation detail. It may change from version to version
|
|
|
|
# without notice, or even be removed.
|
|
|
|
#
|
|
|
|
# We mean it.
|
|
|
|
#
|
|
|
|
|
2013-03-19 16:35:35 +00:00
|
|
|
# Ensure that each module has a .qmake.cache when properly qmake'd.
|
|
|
|
cache()
|
|
|
|
|
Modularize the new configure system (infrastructure part)
This change implements the required infrastructure to modularize the new
configuration system.
This requires a hierarchy of configuration files, both for handling
multiple repositories and for individual modules inside the same
repository.
When configuring, they all need to get loaded first, as command line
processing needs to know about all possible command line options.
When the command line has been processed, the individual configuration
files need to get processed one after the other and independently from
each other.
Configure is now automatically invoked when building the a project
tree's "root" project; this works with both modular and top-level builds
of Qt (the latter with an according change in the super repo). As an
immediate consequence, the -skip option moves to the super repo with a
different implementation, as configuration is now done after the repo
list is determined. The option belongs there anyway.
This commit also adds an optional testDir entry to the json file. Like
this, we can still have all configure tests in qtbase/config.tests and
the configuration file in, e.g., corelib can reference those.
The files section can now be left out as long as a 'module' entry is
present, specifying the module name. The names of the files to generate
can then be deduced from that name. We still need to be able to specify
names directly for the global configuration files.
qtConfig() now also queries features which are module-specific. As it is
sometimes necessary to query the configuration of modules which should
not be actually linked (and cannot in the case of subdirs projects), the
new variable QT_FOR_CONFIG which allows specifying configuration-only
dependencies is introduced.
Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: Id1b518a3aa34044748b87fb8fac14d79653f6b18
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-25 13:45:44 +00:00
|
|
|
load(qt_configure)
|
|
|
|
|
2012-07-03 19:26:36 +00:00
|
|
|
load(qt_build_config)
|
|
|
|
|
|
|
|
TEMPLATE = subdirs
|
|
|
|
|
2012-11-08 10:29:12 +00:00
|
|
|
bp = $$eval($$upper($$TARGET)_BUILD_PARTS)
|
|
|
|
!isEmpty(bp): QT_BUILD_PARTS = $$bp
|
|
|
|
|
2013-04-26 09:59:56 +00:00
|
|
|
exists($$_PRO_FILE_PWD_/src/src.pro) {
|
|
|
|
sub_src.subdir = src
|
|
|
|
sub_src.target = sub-src
|
|
|
|
SUBDIRS += sub_src
|
2012-07-03 19:26:36 +00:00
|
|
|
|
2013-04-26 09:59:56 +00:00
|
|
|
exists($$_PRO_FILE_PWD_/tools/tools.pro) {
|
|
|
|
sub_tools.subdir = tools
|
|
|
|
sub_tools.target = sub-tools
|
|
|
|
sub_tools.depends = sub_src
|
|
|
|
# conditional treatment happens on a case-by-case basis
|
|
|
|
SUBDIRS += sub_tools
|
|
|
|
}
|
2012-07-03 19:26:36 +00:00
|
|
|
}
|
|
|
|
|
2012-07-05 23:00:08 +00:00
|
|
|
exists($$_PRO_FILE_PWD_/examples/examples.pro) {
|
2012-07-03 19:26:36 +00:00
|
|
|
sub_examples.subdir = examples
|
|
|
|
sub_examples.target = sub-examples
|
2013-04-26 09:59:56 +00:00
|
|
|
contains(SUBDIRS, sub_src): sub_examples.depends = sub_src
|
2012-11-30 13:42:52 +00:00
|
|
|
examples_need_tools: sub_examples.depends += sub_tools
|
2012-07-03 19:26:36 +00:00
|
|
|
!contains(QT_BUILD_PARTS, examples): sub_examples.CONFIG = no_default_target no_default_install
|
|
|
|
SUBDIRS += sub_examples
|
|
|
|
}
|
|
|
|
|
|
|
|
# Some modules still have these
|
2012-07-05 23:00:08 +00:00
|
|
|
exists($$_PRO_FILE_PWD_/demos/demos.pro) {
|
2012-07-05 23:03:28 +00:00
|
|
|
sub_demos.subdir = demos
|
|
|
|
sub_demos.target = sub-demos
|
2013-04-26 09:59:56 +00:00
|
|
|
contains(SUBDIRS, sub_src): sub_demos.depends = sub_src
|
2012-11-30 13:42:52 +00:00
|
|
|
examples_need_tools: sub_demos.depends += sub_tools
|
2012-07-03 19:26:36 +00:00
|
|
|
!contains(QT_BUILD_PARTS, examples): sub_demos.CONFIG = no_default_target no_default_install
|
|
|
|
SUBDIRS += sub_demos
|
|
|
|
}
|
|
|
|
|
2012-07-05 23:00:08 +00:00
|
|
|
exists($$_PRO_FILE_PWD_/tests/tests.pro) {
|
2012-07-03 19:26:36 +00:00
|
|
|
sub_tests.subdir = tests
|
|
|
|
sub_tests.target = sub-tests
|
2013-04-26 09:59:56 +00:00
|
|
|
contains(SUBDIRS, sub_src): sub_tests.depends = sub_src # The tests may have a run-time only dependency on other parts
|
2012-11-30 13:42:52 +00:00
|
|
|
tests_need_tools: sub_tests.depends += sub_tools
|
2012-07-03 19:26:36 +00:00
|
|
|
sub_tests.CONFIG = no_default_install
|
2012-07-10 06:59:40 +00:00
|
|
|
!contains(QT_BUILD_PARTS, tests) {
|
|
|
|
sub_tests.CONFIG += no_default_target
|
2016-02-16 14:29:59 +00:00
|
|
|
} else: !uikit {
|
2012-07-10 06:59:40 +00:00
|
|
|
# Make sure these are there in case we need them
|
|
|
|
sub_tools.CONFIG -= no_default_target
|
|
|
|
sub_examples.CONFIG -= no_default_target
|
|
|
|
sub_demos.CONFIG -= no_default_target
|
|
|
|
}
|
2012-07-03 19:26:36 +00:00
|
|
|
SUBDIRS += sub_tests
|
|
|
|
}
|
|
|
|
|
|
|
|
QT_BUILD_PARTS -= libs tools examples tests
|
|
|
|
!isEmpty(QT_BUILD_PARTS): warning("Unknown build part(s): $$QT_BUILD_PARTS")
|
2015-04-23 11:40:49 +00:00
|
|
|
|
|
|
|
QMAKE_DISTCLEAN += \
|
|
|
|
.qmake.cache \
|
Modularize the new configure system (infrastructure part)
This change implements the required infrastructure to modularize the new
configuration system.
This requires a hierarchy of configuration files, both for handling
multiple repositories and for individual modules inside the same
repository.
When configuring, they all need to get loaded first, as command line
processing needs to know about all possible command line options.
When the command line has been processed, the individual configuration
files need to get processed one after the other and independently from
each other.
Configure is now automatically invoked when building the a project
tree's "root" project; this works with both modular and top-level builds
of Qt (the latter with an according change in the super repo). As an
immediate consequence, the -skip option moves to the super repo with a
different implementation, as configuration is now done after the repo
list is determined. The option belongs there anyway.
This commit also adds an optional testDir entry to the json file. Like
this, we can still have all configure tests in qtbase/config.tests and
the configuration file in, e.g., corelib can reference those.
The files section can now be left out as long as a 'module' entry is
present, specifying the module name. The names of the files to generate
can then be deduced from that name. We still need to be able to specify
names directly for the global configuration files.
qtConfig() now also queries features which are module-specific. As it is
sometimes necessary to query the configuration of modules which should
not be actually linked (and cannot in the case of subdirs projects), the
new variable QT_FOR_CONFIG which allows specifying configuration-only
dependencies is introduced.
Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: Id1b518a3aa34044748b87fb8fac14d79653f6b18
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-25 13:45:44 +00:00
|
|
|
config.cache \
|
2015-04-23 11:40:49 +00:00
|
|
|
config.log \
|
|
|
|
mkspecs/modules/*.pri \
|
|
|
|
mkspecs/modules-inst/*.pri
|
|
|
|
|
|
|
|
tests = $$files($$_PRO_FILE_PWD_/config.tests/*.pro, true)
|
|
|
|
testdirs =
|
|
|
|
for (t, tests): \
|
|
|
|
testdirs += $$relative_path($$dirname(t), $$_PRO_FILE_PWD_)
|
|
|
|
testdirs = $$unique(testdirs)
|
|
|
|
for (td, testdirs) {
|
|
|
|
t = $$basename(td)-distclean
|
2016-11-11 09:02:34 +00:00
|
|
|
$${t}.commands = -$$QMAKE_CD $$shell_path($$td) && $(MAKE) distclean
|
2015-04-23 11:40:49 +00:00
|
|
|
QMAKE_EXTRA_TARGETS += $$t
|
|
|
|
DISTCLEAN_DEPS += $$t
|
|
|
|
}
|