summaryrefslogtreecommitdiffstats
path: root/qtbase.pro
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2016-08-26 21:19:12 +0200
committerLars Knoll <lars.knoll@qt.io>2016-09-15 08:24:10 +0000
commita668c6a6b605ce516f71b9339df53699e85ad248 (patch)
treec31efe90350cc21c37035f6b5016edfeafde7e82 /qtbase.pro
parentb22471edf9ff666e87b12398460dfd6e761bc24c (diff)
Convert the old feature system
... to the new qmake based configuration system. This removes the old qfeatures.txt (distributed over configure.json files) and qfeatures.h (distributed over qconfig-<module>.h files). qfeatures.prf is gone without replacement, as attempts to use it would lead to followup errors anyway. Change-Id: I1598de19db937082283a905b9592d3849d2199d0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'qtbase.pro')
-rw-r--r--qtbase.pro82
1 files changed, 1 insertions, 81 deletions
diff --git a/qtbase.pro b/qtbase.pro
index fce2c9fa6c..d2d308870d 100644
--- a/qtbase.pro
+++ b/qtbase.pro
@@ -75,90 +75,10 @@ prefix_build|!equals(PWD, $$OUT_PWD) {
}
-# Generate qfeatures.h
-features =
-lines = $$cat("src/corelib/global/qfeatures.txt", lines)
-for (line, lines) {
- t = $$replace(line, "^Feature: (\\S+)\\s*$", "\\1")
- !isEqual(t, $$line) {
- feature = $$t
- features += $$t
- } else {
- t = $$replace(line, "^Requires: (.*)$", "\\1")
- !isEqual(t, $$line) {
- features.$${feature}.depends = $$replace(t, \\s+$, )
- } else {
- t = $$replace(line, "^Name: (.*)$", "\\1")
- !isEqual(t, $$line) {
- features.$${feature}.name = $$replace(t, \\s+$, )
- }
- }
- }
-}
-features = $$sort_depends(features, features.)
-features = $$reverse(features)
-FEATURES_H = \
- "/*" \
- " * All feature dependencies." \
- " *" \
- " * This list is generated by qmake from <qtbase>/src/corelib/global/qfeatures.txt" \
- " */"
-FEATURES_PRI =
-for (ft, features) {
- !isEmpty(features.$${ft}.depends) {
- FEATURES_H += \
- "$${LITERAL_HASH}if !defined(QT_NO_$$ft) && ($$join($$list($$split(features.$${ft}.depends)), ") || defined(QT_NO_", "defined(QT_NO_", ")"))" \
- "$${LITERAL_HASH} define QT_NO_$$ft" \
- "$${LITERAL_HASH}endif"
- FEATURES_PRI += \
- "contains(QT_DISABLED_FEATURES, "$$lower($$join($$list($$replace(features.$${ft}.depends, _, -)), "|"))"): \\" \
- " QT_DISABLED_FEATURES += $$lower($$replace(ft, _, -))"
- }
-}
-write_file($$OUT_PWD/src/corelib/global/qfeatures.h, FEATURES_H)|error()
-# Create forwarding header
-FWD_FEATURES_H = \
- '$${LITERAL_HASH}include "../../src/corelib/global/qfeatures.h"'
-write_file($$OUT_PWD/include/QtCore/qfeatures.h, FWD_FEATURES_H)|error()
-
-no_features =
-lines = $$cat($$OUT_PWD/src/corelib/global/qconfig.h, lines)
-for (line, lines) {
- # We ignore all defines that don't follow the #ifndef + indent pattern.
- # This makes it possible to have unchecked defines which are no features.
- t = $$replace(line, "^$${LITERAL_HASH} define QT_NO_(\\S+)\\s*$", "\\1")
- !isEqual(t, $$line) {
- isEmpty(features.$${t}.name): \
- error("qconfig.h disables unknown feature $$t")
- no_features += $$t
- }
-}
-for (def, QT_NO_DEFINES) {
- !isEmpty(features.$${def}.name): \
- no_features += $$def
-}
-no_features = $$unique(no_features)
-
-# Don't simply add these to QT_CONFIG, as then one might expect them to be there without load(qfeatures).
-# And we don't want to do that automatically, as the dynamic dependency resolution is somewhat expensive.
-FEATURES_PRI = \
- "$${LITERAL_HASH} Features disabled by configure:" \
- "QT_DISABLED_FEATURES =$$lower($$join($$list($$replace(no_features, _, -)), " ", " "))" \
- "$$escape_expand(\\n)$${LITERAL_HASH} Dependencies derived from <qtbase>/src/corelib/global/qfeatures.txt:" \
- $$FEATURES_PRI \
- "QT_DISABLED_FEATURES = \$\$unique(QT_DISABLED_FEATURES)"
-write_file($$OUT_PWD/mkspecs/qfeatures.pri, FEATURES_PRI)|error()
-
-# Files created by us
-QMAKE_DISTCLEAN += \
- src/corelib/global/qfeatures.h \
- include/QtCore/qfeatures.h \
- mkspecs/qfeatures.pri
-
#mkspecs
mkspecs.path = $$[QT_HOST_DATA]/mkspecs
mkspecs.files = \
- $$OUT_PWD/mkspecs/qconfig.pri $$OUT_PWD/mkspecs/qmodule.pri $$OUT_PWD/mkspecs/qfeatures.pri \
+ $$OUT_PWD/mkspecs/qconfig.pri $$OUT_PWD/mkspecs/qmodule.pri \
$$OUT_PWD/mkspecs/qdevice.pri $$OUT_PWD/mkspecs/qhost.pri \
$$files($$PWD/mkspecs/*)
mkspecs.files -= $$PWD/mkspecs/modules $$PWD/mkspecs/modules-inst