summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-02-08 19:38:31 +0100
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-02-22 07:46:11 +0000
commit5f209542916065775cdd23415aee4a7dee98e902 (patch)
tree5645db3cbe398cb1a2ef65a516b875b587242cbe
parent7509ccc0f7020a313fcd04447ab3f9b8ff1a548d (diff)
add configure -list-libraries
currently mostly for debugging purposes (especially with -verbose). Change-Id: I8af32c61df0b19861aa79bc4bbdd3f6095dbe9b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--config_help.txt2
-rw-r--r--mkspecs/features/data/configure.json3
-rw-r--r--mkspecs/features/qt_configure.prf36
3 files changed, 40 insertions, 1 deletions
diff --git a/config_help.txt b/config_help.txt
index 32bc15412c..8a9db24fae 100644
--- a/config_help.txt
+++ b/config_help.txt
@@ -67,6 +67,8 @@ Configure meta:
-list-features ....... List available features. Note that some features
have dedicated command line options as well.
+ -list-libraries ...... List possible external dependencies.
+
Build options:
-opensource .......... Build the Open-Source Edition of Qt
diff --git a/mkspecs/features/data/configure.json b/mkspecs/features/data/configure.json
index c4e33d0188..38623d46a4 100644
--- a/mkspecs/features/data/configure.json
+++ b/mkspecs/features/data/configure.json
@@ -14,7 +14,8 @@
"redo": { "type": "redo" },
- "list-features": "void"
+ "list-features": "void",
+ "list-libraries": "void"
}
}
}
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index 5c895bcde3..1f8439a81d 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -413,6 +413,10 @@ defineTest(qtConfSetupLibraries) {
isEmpty(alias): alias = $$l
$${lpfx}.alias = $$alias
export($${lpfx}.alias)
+ # make it easy to refer to the library by its export name.
+ $${currentConfig}.exports._KEYS_ += $$alias
+ $${currentConfig}.exports.$$alias += $$l
+ export($${currentConfig}.exports.$$alias)
isEmpty($${lpfx}.sources._KEYS_): \
error("Library $$l defines no sources")
for (s, $${lpfx}.sources._KEYS_) {
@@ -432,6 +436,8 @@ defineTest(qtConfSetupLibraries) {
}
}
}
+ $${currentConfig}.exports._KEYS_ = $$unique($${currentConfig}.exports._KEYS_)
+ export($${currentConfig}.exports._KEYS_)
# reverse mapping for assignments on command line.
for (a, $${currentConfig}.commandline.assignments._KEYS_) {
@@ -1801,6 +1807,36 @@ qtConfCheckErrors()
error()
}
+!isEmpty(config.input.list-libraries) {
+ logn()
+ for (currentConfig, allConfigs) {
+ !isEmpty($${currentConfig}.exports._KEYS_) {
+ !isEmpty($${currentConfig}.module): \
+ logn($$eval($${currentConfig}.module):)
+ else: \
+ logn($$section(currentConfig, ., -1):)
+ all_xp =
+ for (xport, $${currentConfig}.exports._KEYS_) {
+ libs = $$eval($${currentConfig}.exports.$$xport)
+ isEqual($${currentConfig}.libraries.$$first(libs).export, "") { # not isEmpty()!
+ !isEmpty(config.input.verbose): \
+ all_xp += "$$xport!"
+ } else {
+ out = "$$xport"
+ !isEmpty(config.input.verbose):!isEqual(xport, $$libs): \
+ out += "($$libs)"
+ all_xp += "$$out"
+ }
+ }
+ all_xp = $$sorted(all_xp)
+ all_xp ~= s,^([^!]*)!$,(\\1),g
+ for (xp, all_xp): \
+ logn(" $$xp")
+ }
+ }
+ error()
+}
+
for (currentConfig, allConfigs) {
qtConfSetModuleName()
qtConfSetupModuleOutputs()