summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/qt_docs_targets.prf
blob: 89f080cc5e344ac6bca11748a829f526e4e87a6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#
#  W A R N I N G
#  -------------
#
# This file is not part of the Qt API.  It exists purely as an
# implementation detail.  It may change from version to version
# without notice, or even be removed.
#
# We mean it.
#

DOC_TARGETS = \
    install_html_docs uninstall_html_docs \
    install_qch_docs uninstall_qch_docs \
    install_docs uninstall_docs \
    qch_docs

prepare_docs {
    DOC_TARGETS += prepare_docs generate_docs
    html_docs.commands = $(MAKE) -f $(MAKEFILE) prepare_docs && $(MAKE) -f $(MAKEFILE) generate_docs
    QMAKE_EXTRA_TARGETS += html_docs
} else {
    DOC_TARGETS += html_docs
}

docs.commands = $(MAKE) -f $(MAKEFILE) html_docs && $(MAKE) -f $(MAKEFILE) qch_docs
QMAKE_EXTRA_TARGETS += docs

contains(TEMPLATE, subdirs) {
    for(inst, DOC_TARGETS): \
        prepareRecursiveTarget($$inst)
} else:debug_and_release:!build_pass {
    sub = $$first(BUILDS)
    for(inst, DOC_TARGETS) {
        $${inst}.CONFIG = recursive
        $${inst}.recurse = $$sub
    }
} else {
    # apps and libs only generate docs if QMAKE_DOCS is set
    !isEmpty(QMAKE_DOCS) {
        # backwards compat hack
        load(qt_docs)
    }
}
QMAKE_EXTRA_TARGETS += $$DOC_TARGETS