doc.pri 2.03 KB
Newer Older
1 2
unix:QDOC_BIN = $$(QTDIR)/bin/qdoc3
win32:QDOC_BIN = $$(QTDIR)/bin/qdoc3.exe
3 4
win32:QDOC_BIN = $$replace(QDOC_BIN, "/", "\\")

5
# legacy branch, can be dropped as soon as we depend on Qt 4.6
6
!exists( $$QDOC_BIN ) {
7 8 9 10 11 12 13 14 15
    unix:QDOC_BIN = $$(QTDIR)/tools/qdoc3/qdoc3
    win32 { 
        QDOC_BIN = $$(QTDIR)/tools/qdoc3/release/qdoc3.exe
        QDOC_BIN = $$replace(QDOC_BIN, "/", "\\")
        !exists( $$QDOC_BIN ) {
            QDOC_BIN = $$(QTDIR)/tools/qdoc3/debug/qdoc3.exe
            QDOC_BIN = $$replace(QDOC_BIN, "/", "\\")
        }
    }
16 17
}

con's avatar
con committed
18
unix {
19
    QDOC = SRCDIR=$$PWD OUTDIR=$$OUT_PWD/doc/html $$QDOC_BIN 
20
    HELPGENERATOR = $$(QTDIR)/bin/qhelpgenerator
con's avatar
con committed
21
} else {
22 23 24 25
    QDOC = set SRCDIR=$$PWD&& set OUTDIR=$$OUT_PWD/doc/html&& $$QDOC_BIN
    # Always run qhelpgenerator inside its own cmd; this is a workaround for
    # an unusual bug which causes qhelpgenerator.exe to do nothing
    HELPGENERATOR = cmd /C $$(QTDIR)\bin\qhelpgenerator.exe
con's avatar
con committed
26 27
}

28
QHP_FILE = $$OUT_PWD/doc/html/qtcreator.qhp
29
QCH_FILE = $$OUT_PWD/share/doc/qtcreator/qtcreator.qch
con's avatar
con committed
30

31 32 33
unix {
html_docs.commands = $$QDOC $$PWD/qtcreator.qdocconf
} else {
34
html_docs.commands = \"$$QDOC $$PWD/qtcreator.qdocconf\"
35
}
con's avatar
con committed
36 37 38 39 40 41 42
html_docs.depends += $$PWD/qtcreator.qdoc $$PWD/qtcreator.qdocconf
html_docs.files = $$QHP_FILE

qch_docs.commands = $$HELPGENERATOR -o $$QCH_FILE $$QHP_FILE
qch_docs.depends += html_docs
qch_docs.files = $$QCH_FILE

43 44 45
unix:!macx {
    system("mkdir -p `dirname $$QCH_FILE` && touch $$QCH_FILE")

Daniel Molkentin's avatar
Daniel Molkentin committed
46 47 48 49
    qch_docs.path = /share/doc/qtcreator
    INSTALLS += qch_docs
}

50
macx {
51 52
    DOC_DIR = "$${OUT_PWD}/bin/Qt Creator.app/Contents/Resources/doc"
    cp_docs.commands = mkdir -p \"$${DOC_DIR}\" ; $${QMAKE_COPY} \"$${QCH_FILE}\" \"$${DOC_DIR}\"
53 54 55 56 57 58 59 60
    cp_docs.depends += qch_docs
    docs.depends = cp_docs
    QMAKE_EXTRA_TARGETS += html_docs qch_docs cp_docs docs
}
!macx {
    docs.depends = qch_docs
    QMAKE_EXTRA_TARGETS += html_docs qch_docs docs
}
con's avatar
con committed
61

62 63
OTHER_FILES = qtcreator.qdoc \
              qtcreator.qdocconf
con's avatar
con committed
64 65
OTHER_FILES += api/qtcreator-api.qdoc \
               api/qtcreator-api.qdocconf