Commit Graph

16 Commits

Author SHA1 Message Date
Oswald Buddenhagen
2c6801cb37 configure: cache test output as well
that way we can create a config.log which is consistent with the end
state even if (some) tests are not executed this time around.

Change-Id: Ia953ede62d6640aab912559f435ceb1f9ec6d9dc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-04-10 18:51:13 +00:00
Oswald Buddenhagen
d56d2e0cb2 don't redirect licheck's stderr
it uses it for interaction.

Task-number: QTBUG-61017
Change-Id: I9edc0f9aa91793bc451fa78a8f6ad11d61e04b57
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-05-31 12:57:43 +00:00
Oswald Buddenhagen
cfba3fff05 move emission of final messages to qmake-based configure
now qmake is the last command called by the unix configure script.
as it happens, this was already the case in the windows script, but only
because it didn't print these messages at all, which it implicitly does
now.

another effect of this is that repositories outside qtbase will now also
get the installation note in modular builds, which makes sense.

Change-Id: I567146936b216185a8e0f61e445222215608bf13
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-06 20:08:56 +00:00
Oswald Buddenhagen
24cb1580e2 make handling of built-in configure options data-driven
Change-Id: I08b226b6c9255b60393734e8ffcb745ccb63c597
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-13 18:55:28 +00:00
Oswald Buddenhagen
6cd358db7e mark up output of called commands in configure log
otherwise it's sometimes quite hard to tell it apart from configure's
own messages.

Change-Id: I2f4908344367a9a3ce38e032bf76486fc4552ffd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:43:46 +00:00
Oswald Buddenhagen
fa8e467804 fix configure logging when no cache is present yet
this got broken in 2ad4d75754.

however, the new configure system operates from the top-level build dir
anyway, so there is no point in messing with the cache as a reference
point to start with - just use OUT_PWD.

Task-number: QTBUG-57120
Change-Id: I69629bf497931574bff8452939170abb1776ab60
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:43:28 +00:00
Oswald Buddenhagen
7ac15ab0ff don't clear config.log unless re-checking
it is counterproductive to clear the log when cached test results are
used, as that makes it hard to determine how they came to be.

-recheck isn't as clear-cut as -recheck-all, as only part of the results
is discarded, and we can't reasonably discard only part of the log. i
opted for clearing the log entirely, as having both the old and new
results in the log would be probably quite confusing.

Change-Id: Ibb391f2ba2ea86d73c23365d46cc66ed8a2158d6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-07 13:02:14 +00:00
Oswald Buddenhagen
2ad4d75754 move empty cache() call back to configure.prf
the new configure system doesn't use this type of caching. also, it's
invoked via qt_parts.prf, which actually has the same call.

Change-Id: Ifa1e810e24330b59a1eb9f883eb0500642a212f3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-07 13:02:10 +00:00
Lars Knoll
60e5a1c8ef 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-09-10 14:04:01 +00:00
Oswald Buddenhagen
492d7d14fc improve handling of test commands which produce output
never use $$system() directly, but instead use qtRunLoggedCommand() with
a newly introduced out parameter. that way we can print the command's
raw output, which should help debugging configure problems.
additionally, we now consistently check the exit code of all executed
commands, which should avoid confusing followup errors.

note that as a side effect some calls now use $$system()'s 'lines' mode
instead of the bizarre default splitting mode. this has no impact on any
of the cases, which is why it is basically a negligible style change at
this point.
however, qtLog() gained support for arguments with more than one element
to accommodate this.

Change-Id: I40d907e27de32dfec8d6086ce7d93fc4be18241f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:09:38 +00:00
Oswald Buddenhagen
622ab0aca5 use qtLog() to also print command output
Change-Id: I950bc86b0b2dafcb8f2369478f391dc05280194f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-11 08:04:59 +00:00
Oswald Buddenhagen
f18cc7e3cc fix configure qtLog()
its actual function was qtLogCommand(), but all callers outside
configure_base.prf apparently didn't know that. adjust implementation.

Change-Id: I910d4ba33c6f31debc81c37e3bfff1a288190355
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-11 08:04:55 +00:00
Oswald Buddenhagen
615b9c1f06 make sure that we capture the entire test command's output
the command can be a compound statement (usually 'foo && bar' style),
so enclose it in parens before redirecting stderr.

Change-Id: Ib72a2c8ddfd17bf9457e9cfe2652121258ce9a64
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-11 08:04:44 +00:00
Oswald Buddenhagen
0eff800e81 add support for returning the command's exit status to $$system()
... and make use of it in qtRunLoggedCommand().

Change-Id: I242dfde344f555800cef1f55d3cb85418a93277f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:42:29 +00:00
Liang Qi
dd90af1221 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	mkspecs/common/mac.conf
	mkspecs/features/configure_base.prf
	mkspecs/features/configure.prf
	mkspecs/macx-clang-32/qmake.conf
	mkspecs/macx-clang/qmake.conf
	mkspecs/macx-ios-clang/qmake.conf
	src/network/ssl/qsslsocket_openssl_symbols_p.h

Change-Id: I768b592e8e589662b1fdb9b8cbd633fef26845b6
2016-06-23 14:24:55 +02:00
Lars Knoll
90eee08b3e Let qmake do most of the work of configuring Qt
Command line arguments, configure tests and features are now
defined in a json file and a configure.pri containing some
custom functions.

qmake uses the json file to determine command line arguments,
tests and features to be executed at configuration time.

A new qt_configure.prf contains all the infrastructure to parse
the command line, run the configure tests, determine the set of
available features and create a report about it.

Change-Id: If30ac089dd3e9f8c67ebd642bde10cfa960893bb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-22 14:19:35 +00:00