doc.pri 1.64 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, "/", "\\")

con's avatar
con committed
5
unix {
6
    QDOC = SRCDIR=$$PWD OUTDIR=$$OUT_PWD/doc/html $$QDOC_BIN 
7
    HELPGENERATOR = $$(QTDIR)/bin/qhelpgenerator
con's avatar
con committed
8
} else {
9 10 11 12
    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
13 14
}

15
QHP_FILE = $$OUT_PWD/doc/html/qtcreator.qhp
16
QCH_FILE = $$OUT_PWD/share/doc/qtcreator/qtcreator.qch
con's avatar
con committed
17

18 19 20
unix {
html_docs.commands = $$QDOC $$PWD/qtcreator.qdocconf
} else {
21
html_docs.commands = \"$$QDOC $$PWD/qtcreator.qdocconf\"
22
}
con's avatar
con committed
23 24 25 26 27 28 29
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

30 31 32
unix:!macx {
    system("mkdir -p `dirname $$QCH_FILE` && touch $$QCH_FILE")

Daniel Molkentin's avatar
Daniel Molkentin committed
33 34 35 36
    qch_docs.path = /share/doc/qtcreator
    INSTALLS += qch_docs
}

37
macx {
38 39
    DOC_DIR = "$${OUT_PWD}/bin/Qt Creator.app/Contents/Resources/doc"
    cp_docs.commands = mkdir -p \"$${DOC_DIR}\" ; $${QMAKE_COPY} \"$${QCH_FILE}\" \"$${DOC_DIR}\"
40 41 42 43 44 45 46 47
    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
48

49 50 51 52
OTHER_FILES = $$PWD/qtcreator.qdoc \
              $$PWD/qtcreator.qdocconf
OTHER_FILES += $$PWD/api/qtcreator-api.qdoc \
               $$PWD/api/qtcreator-api.qdocconf