Commit 5f209542 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

add configure -list-libraries


currently mostly for debugging purposes (especially with -verbose).

Change-Id: I8af32c61df0b19861aa79bc4bbdd3f6095dbe9b7
Reviewed-by: default avatarLars Knoll <lars.knoll@qt.io>
Showing with 40 additions and 1 deletion
......@@ -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
......
......@@ -14,7 +14,8 @@
"redo": { "type": "redo" },
"list-features": "void"
"list-features": "void",
"list-libraries": "void"
}
}
}
......@@ -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()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment