c04cf29b78
qtAddToolEnv() (via qtPrepareTool()) does not write the tool wrapper scripts during build passes, while qt_docs.prf (which calls it for qdoc and qhelpgenerator) was loaded only during build passes. the consequence was that the makefiles tried calling non-existent scripts. amends 5418d77a1, sort of. Change-Id: I64ab573495ca339be4c7b5e8c6848b298b6cb605 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
94 lines
3.4 KiB
Plaintext
94 lines
3.4 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.
|
|
#
|
|
|
|
!exists($$QMAKE_DOCS): error("Cannot find documentation specification file $$QMAKE_DOCS")
|
|
|
|
qtver.name = QT_VERSION
|
|
qtver.value = $$VERSION
|
|
isEmpty(qtver.value): qtver.value = $$MODULE_VERSION
|
|
isEmpty(qtver.value): error("No version for documentation specified.")
|
|
qtmver.name = QT_VER
|
|
qtmver.value = $$replace(qtver.value, ^(\\d+\\.\\d+).*$, \\1)
|
|
qtvertag.name = QT_VERSION_TAG
|
|
qtvertag.value = $$replace(qtver.value, \.,)
|
|
qtdocs.name = QT_INSTALL_DOCS
|
|
qtdocs.value = $$[QT_INSTALL_DOCS/src]
|
|
QT_TOOL_ENV = qtver qtmver qtvertag qtdocs
|
|
qtPrepareTool(QDOC, qdoc)
|
|
QT_TOOL_ENV =
|
|
|
|
!build_online_docs: qtPrepareTool(QHELPGENERATOR, qhelpgenerator)
|
|
|
|
# qtPrepareTool() must be called outside a build pass, as it protects
|
|
# against concurrent wrapper creation by omitting it during build passes.
|
|
# However, creating the actual targets is reserved to the build passes.
|
|
debug_and_release:!build_pass: return()
|
|
|
|
load(qt_build_paths)
|
|
QMAKE_DOCS_BASE_OUTDIR = $$MODULE_BASE_OUTDIR/doc
|
|
|
|
QMAKE_DOCS_TARGET = $$replace(QMAKE_DOCS, ^(.*/)?(.*)\\.qdocconf$, \\2)
|
|
isEmpty(QMAKE_DOCS_TARGETDIR): QMAKE_DOCS_TARGETDIR = $$QMAKE_DOCS_TARGET
|
|
QMAKE_DOCS_OUTPUTDIR = $$QMAKE_DOCS_BASE_OUTDIR/$$QMAKE_DOCS_TARGETDIR
|
|
|
|
QDOC += -outputdir $$shell_quote($$QMAKE_DOCS_OUTPUTDIR)
|
|
!build_online_docs: \
|
|
QDOC += -installdir $$shell_quote($$[QT_INSTALL_DOCS])
|
|
PREP_DOC_INDEXES =
|
|
DOC_INDEXES =
|
|
!isEmpty(QTREPOS) {
|
|
prepare_docs {
|
|
# This is not for linking, but for providing type information.
|
|
mps =
|
|
deps = $$replace(QT, -private$, )
|
|
deps = $$resolve_depends(deps, "QT.")
|
|
for (d, deps): \
|
|
mps += $$dirname(QT.$${d}.libs)
|
|
mps = $$unique(mps)
|
|
for (mp, mps): \
|
|
PREP_DOC_INDEXES += -indexdir $$shell_quote($$mp/doc)
|
|
}
|
|
for(qrep, QTREPOS): \
|
|
DOC_INDEXES += -indexdir $$shell_quote($$qrep/doc)
|
|
} else {
|
|
prepare_docs: \
|
|
PREP_DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
|
|
DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
|
|
}
|
|
doc_command = $$QDOC $$QMAKE_DOCS
|
|
prepare_docs {
|
|
prepare_docs.commands += $$doc_command -prepare $$PREP_DOC_INDEXES -no-link-errors
|
|
generate_docs.commands += $$doc_command -generate $$DOC_INDEXES
|
|
} else {
|
|
html_docs.commands += $$doc_command $$DOC_INDEXES
|
|
}
|
|
|
|
!build_online_docs {
|
|
qch_docs.commands = $$QHELPGENERATOR $$shell_quote($$QMAKE_DOCS_OUTPUTDIR/$${QMAKE_DOCS_TARGET}.qhp) -o $$shell_quote($$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch)
|
|
|
|
inst_html_docs.files = $$QMAKE_DOCS_OUTPUTDIR
|
|
inst_html_docs.path = $$[QT_INSTALL_DOCS]
|
|
inst_html_docs.CONFIG += no_check_exist directory no_default_install no_build
|
|
INSTALLS += inst_html_docs
|
|
|
|
inst_qch_docs.files = $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch
|
|
inst_qch_docs.path = $$[QT_INSTALL_DOCS]
|
|
inst_qch_docs.CONFIG += no_check_exist no_default_install no_build
|
|
INSTALLS += inst_qch_docs
|
|
|
|
install_html_docs.depends = install_inst_html_docs
|
|
uninstall_html_docs.depends = uninstall_inst_html_docs
|
|
install_qch_docs.depends = install_inst_qch_docs
|
|
uninstall_qch_docs.depends = uninstall_inst_qch_docs
|
|
install_docs.depends = install_html_docs install_qch_docs
|
|
uninstall_docs.depends = uninstall_html_docs uninstall_qch_docs
|
|
}
|