~ubuntu-branches/ubuntu/wily/qtbase-opensource-src/wily

« back to all changes in this revision

Viewing changes to mkspecs/features/qt_docs.prf

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 12:46:17 UTC
  • Revision ID: package-import@ubuntu.com-20130205124617-c8jouts182j002fx
Tags: upstream-5.0.1+dfsg
ImportĀ upstreamĀ versionĀ 5.0.1+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
#  W A R N I N G
 
3
#  -------------
 
4
#
 
5
# This file is not part of the Qt API.  It exists purely as an
 
6
# implementation detail.  It may change from version to version
 
7
# without notice, or even be removed.
 
8
#
 
9
# We mean it.
 
10
#
 
11
 
 
12
!exists($$QMAKE_DOCS): error("Cannot find documentation specification file $$QMAKE_DOCS")
 
13
 
 
14
load(qt_build_paths)
 
15
QMAKE_DOCS_BASE_OUTDIR = $$MODULE_BASE_OUTDIR/doc
 
16
 
 
17
QMAKE_DOCS_TARGET = $$replace(QMAKE_DOCS, ^(.*/)?(.*)\\.qdocconf$, \\2)
 
18
isEmpty(QMAKE_DOCS_TARGETDIR): QMAKE_DOCS_TARGETDIR = $$QMAKE_DOCS_TARGET
 
19
QMAKE_DOCS_OUTPUTDIR = $$QMAKE_DOCS_BASE_OUTDIR/$$QMAKE_DOCS_TARGETDIR
 
20
 
 
21
qtPrepareTool(QDOC, qdoc)
 
22
for(qmod, QMAKEMODULES): \
 
23
    QDOC += -indexdir $$section(qmod, /, 0, -3)/doc
 
24
QDOC += -outputdir $$QMAKE_DOCS_OUTPUTDIR
 
25
!build_online_docs: \
 
26
    QDOC += -installdir $$[QT_INSTALL_DOCS]
 
27
doc_command = $$QDOC $$QMAKE_DOCS
 
28
prepare_docs {
 
29
    prepare_docs.commands += $$doc_command -prepare -no-link-errors
 
30
    generate_docs.commands += $$doc_command -generate
 
31
} else {
 
32
    html_docs.commands += $$doc_command
 
33
}
 
34
 
 
35
!build_online_docs {
 
36
    qtPrepareTool(QHELPGENERATOR, qhelpgenerator)
 
37
    qch_docs.commands = $$QHELPGENERATOR $$QMAKE_DOCS_OUTPUTDIR/$${QMAKE_DOCS_TARGET}.qhp -o $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch
 
38
 
 
39
    inst_html_docs.files = $$QMAKE_DOCS_OUTPUTDIR
 
40
    inst_html_docs.path = $$[QT_INSTALL_DOCS]
 
41
    inst_html_docs.CONFIG += no_check_exist directory no_default_install no_build
 
42
    INSTALLS += inst_html_docs
 
43
 
 
44
    inst_qch_docs.files = $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch
 
45
    inst_qch_docs.path = $$[QT_INSTALL_DOCS]
 
46
    inst_qch_docs.CONFIG += no_check_exist no_default_install no_build
 
47
    INSTALLS += inst_qch_docs
 
48
 
 
49
    install_html_docs.depends = install_inst_html_docs
 
50
    uninstall_html_docs.depends = uninstall_inst_html_docs
 
51
    install_qch_docs.depends = install_inst_qch_docs
 
52
    uninstall_qch_docs.depends = uninstall_inst_qch_docs
 
53
    install_docs.depends = install_html_docs install_qch_docs
 
54
    uninstall_docs.depends = uninstall_html_docs uninstall_qch_docs
 
55
}