2012-12-11 21:08:15 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
2012-11-30 20:07:47 +00:00
|
|
|
!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)
|
|
|
|
QDOC += -outputdir $$QMAKE_DOCS_OUTPUTDIR
|
|
|
|
!build_online_docs: \
|
|
|
|
QDOC += -installdir $$[QT_INSTALL_DOCS]
|
2013-07-05 13:42:39 +00:00
|
|
|
DOC_INDEXES =
|
|
|
|
for(qmod, QMAKEMODULES): \
|
|
|
|
DOC_INDEXES += -indexdir $$section(qmod, /, 0, -3)/doc
|
2013-01-30 16:20:33 +00:00
|
|
|
qtver.name = QT_VERSION
|
2013-02-26 10:25:52 +00:00
|
|
|
qtver.value = $$VERSION
|
|
|
|
isEmpty(qtver.value): qtver.value = $$MODULE_VERSION
|
|
|
|
isEmpty(qtver.value): error("No version for documentation specified.")
|
2013-01-30 16:20:33 +00:00
|
|
|
qtmver.name = QT_VER
|
2013-02-26 10:25:52 +00:00
|
|
|
qtmver.value = $$replace(qtver.value, ^(\\d+\\.\\d+).*$, \\1)
|
2013-01-30 16:20:33 +00:00
|
|
|
qtvertag.name = QT_VERSION_TAG
|
2013-02-26 10:25:52 +00:00
|
|
|
qtvertag.value = $$replace(qtver.value, \.,)
|
2013-03-15 16:22:31 +00:00
|
|
|
qtdocs.name = QT_INSTALL_DOCS
|
|
|
|
qtdocs.value = $$[QT_INSTALL_DOCS/get]
|
|
|
|
qtAddToolEnv(QDOC, qtver qtmver qtvertag qtdocs)
|
2012-11-30 20:07:47 +00:00
|
|
|
doc_command = $$QDOC $$QMAKE_DOCS
|
|
|
|
prepare_docs {
|
|
|
|
prepare_docs.commands += $$doc_command -prepare -no-link-errors
|
2013-07-05 13:42:39 +00:00
|
|
|
generate_docs.commands += $$doc_command -generate $$DOC_INDEXES
|
2012-11-30 20:07:47 +00:00
|
|
|
} else {
|
2013-07-05 13:42:39 +00:00
|
|
|
html_docs.commands += $$doc_command $$DOC_INDEXES
|
2012-11-30 20:07:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
!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]
|
2012-12-04 20:55:06 +00:00
|
|
|
inst_html_docs.CONFIG += no_check_exist directory no_default_install no_build
|
2012-11-30 20:07:47 +00:00
|
|
|
INSTALLS += inst_html_docs
|
|
|
|
|
|
|
|
inst_qch_docs.files = $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch
|
|
|
|
inst_qch_docs.path = $$[QT_INSTALL_DOCS]
|
2012-12-04 20:55:06 +00:00
|
|
|
inst_qch_docs.CONFIG += no_check_exist no_default_install no_build
|
2012-11-30 20:07:47 +00:00
|
|
|
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
|
|
|
|
}
|