doc.pri 3.96 KB
Newer Older
1
greaterThan(QT_MAJOR_VERSION, 4) {
2
    HELPGENERATOR = $$targetPath($$[QT_INSTALL_BINS]/qhelpgenerator) -platform minimal
3 4
    QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc)
} else {
5
    HELPGENERATOR = $$targetPath($$[QT_INSTALL_BINS]/qhelpgenerator)
6 7 8
    QDOC_BIN = $$targetPath($$[QT_INSTALL_BINS]/qdoc3)
}

9

10 11
VERSION_TAG = $$replace(QTCREATOR_VERSION, "[-.]", )

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

16 17 18 19 20 21 22 23 24 25 26 27 28 29
defineReplace(qdoc) {
    equals(QMAKE_DIR_SEP, /) {   # unix, mingw+msys
        QDOC = SRCDIR=$$PWD OUTDIR=$$1 QTC_VERSION=$$QTCREATOR_VERSION QTC_VERSION_TAG=$$VERSION_TAG $$QDOC_BIN
    } else:win32-g++* {   # just mingw
        # The lack of spaces in front of the && is necessary!
        QDOC = set SRCDIR=$$PWD&& set OUTDIR=$$1&& set QTC_VERSION=$$QTCREATOR_VERSION&& set QTC_VERSION_TAG=$$VERSION_TAG&& $$QDOC_BIN
    } else {   # nmake
        QDOC = set SRCDIR=$$PWD $$escape_expand(\\n\\t) \
               set OUTDIR=$$1 $$escape_expand(\\n\\t) \
               set QTC_VERSION=$$QTCREATOR_VERSION $$escape_expand(\\n\\t) \
               set QTC_VERSION_TAG=$$VERSION_TAG $$escape_expand(\\n\\t) \
               $$QDOC_BIN
    }
    return($$QDOC)
con's avatar
con committed
30 31
}

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

35
HELP_DEP_FILES = $$PWD/src/qtcreator.qdoc \
36
                 $$PWD/addressbook-sdk.qdoc \
37 38 39 40 41 42
                 $$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 \
43
                 $$PWD/qtcreator.qdocconf
44

45
html_docs.commands = $$qdoc($$OUT_PWD/doc/html) $$PWD/qtcreator.qdocconf
46
html_docs.depends += $$HELP_DEP_FILES
con's avatar
con committed
47 48
html_docs.files = $$QHP_FILE

49
html_docs_online.commands = $$qdoc($$OUT_PWD/doc/html) $$PWD/qtcreator-online.qdocconf
50 51
html_docs_online.depends += $$HELP_DEP_FILES

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

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

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

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

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

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

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

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

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

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