doc.pri 1.87 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
    QDOC = set SRCDIR=$$PWD&& set OUTDIR=$$OUT_PWD/doc/html&& $$QDOC_BIN 
23
    HELPGENERATOR = $$(QTDIR)\bin\qhelpgenerator.exe
con's avatar
con committed
24 25
}

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

29 30 31
unix {
html_docs.commands = $$QDOC $$PWD/qtcreator.qdocconf
} else {
32
html_docs.commands = \"$$QDOC $$PWD/qtcreator.qdocconf\"
33
}
con's avatar
con committed
34 35 36 37 38 39 40
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

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

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

48
macx {
con's avatar
con committed
49 50
    DOC_DIR = $${OUT_PWD}/bin/QtCreator.app/Contents/Resources/doc 
    cp_docs.commands = mkdir -p $${DOC_DIR} ; $${QMAKE_COPY} $${QCH_FILE} $${DOC_DIR}
51 52 53 54 55 56 57 58
    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
59

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