diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2012-11-30 21:07:47 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-02 02:16:08 +0100 |
commit | 0d40958347ad0b60fb1ccd15ab7a59e1407e945d (patch) | |
tree | 66c9b2b392b7eac17f079847d5fc34b4ca183e4f /mkspecs/features/qt_docs.prf | |
parent | b1ff4712f2576a38d20905f27722f6d085296787 (diff) | |
download | qtbase-0d40958347ad0b60fb1ccd15ab7a59e1407e945d.tar.gz |
centralize doc target related code
Change-Id: I710a7f2fc3422ec8ba5b8e90bfd92e7931092ad0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'mkspecs/features/qt_docs.prf')
-rw-r--r-- | mkspecs/features/qt_docs.prf | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf new file mode 100644 index 0000000000..3eb138b96d --- /dev/null +++ b/mkspecs/features/qt_docs.prf @@ -0,0 +1,45 @@ +!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] +doc_command = $$QDOC $$QMAKE_DOCS +prepare_docs { + prepare_docs.commands += $$doc_command -prepare -no-link-errors + generate_docs.commands += $$doc_command -generate + html_docs.depends += generate_docs +} 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 + 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 + 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 +} |