doc.pri 3.51 KB
Newer Older
1 2
HELPGENERATOR = $$shell_path($$[QT_INSTALL_BINS]/qhelpgenerator) -platform minimal
QDOC_BIN = $$shell_path($$[QT_INSTALL_BINS]/qdoc)
3 4
QDOC_GLOBAL = QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS/src] QDOC_INDEX_DIR=$$[QT_INSTALL_DOCS]
COMPAT =
5

6 7
VERSION_TAG = $$replace(QTCREATOR_VERSION, "[-.]", )

8 9
isEmpty(LICENSE_TYPE):LICENSE_TYPE=opensource

10 11 12 13
# unset the installdir for qdoc, so we force generation
# of URLs for the links to the Qt documentation
QMAKE_DOCS_INSTALLDIR =

14 15 16 17 18
defineReplace(cmdEnv) {
    !equals(QMAKE_DIR_SEP, /): 1 ~= s,^(.*)$,(set \\1) &&,g
    return("$$1")
}

19
defineReplace(qdoc) {
20
    return("$$cmdEnv(SRCDIR=$$PWD OUTDIR=$$1 QTC_VERSION=$$QTCREATOR_VERSION QTC_VERSION_TAG=$$VERSION_TAG QTC_LICENSE_TYPE=$$LICENSE_TYPE $$QDOC_GLOBAL) $$QDOC_BIN")
con's avatar
con committed
21 22
}

23
QHP_FILE = $$OUT_PWD/doc/html/qtcreator.qhp
24
QCH_FILE = $$IDE_DOC_PATH/qtcreator.qch
con's avatar
con committed
25

26
HELP_DEP_FILES = $$PWD/src/qtcreator.qdoc \
27 28 29 30 31 32
                 $$PWD/config/compat.qdocconf \
                 $$PWD/config/macros.qdocconf \
                 $$PWD/config/qt-cpp-ignore.qdocconf \
                 $$PWD/config/qt-defines.qdocconf \
                 $$PWD/config/qt-html-templates.qdocconf \
                 $$PWD/config/qt-html-default-styles.qdocconf \
33
                 $$PWD/qtcreator$${COMPAT}.qdocconf
34

35
html_docs.commands = $$qdoc($$OUT_PWD/doc/html) $$PWD/qtcreator$${COMPAT}.qdocconf
36
html_docs.depends += $$HELP_DEP_FILES
con's avatar
con committed
37 38
html_docs.files = $$QHP_FILE

39
html_docs_online.commands = $$qdoc($$OUT_PWD/doc/html) $$PWD/qtcreator-online$${COMPAT}.qdocconf
40 41
html_docs_online.depends += $$HELP_DEP_FILES

42
qch_docs.commands = $$HELPGENERATOR -o \"$$QCH_FILE\" $$QHP_FILE
con's avatar
con committed
43 44
qch_docs.depends += html_docs

45
DEV_QHP_FILE = $$OUT_PWD/doc/html-dev/qtcreator-dev.qhp
46 47 48 49 50 51 52 53
DEV_QCH_FILE = $$IDE_DOC_PATH/qtcreator-dev.qch

DEV_HELP_DEP_FILES = \
    $$PWD/api/qtcreator-api.qdoc \
    $$PWD/api/coding-style.qdoc \
    $$PWD/api/external-tool-spec.qdoc \
    $$PWD/api/qtcreator-dev.qdoc \
    $$PWD/api/qtcreator-dev-wizards.qdoc \
54 55 56
    $$PWD/api/creating-plugins.qdoc \
    $$PWD/api/getting-and-building.qdoc \
    $$PWD/api/first-plugin.qdoc \
57
    $$PWD/api/plugin-metadata.qdoc \
58
    $$PWD/api/plugin-lifecycle.qdoc \
59
    $$PWD/api/pluginmanager.qdoc \
60
    $$PWD/api/qtcreator-dev$${COMPAT}.qdocconf
61

62
dev_html_docs.commands = $$qdoc($$OUT_PWD/doc/html-dev) $$PWD/api/qtcreator-dev$${COMPAT}.qdocconf
63 64
dev_html_docs.depends += $$DEV_HELP_DEP_FILES

65
dev_html_docs_online.commands = $$qdoc($$OUT_PWD/doc/html-dev) $$PWD/api/qtcreator-dev-online$${COMPAT}.qdocconf
66 67 68 69 70
dev_html_docs_online.depends += $$DEV_HELP_DEP_FILES

dev_qch_docs.commands = $$HELPGENERATOR -o \"$$DEV_QCH_FILE\" $$DEV_QHP_FILE
dev_qch_docs.depends += dev_html_docs

71
!macx {
72
    inst_qch_docs.files = $$QCH_FILE
Daniel Molkentin's avatar
Daniel Molkentin committed
73
    inst_qch_docs.path = $$QTC_PREFIX/share/doc/qtcreator
74
    inst_qch_docs.CONFIG += no_check_exist no_default_install
75
    INSTALLS += inst_qch_docs
76 77

    inst_dev_qch_docs.files = $$DEV_QCH_FILE
Daniel Molkentin's avatar
Daniel Molkentin committed
78
    inst_dev_qch_docs.path = $$QTC_PREFIX/share/doc/qtcreator
79
    inst_dev_qch_docs.CONFIG += no_check_exist no_default_install
80
    INSTALLS += inst_dev_qch_docs
81 82 83

    install_docs.depends = install_inst_qch_docs install_inst_dev_qch_docs
    QMAKE_EXTRA_TARGETS += install_docs
Daniel Molkentin's avatar
Daniel Molkentin committed
84 85
}

86 87 88
docs_online.depends = html_docs_online dev_html_docs_online
docs.depends = qch_docs dev_qch_docs
QMAKE_EXTRA_TARGETS += html_docs dev_html_docs html_docs_online dev_html_docs_online qch_docs dev_qch_docs docs docs_online
con's avatar
con committed
89

90
OTHER_FILES = $$HELP_DEP_FILES $$DEV_HELP_DEP_FILES
91 92

fixnavi.commands = \
93
    cd $$shell_path($$PWD) && \
94
    perl fixnavi.pl -Dqcmanual -Dqtquick src
95
QMAKE_EXTRA_TARGETS += fixnavi