5d8b8eed90
there is no particular reason for it being done by qmake. avoids that the logic is distributed over two source files, and allows us to generate these headers at pre-build time already, including not forwarding to a yet unexisting file (which would have a yet unknown location). Change-Id: I9c78ab425cf6f01d076c86fd1ee602626f231487 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
66 lines
2.1 KiB
Plaintext
66 lines
2.1 KiB
Plaintext
#
|
|
# 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.
|
|
#
|
|
|
|
load(qt_build_paths)
|
|
|
|
!build_pass {
|
|
qtPrepareTool(QMAKE_SYNCQT, syncqt)
|
|
minimal_syncqt {
|
|
QMAKE_SYNCQT += -minimal $$QMAKE_SYNCQT_OPTIONS
|
|
} else {
|
|
contains(QT_CONFIG, private_tests): \ # -developer-build
|
|
QMAKE_SYNCQT += -check-includes
|
|
QMAKE_SYNCQT += -module $$MODULE_INCNAME -version $$VERSION
|
|
}
|
|
QMAKE_SYNCQT += \
|
|
-outdir $$MODULE_BASE_OUTDIR $$MODULE_BASE_DIR
|
|
!silent: message($$QMAKE_SYNCQT)
|
|
system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT")
|
|
}
|
|
|
|
minimal_syncqt: return()
|
|
|
|
#load up the headers info
|
|
include($$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/headers.pri, "", true)
|
|
|
|
defineTest(shouldMasterInclude) {
|
|
bn = $$basename(1)
|
|
contains(bn, .*_.*):return(false)
|
|
contains(bn, ^qconfig.*):return(false)
|
|
lines = $$cat($$_PRO_FILE_PWD_/$$1, lines)
|
|
contains(lines, $${LITERAL_HASH}pragma qt_no_master_include):return(false)
|
|
return(true)
|
|
}
|
|
|
|
autogen_warning = \
|
|
"/* This file was generated by qmake with the info from <root>/$$relative_path($$_PRO_FILE_, $$MODULE_BASE_DIR). */"
|
|
|
|
# Create a module master header
|
|
MODULE_MASTER_HEADER = $$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/$$MODULE_INCNAME
|
|
!build_pass {
|
|
MODULE_MASTER_HEADER_CONT = \
|
|
$$autogen_warning \
|
|
"$${LITERAL_HASH}ifndef QT_$${ucmodule}_MODULE_H" \
|
|
"$${LITERAL_HASH}define QT_$${ucmodule}_MODULE_H"
|
|
for(dep, MODULE_DEPENDS) {
|
|
depname = $$eval(QT.$${dep}.name)
|
|
MODULE_MASTER_HEADER_CONT += "$${LITERAL_HASH}include <$$depname/$$depname>"
|
|
}
|
|
for(hdr, SYNCQT.HEADER_FILES): \
|
|
shouldMasterInclude($$hdr): \
|
|
MODULE_MASTER_HEADER_CONT += "$${LITERAL_HASH}include \"$$replace(hdr, .*/, )\""
|
|
MODULE_MASTER_HEADER_CONT += "$${LITERAL_HASH}endif"
|
|
write_file($$MODULE_MASTER_HEADER, MODULE_MASTER_HEADER_CONT)|error("Aborting.")
|
|
}
|
|
SYNCQT.HEADER_FILES += $$MODULE_MASTER_HEADER
|
|
|
|
CONFIG += qt_install_headers
|