doc.pri 3.82 KB
Newer Older
1
greaterThan(QT_MAJOR_VERSION, 4) {
2
    HELPGENERATOR = $$targetPath($$[QT_INSTALL_BINS]/qhelpgenerator) -platform minimal
3
    QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc)
4
    QDOC_GLOBAL = QT_INSTALL_DOCS=$$[QT_INSTALL_DOCS/src] QDOC_INDEX_DIR=$$[QT_INSTALL_DOCS]
5
    COMPAT =
6
} else {
7
    HELPGENERATOR = $$targetPath($$[QT_INSTALL_BINS]/qhelpgenerator)
8
    QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc3)
9
    QDOC_GLOBAL = QDOC_INDEX_DIR=dummy   # this will be ignored. we don't link qt4 docs any more.
10
    COMPAT = -qt4
11 12
}

13

14 15
VERSION_TAG = $$replace(QTCREATOR_VERSION, "[-.]", )

16 17
isEmpty(LICENSE_TYPE):LICENSE_TYPE=opensource

18 19 20 21
# unset the installdir for qdoc, so we force generation
# of URLs for the links to the Qt documentation
QMAKE_DOCS_INSTALLDIR =

22 23 24 25 26
defineReplace(cmdEnv) {
    !equals(QMAKE_DIR_SEP, /): 1 ~= s,^(.*)$,(set \\1) &&,g
    return("$$1")
}

27
defineReplace(qdoc) {
28
    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
29 30
}

31
QHP_FILE = $$OUT_PWD/doc/html/qtcreator.qhp
32
QCH_FILE = $$IDE_DOC_PATH/qtcreator.qch
con's avatar
con committed
33

34
HELP_DEP_FILES = $$PWD/src/qtcreator.qdoc \
35 36 37 38 39 40
                 $$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 \
41
                 $$PWD/qtcreator$${COMPAT}.qdocconf
42

43
html_docs.commands = $$qdoc($$OUT_PWD/doc/html) $$PWD/qtcreator$${COMPAT}.qdocconf
44
html_docs.depends += $$HELP_DEP_FILES
con's avatar
con committed
45 46
html_docs.files = $$QHP_FILE

47
html_docs_online.commands = $$qdoc($$OUT_PWD/doc/html) $$PWD/qtcreator-online$${COMPAT}.qdocconf
48 49
html_docs_online.depends += $$HELP_DEP_FILES

50
qch_docs.commands = $$HELPGENERATOR -o \"$$QCH_FILE\" $$QHP_FILE
con's avatar
con committed
51 52
qch_docs.depends += html_docs

53
DEV_QHP_FILE = $$OUT_PWD/doc/html-dev/qtcreator-dev.qhp
54 55 56 57 58 59 60 61
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 \
62 63 64
    $$PWD/api/creating-plugins.qdoc \
    $$PWD/api/getting-and-building.qdoc \
    $$PWD/api/first-plugin.qdoc \
65
    $$PWD/api/plugin-specifications.qdoc \
66
    $$PWD/api/plugin-lifecycle.qdoc \
67
    $$PWD/api/pluginmanager.qdoc \
68
    $$PWD/api/qtcreator-dev$${COMPAT}.qdocconf
69

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

73
dev_html_docs_online.commands = $$qdoc($$OUT_PWD/doc/html-dev) $$PWD/api/qtcreator-dev-online$${COMPAT}.qdocconf
74 75 76 77 78
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

79
!macx {
80
    inst_qch_docs.files = $$QCH_FILE
Daniel Molkentin's avatar
Daniel Molkentin committed
81
    inst_qch_docs.path = $$QTC_PREFIX/share/doc/qtcreator
82
    inst_qch_docs.CONFIG += no_check_exist no_default_install
83
    INSTALLS += inst_qch_docs
84 85

    inst_dev_qch_docs.files = $$DEV_QCH_FILE
Daniel Molkentin's avatar
Daniel Molkentin committed
86
    inst_dev_qch_docs.path = $$QTC_PREFIX/share/doc/qtcreator
87
    inst_dev_qch_docs.CONFIG += no_check_exist no_default_install
88
    INSTALLS += inst_dev_qch_docs
89 90 91

    install_docs.depends = install_inst_qch_docs install_inst_dev_qch_docs
    QMAKE_EXTRA_TARGETS += install_docs
Daniel Molkentin's avatar
Daniel Molkentin committed
92 93
}

94 95 96
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
97

98
OTHER_FILES = $$HELP_DEP_FILES $$DEV_HELP_DEP_FILES
99 100 101

fixnavi.commands = \
    cd $$targetPath($$PWD) && \
102
    perl fixnavi.pl -Dqcmanual -Dqtquick src
103
QMAKE_EXTRA_TARGETS += fixnavi