qt5base-lts/mkspecs/features/qt_docs.prf
Oswald Buddenhagen b4d3047422 require modules to define their version
otherwise they would inherit it from qtbase, which may effectively
result in a lie if building against a different release.

for convenience we define the version centrally per repo.
qtbase is special, in that we use the version defined in qglobal.h to
avoid defining it redundantly (the instance in qglobal.h is currently
needed to bootstrap qmake; the configures would need some work to change
this).

Task-number: QTBUG-29838
Change-Id: Ie9a5b0ff0d64b69ff2d34af2f7c42d6278e957cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-06 18:01:13 +01:00

65 lines
2.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")
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
qtPrepareTool(QDOC, qdoc)
for(qmod, QMAKEMODULES): \
QDOC += -indexdir $$section(qmod, /, 0, -3)/doc
QDOC += -outputdir $$QMAKE_DOCS_OUTPUTDIR
!build_online_docs: \
QDOC += -installdir $$[QT_INSTALL_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, \.,)
qtAddToolEnv(QDOC, qtver qtmver qtvertag)
doc_command = $$QDOC $$QMAKE_DOCS
prepare_docs {
prepare_docs.commands += $$doc_command -prepare -no-link-errors
generate_docs.commands += $$doc_command -generate
} else {
html_docs.commands += $$doc_command
}
!build_online_docs {
qtPrepareTool(QHELPGENERATOR, qhelpgenerator)
qch_docs.commands = $$QHELPGENERATOR $$QMAKE_DOCS_OUTPUTDIR/$${QMAKE_DOCS_TARGET}.qhp -o $$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
}