diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2017-01-20 14:10:16 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2017-01-23 12:24:35 +0000 |
commit | 3f76c27847c157a0292a4caf73617f7d1d86edef (patch) | |
tree | f4e488b25a0115228a27e9fb7dccf99c71e658a8 /doc/doc.pri | |
parent | 6f7ad4f7efed8b41e6eb75bca3132a7ffdbff461 (diff) | |
download | qbs-3f76c27847c157a0292a4caf73617f7d1d86edef.tar.gz |
Make the documentation includable by other projects (qmake build)
Other projects (e.g. Qt Creator) can now build and install the qbs
documentation by including doc_targets.pri and setting the variables
QBS_DOCS_INSTALL_DIR and QBS_DOCS_BUILD_DIR.
By overriding QBS_DOCS_INSTALL_DIR users can also specify an alternative
documentation installation location for qbs itself.
Task-number: QBS-856
Task-number: QTCREATORBUG-13124
Change-Id: Ie490977b041936228f60885f519de77da10de109
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'doc/doc.pri')
-rw-r--r-- | doc/doc.pri | 65 |
1 files changed, 15 insertions, 50 deletions
diff --git a/doc/doc.pri b/doc/doc.pri index 4a7280586..655897069 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -8,56 +8,21 @@ QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc) QDOC_MAINFILE = $$PWD/qbs.qdocconf HELPGENERATOR = $$targetPath($$[QT_INSTALL_BINS]/qhelpgenerator) -VERSION_TAG = $$replace(QBS_VERSION, "[-.]", ) - -HTML_DOC_PATH=$$OUT_PWD/doc/html -equals(QMAKE_DIR_SEP, /) { # unix, mingw+msys - QDOC = SRCDIR=$$PWD OUTDIR=$$HTML_DOC_PATH QBS_VERSION=$$QBS_VERSION QBS_VERSION_TAG=$$VERSION_TAG QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS] $$QDOC_BIN -} else:win32-g++* { # just mingw - # The lack of spaces in front of the && is necessary! - QDOC = set SRCDIR=$$PWD&& set OUTDIR=$$HTML_DOC_PATH&& set QBS_VERSION=$$QBS_VERSION&& set QBS_VERSION_TAG=$$VERSION_TAG&& set QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS]&& $$QDOC_BIN -} else { # nmake - QDOC = set SRCDIR=$$PWD $$escape_expand(\\n\\t) \ - set OUTDIR=$$HTML_DOC_PATH $$escape_expand(\\n\\t) \ - set QBS_VERSION=$$QBS_VERSION $$escape_expand(\\n\\t) \ - set QBS_VERSION_TAG=$$VERSION_TAG $$escape_expand(\\n\\t) \ - set QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS] $$escape_expand(\\n\\t) \ - $$QDOC_BIN -} - -QHP_FILE = $$HTML_DOC_PATH/qbs.qhp -QCH_FILE = $$OUT_PWD/doc/qbs.qch - -HELP_DEP_FILES = $$PWD/qbs.qdoc \ - $$QDOC_MAINFILE - -html_docs.commands = $$QDOC $$PWD/qbs.qdocconf -html_docs.depends += $$HELP_DEP_FILES - -html_docs_online.commands = $$QDOC $$PWD/qbs-online.qdocconf -html_docs_online.files = $$QHP_FILE - -qch_docs.commands = $$HELPGENERATOR -o $$shell_quote($$QCH_FILE) $$QHP_FILE -qch_docs.depends += html_docs - -docs_online.depends = html_docs_online -QMAKE_EXTRA_TARGETS += html_docs_online docs_online - -inst_qch_docs.files = $$QCH_FILE -inst_qch_docs.path = $${QBS_INSTALL_PREFIX}/share/doc/qbs -inst_qch_docs.CONFIG += no_check_exist no_default_install -INSTALLS += inst_qch_docs - -inst_html_docs.files = $$HTML_DOC_PATH -inst_html_docs.path = $$inst_qch_docs.path -inst_html_docs.CONFIG += no_check_exist no_default_install directory -INSTALLS += inst_html_docs - -install_docs.depends = install_inst_qch_docs install_inst_html_docs -QMAKE_EXTRA_TARGETS += install_docs - -docs.depends = qch_docs -QMAKE_EXTRA_TARGETS += html_docs qch_docs docs +include(doc_targets.pri) + +html_docs.depends = qbs_html_docs +html_docs_online.depends = qbs_html_docs_online +qch_docs.depends = qbs_qch_docs +docs_online.depends = qbs_docs_online +install_docs.depends = qbs_install_docs +docs.depends = qbs_docs +QMAKE_EXTRA_TARGETS += \ + docs \ + docs_online \ + html_docs \ + html_docs_online \ + install_docs \ + qch_docs fixnavi.commands = \ cd $$targetPath($$PWD) && \ |