Commit 41236d29 authored by con's avatar con
Browse files

Allow creating the api and pluginhowto documentation with qmake && make.

This copies the technique used for the app resources in share/qtcreator.
Also use the Qt style for the plugin howto.
parent 1aeef8d9
TEMPLATE = app
TARGET = apidoc
CONFIG -= qt
QT =
LIBS =
macx:CONFIG -= app_bundle
isEmpty(vcproj) {
QMAKE_LINK = @: IGNORE THIS LINE
OBJECTS_DIR =
win32:CONFIG -= embed_manifest_exe
} else {
CONFIG += console
PHONY_DEPS = .
phony_src.input = PHONY_DEPS
phony_src.output = phony.c
phony_src.variable_out = GENERATED_SOURCES
phony_src.commands = echo int main() { return 0; } > phony.c
phony_src.name = CREATE phony.c
phony_src.CONFIG += combine
QMAKE_EXTRA_COMPILERS += phony_src
}
QDOC_BIN = $$[QT_INSTALL_BINS]/qdoc3
equals(QMAKE_DIR_SEP, /) { # unix, mingw+msys
QDOC = SRCDIR=$$PWD OUTDIR=$$OUT_PWD/html $$QDOC_BIN
} else:win32-g++* { # just mingw
# The lack of spaces in front of the && is necessary!
QDOC = set SRCDIR=$$PWD&& set OUTDIR=$$OUT_PWD/html&& $$QDOC_BIN
} else { # nmake
QDOC = set SRCDIR=$$PWD $$escape_expand(\\n\\t) \
set OUTDIR=$$OUT_PWD/html $$escape_expand(\\n\\t) \
$$QDOC_BIN
}
HELP_FILES = $$PWD/qtcreator-api.qdocconf
HELP_DEP_FILES = $$PWD/qtcreator-api.qdoc \
$$PWD/../qt-defines.qdocconf \
$$PWD/../qt-html-templates.qdocconf \
$$PWD/qtcreator-api.qdocconf
docs.name = CREATE API DOC
docs.input = HELP_FILES
docs.output = $$OUT_PWD/index.html
docs.depends = $$HELP_DEP_FILES
win32:docs.commands = $$QDOC \"${QMAKE_FILE_IN}\"
unix:docs.commands = $$QDOC ${QMAKE_FILE_IN}
docs.CONFIG += no_link
isEmpty(vcproj):docs.variable_out = PRE_TARGETDEPS
QMAKE_EXTRA_COMPILERS += docs
TEMPLATE = app
TARGET = pluginhowto
CONFIG -= qt
QT =
LIBS =
macx:CONFIG -= app_bundle
isEmpty(vcproj) {
QMAKE_LINK = @: IGNORE THIS LINE
OBJECTS_DIR =
win32:CONFIG -= embed_manifest_exe
} else {
CONFIG += console
PHONY_DEPS = .
phony_src.input = PHONY_DEPS
phony_src.output = phony.c
phony_src.variable_out = GENERATED_SOURCES
phony_src.commands = echo int main() { return 0; } > phony.c
phony_src.name = CREATE phony.c
phony_src.CONFIG += combine
QMAKE_EXTRA_COMPILERS += phony_src
}
QDOC_BIN = $$[QT_INSTALL_BINS]/qdoc3
equals(QMAKE_DIR_SEP, /) { # unix, mingw+msys
QDOC = SRCDIR=$$PWD OUTDIR=$$OUT_PWD/html $$QDOC_BIN
} else:win32-g++* { # just mingw
# The lack of spaces in front of the && is necessary!
QDOC = set SRCDIR=$$PWD&& set OUTDIR=$$OUT_PWD/html&& $$QDOC_BIN
} else { # nmake
QDOC = set SRCDIR=$$PWD $$escape_expand(\\n\\t) \
set OUTDIR=$$OUT_PWD/html $$escape_expand(\\n\\t) \
$$QDOC_BIN
}
HELP_FILES = $$PWD/qtcreator-pluginhowto.qdocconf
HELP_DEP_FILES = $$PWD/adv-find-filter.qdoc \
$$PWD/editor-type.qdoc \
$$PWD/find-filter.qdoc \
$$PWD/find-support.qdoc \
$$PWD/first-plugin.qdoc \
$$PWD/location-filter.qdoc \
$$PWD/menu.qdoc \
$$PWD/mode.qdoc \
$$PWD/nav-widget.qdoc \
$$PWD/pref-pane.qdoc \
$$PWD/progress.qdoc \
$$PWD/project-file-wizard.qdoc \
$$PWD/qtc-arch.qdoc \
$$PWD/qtc-project-plugin.qdoc \
$$PWD/qtcreator-compile.qdoc \
$$PWD/qtcreator-pluginhowto.qdoc \
$$PWD/vcs.qdoc \
$$PWD/../qt-defines.qdocconf \
$$PWD/../qt-html-templates.qdocconf \
$$PWD/qtcreator-pluginhowto.qdocconf
docs.name = CREATE API DOC
docs.input = HELP_FILES
docs.output = $$OUT_PWD/index.html
docs.depends = $$HELP_DEP_FILES
win32:docs.commands = $$QDOC \"${QMAKE_FILE_IN}\"
unix:docs.commands = $$QDOC ${QMAKE_FILE_IN}
docs.CONFIG += no_link
isEmpty(vcproj):docs.variable_out = PRE_TARGETDEPS
QMAKE_EXTRA_COMPILERS += docs
project = Qt Creator Plugin HOWTO API
# Run qdoc from the directory that contains this file.
include(../qt-html-templates.qdocconf)
project = Qt Creator Plugin HOWTO
description = Qt Creator Plugin HOWTO Documentation
language = Cpp
headerdirs =
sourcedirs = $SRCDIR
imagedirs = $SRCDIR/images $SRCDIR/templates/images
outputdir = $OUTDIR
exampledirs = $SRCDIR
indexes = ../qt.index
sources.fileextensions = "*.qdoc"
sourcedirs = .
include(../qt-defines.qdocconf)
imagedirs = images
sources.fileextensions = *.qdoc
indexes = $QTDIR/doc/html/qt.index
# macros.qdocconf
outputdir = ./html
base = file:./html
versionsym = 1.3.1
codeindent = 1
tabsize = 4
macro.aring.HTML = "å"
macro.Auml.HTML = "Ä"
macro.author = "\\bold{Author:}"
macro.br.HTML = "<br />"
macro.BR.HTML = "<br />"
macro.aacute.HTML = "&aacute;"
macro.eacute.HTML = "&eacute;"
macro.iacute.HTML = "&iacute;"
macro.gui = "\\bold"
macro.hr.HTML = "<hr />"
macro.key = "\\bold"
macro.menu = "\\bold"
macro.note = "\\bold{Note:}"
macro.oslash.HTML = "&oslash;"
macro.ouml.HTML = "&ouml;"
macro.QA = "\\e{Qt Assistant}"
macro.QD = "\\e{Qt Designer}"
macro.QL = "\\e{Qt Linguist}"
macro.QC = "\\e{Qt Creator}"
macro.QMLD = "\\e{Qt Quick Designer}"
macro.QQV = "\\e{Qt QML Viewer}"
macro.param = "\\e"
macro.raisedaster.HTML = "<sup>*</sup>"
macro.reg.HTML = "<sup>&reg;</sup>"
macro.return = "Returns"
macro.starslash = "\\c{*/}"
macro.uuml.HTML = "&uuml;"
macro.mdash.HTML = "&mdash;"
## compat.qdocconf
alias.i = e
alias.include = input
# compat.qdocconf
alias.i = e
alias.include = input
macro.0 = "\\\\0"
macro.b = "\\\\b"
......@@ -44,40 +75,16 @@ macro.i81 = "\\o{8,1}"
macro.i91 = "\\o{9,1}"
macro.img = "\\image"
macro.endquote = "\\endquotation"
macro.relatesto = "\\relates"
spurious = "Missing comma in .*" \
"Missing pattern .*"
spurious = "Missing comma in .*" \
"Missing pattern .*"
# Doxygen compatibility commands
## macros.qdocconf
macro.aring.HTML = "&aring;"
macro.Auml.HTML = "&Auml;"
macro.author = "\\bold{Author:}"
macro.br.HTML = "<br />"
macro.BR.HTML = "<br />"
macro.aacute.HTML = "&aacute;"
macro.eacute.HTML = "&eacute;"
macro.iacute.HTML = "&iacute;"
macro.gui = "\\bold"
macro.hr.HTML = "<hr />"
macro.key = "\\bold"
macro.menu = "\\bold"
macro.note = "\\bold{Note:}"
macro.oslash.HTML = "&oslash;"
macro.ouml.HTML = "&ouml;"
macro.QA = "\\e{Qt Assistant}"
macro.QD = "\\e{Qt Designer}"
macro.QL = "\\e{Qt Linguist}"
macro.QC = "\\e{Qt Creator}"
macro.param = "\\e"
macro.raisedaster.HTML = "<sup>*</sup>"
macro.reg.HTML = "<sup>&reg;</sup>"
macro.return = "Returns"
macro.starslash = "\\c{*/}"
macro.uuml.HTML = "&uuml;"
macro.mdash.HTML = "&mdash;"
macro.see = "\\sa"
macro.function = "\\fn"
# qt-cpp-ignore.qdocconf
## qt-cpp-ignore.qdocconf
Cpp.ignoretokens = QAXFACTORY_EXPORT \
QDESIGNER_COMPONENTS_LIBRARY \
QDESIGNER_EXTENSION_LIBRARY \
......@@ -112,7 +119,6 @@ Cpp.ignoretokens = QAXFACTORY_EXPORT \
Q_EXPORT_CODECS_KR \
Q_EXPORT_PLUGIN \
Q_GFX_INLINE \
Q_AUTOTEST_EXPORT \
Q_GUI_EXPORT \
Q_GUI_EXPORT_INLINE \
Q_GUI_EXPORT_STYLE_CDE \
......@@ -134,7 +140,6 @@ Cpp.ignoretokens = QAXFACTORY_EXPORT \
Q_SQL_EXPORT \
Q_SVG_EXPORT \
Q_SCRIPT_EXPORT \
Q_SCRIPTTOOLS_EXPORT \
Q_TESTLIB_EXPORT \
Q_TYPENAME \
Q_XML_EXPORT \
......@@ -145,7 +150,8 @@ Cpp.ignoretokens = QAXFACTORY_EXPORT \
QT_BEGIN_INCLUDE_NAMESPACE \
QT_END_NAMESPACE \
QT_END_INCLUDE_NAMESPACE \
PHONON_EXPORT
PHONON_EXPORT \
EXTENSIONSYSTEM_EXPORT
Cpp.ignoredirectives = Q_DECLARE_HANDLE \
Q_DECLARE_INTERFACE \
Q_DECLARE_METATYPE \
......@@ -166,56 +172,3 @@ Cpp.ignoredirectives = Q_DECLARE_HANDLE \
PHONON_OBJECT \
PHONON_HEIR
## qt-html-templates.qdocconf
HTML.stylesheets = classic.css
HTML.postheader = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n" \
"<tr>\n" \
"<td align=\"left\" valign=\"top\" width=\"32\">" \
"<a href=\"http://www.trolltech.com/products/qt\"><img src=\"images/qt-logo.png\" align=\"left\" border=\"0\" /></a>" \
"</td>\n" \
"<td width=\"1\">&nbsp;&nbsp;</td>" \
"<td class=\"postheader\" valign=\"center\">" \
"<a href=\"index.html\">" \
"<font color=\"#004faf\">Home</font></a>&nbsp;&middot;" \
" <a href=\"namespaces.html\">" \
"<font color=\"#004faf\">All&nbsp;Namespaces</font></a>&nbsp;&middot;" \
" <a href=\"classes.html\">" \
"<font color=\"#004faf\">All&nbsp;Classes</font></a>&nbsp;&middot;" \
" <a href=\"mainclasses.html\">" \
"<font color=\"#004faf\">Main&nbsp;Classes</font></a>&nbsp;&middot;" \
" <a href=\"groups.html\">" \
"<font color=\"#004faf\">Grouped&nbsp;Classes</font></a>&nbsp;&middot;" \
" <a href=\"modules.html\">" \
"<font color=\"#004faf\">Modules</font></a>&nbsp;&middot;" \
" <a href=\"functions.html\">" \
"<font color=\"#004faf\">Functions</font></a>" \
"</td>\n" \
"<td align=\"right\" valign=\"top\" width=\"230\"></td></tr></table>"
HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
"<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \
"<td width=\"30%\" align=\"left\">Copyright &copy; 2010 Nokia Corporation " \
"and/or its subsidiary(-ies)</td>\n" \
"<td width=\"40%\" align=\"center\"><a href=\"trademarks.html\">Trademarks</a></td>\n" \
"<td width=\"30%\" align=\"right\"><div align=\"right\">Qt Creator Plugin HOWTO\\version</div></td>\n" \
"</tr></table></div></address>"
## qt-defines.qdocconf
defines = Q_QDOC \
QT_.*_SUPPORT \
QT_.*_LIB \
QT_COMPAT \
QT_KEYPAD_NAVIGATION \
QT3_SUPPORT \
Q_WS_.* \
Q_OS_.* \
Q_BYTE_ORDER \
QT_DEPRECATED \
Q_NO_USING_KEYWORD \
__cplusplus
# Files not referenced in any qdoc file (last four needed by qtdemo)
# See also qhp.Qt.extraFiles
extraimages.HTML = qt-logo \
trolltech-logo
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment