[Qt] Modularize documentation for QtWebKit
authorvestbo@webkit.org <vestbo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Oct 2012 08:38:19 +0000 (08:38 +0000)
committervestbo@webkit.org <vestbo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Oct 2012 08:38:19 +0000 (08:38 +0000)
Running 'make docs' would fail unless 'make qmake_all' was ran first,
but qmake_all involved generating all the derived sources, which seems
overly complex just for building documentation.

We solve this by preventing all subdirs except QtWebKit from having a
docs target. This would normally work fine on its own, but since we
use CONFIG += ordered, there's now a missing doc target for the
immediate dependency of the QtWebKit subdir. We solve this by adding
a dummy-target ourselves.

Finally, we clean up the qdocconf file to match the rest of the Qt
documentation modularization efforts.

Reviewed by Simon Hausmann.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131716 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/QtWebKit.pro
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/docs/docs.pri [deleted file]
Source/WebKit/qt/docs/qtwebkit.qdocconf [deleted file]
Source/api.pri
Source/qtwebkit.qdocconf [new file with mode: 0644]
Tools/ChangeLog
Tools/qmake/mkspecs/features/default_post.prf

index dd8dc38..d94b350 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2012-10-17  Tor Arne Vestbø  <tor.arne.vestbo@digia.com>
+
+        [Qt] Modularize documentation for QtWebKit
+
+        Running 'make docs' would fail unless 'make qmake_all' was ran first,
+        but qmake_all involved generating all the derived sources, which seems
+        overly complex just for building documentation.
+
+        We solve this by preventing all subdirs except QtWebKit from having a
+        docs target. This would normally work fine on its own, but since we
+        use CONFIG += ordered, there's now a missing doc target for the
+        immediate dependency of the QtWebKit subdir. We solve this by adding
+        a dummy-target ourselves.
+
+        Finally, we clean up the qdocconf file to match the rest of the Qt
+        documentation modularization efforts.
+
+        Reviewed by Simon Hausmann.
+
+        * Source/QtWebKit.pro:
+        * Source/api.pri:
+        * Source/qtwebkit.qdocconf: Added.
+
 2012-10-17  Grzegorz Czajkowski  <g.czajkowski@samsung.com>, Michal Roj <m.roj@sasmung.com>
 
         [WK2][EFL] Implementation of spellchecking feature.
index b158625..59f9a0d 100644 (file)
@@ -19,8 +19,6 @@ build?(webkit2) {
     }
 }
 
-include(WebKit/qt/docs/docs.pri)
-
 declarative.file = WebKit/qt/declarative/declarative.pro
 declarative.makefile = Makefile.declarative
 have?(QTQUICK): SUBDIRS += declarative
index 177837e..06bb322 100644 (file)
@@ -1,3 +1,25 @@
+2012-10-17  Tor Arne Vestbø  <tor.arne.vestbo@digia.com>
+
+        [Qt] Modularize documentation for QtWebKit
+
+        Running 'make docs' would fail unless 'make qmake_all' was ran first,
+        but qmake_all involved generating all the derived sources, which seems
+        overly complex just for building documentation.
+
+        We solve this by preventing all subdirs except QtWebKit from having a
+        docs target. This would normally work fine on its own, but since we
+        use CONFIG += ordered, there's now a missing doc target for the
+        immediate dependency of the QtWebKit subdir. We solve this by adding
+        a dummy-target ourselves.
+
+        Finally, we clean up the qdocconf file to match the rest of the Qt
+        documentation modularization efforts.
+
+        Reviewed by Simon Hausmann.
+
+        * docs/docs.pri: Removed.
+        * docs/qtwebkit.qdocconf: Removed.
+
 2012-10-15  Simon Hausmann  <simon.hausmann@digia.com>
 
         [Qt] Separate Qt WebKit into Qt WebKit and Qt WebKit Widgets
diff --git a/Source/WebKit/qt/docs/docs.pri b/Source/WebKit/qt/docs/docs.pri
deleted file mode 100644 (file)
index 58704cc..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-qtPrepareTool(QDOC, qdoc)
-
-QDOC = SRCDIR=$$PWD/../../.. OUTPUT_DIR=$${ROOT_BUILD_DIR} $$QDOC
-
-docs.commands = $$QDOC $$PWD/qtwebkit.qdocconf
-
-QMAKE_EXTRA_TARGETS += docs
diff --git a/Source/WebKit/qt/docs/qtwebkit.qdocconf b/Source/WebKit/qt/docs/qtwebkit.qdocconf
deleted file mode 100644 (file)
index adf5cbf..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-# Run qdoc from the directory that contains this file.
-
-project     = qtwebkit
-description = "Qt WebKit API Documentation"
-
-headerdirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit2/UIProcess/API/qt
-sourcedirs = $SRCDIR/WebKit/qt/Api $SRCDIR/WebKit/qt/docs $SRCDIR/Source/JavaScriptCore/qt/api $SRCDIR/WebKit2/UIProcess/API/qt
-outputdir = $OUTPUT_DIR/doc/html
-outputformats = HTML
-sources.fileextensions  = "*.cpp *.doc *.qdoc"
-headers.fileextensions  = "*.h"
-exampledirs = $SRCDIR/WebKit/qt/docs
-imagedirs = $SRCDIR/WebKit/qt/docs
-
-#indexes = $QTDIR/doc/html/qt.index
-
-# macros.qdocconf
-
-macro.aring.HTML        = "&aring;"
-macro.Auml.HTML         = "&Auml;"
-macro.author            = "\\b{Author:}"
-macro.br.HTML           = "<br />"
-macro.BR.HTML           = "<br />"
-macro.aacute.HTML       = "&aacute;"
-macro.eacute.HTML       = "&eacute;"
-macro.iacute.HTML       = "&iacute;"
-macro.gui               = "\\b"
-macro.hr.HTML           = "<hr />"
-macro.key               = "\\b"
-macro.menu              = "\\b"
-macro.note              = "\\b{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.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.include                  = input
-
-macro.0                         = "\\\\0"
-macro.b                         = "\\\\b"
-macro.n                         = "\\\\n"
-macro.r                         = "\\\\r"
-macro.i                         = "\\li"
-macro.i11                       = "\\li{1,1}"
-macro.i12                       = "\\li{1,2}"
-macro.i13                       = "\\li{1,3}"
-macro.i14                       = "\\li{1,4}"
-macro.i15                       = "\\li{1,5}"
-macro.i16                       = "\\li{1,6}"
-macro.i17                       = "\\li{1,7}"
-macro.i18                       = "\\li{1,8}"
-macro.i19                       = "\\li{1,9}"
-macro.i21                       = "\\li{2,1}"
-macro.i31                       = "\\li{3,1}"
-macro.i41                       = "\\li{4,1}"
-macro.i51                       = "\\li{5,1}"
-macro.i61                       = "\\li{6,1}"
-macro.i71                       = "\\li{7,1}"
-macro.i81                       = "\\li{8,1}"
-macro.i91                       = "\\li{9,1}"
-macro.img                       = "\\image"
-macro.endquote                  = "\\endquotation"
-
-spurious                       = "Missing comma in .*" \
-                                 "Missing pattern .*"
-
-# Doxygen compatibility commands
-
-macro.see                       = "\\sa"
-macro.function                  = "\\fn"
-
-# qt-cpp-ignore.qdocconf
-
-Cpp.ignoretokens        = QAXFACTORY_EXPORT \
-                          QDESIGNER_COMPONENTS_LIBRARY \
-                          QDESIGNER_EXTENSION_LIBRARY \
-                          QDESIGNER_SDK_LIBRARY \
-                          QDESIGNER_SHARED_LIBRARY \
-                          QDESIGNER_UILIB_LIBRARY \
-                          QM_EXPORT_CANVAS \
-                          QM_EXPORT_DNS \
-                          QM_EXPORT_DOM \
-                          QM_EXPORT_FTP \
-                          QM_EXPORT_HTTP \
-                          QM_EXPORT_ICONVIEW \
-                          QM_EXPORT_NETWORK \
-                          QM_EXPORT_OPENGL \
-                          QM_EXPORT_SQL \
-                          QM_EXPORT_TABLE \
-                          QM_EXPORT_WORKSPACE \
-                          QM_EXPORT_XML \
-                          QT_ASCII_CAST_WARN \
-                          QT_ASCII_CAST_WARN_CONSTRUCTOR \
-                          QT_BEGIN_HEADER \
-                          QT_DESIGNER_STATIC \
-                          QT_END_HEADER \
-                          QT_FASTCALL \
-                          QT_WIDGET_PLUGIN_EXPORT \
-                          Q_COMPAT_EXPORT \
-                          Q_CORE_EXPORT \
-                          Q_EXPLICIT \
-                          Q_EXPORT \
-                          Q_EXPORT_CODECS_CN \
-                          Q_EXPORT_CODECS_JP \
-                          Q_EXPORT_CODECS_KR \
-                          Q_EXPORT_PLUGIN \
-                          Q_GFX_INLINE \
-                          Q_GUI_EXPORT \
-                          Q_GUI_EXPORT_INLINE \
-                          Q_GUI_EXPORT_STYLE_CDE \
-                          Q_GUI_EXPORT_STYLE_COMPACT \
-                          Q_GUI_EXPORT_STYLE_MAC \
-                          Q_GUI_EXPORT_STYLE_MOTIF \
-                          Q_GUI_EXPORT_STYLE_MOTIFPLUS \
-                          Q_GUI_EXPORT_STYLE_PLATINUM \
-                          Q_GUI_EXPORT_STYLE_POCKETPC \
-                          Q_GUI_EXPORT_STYLE_SGI \
-                          Q_GUI_EXPORT_STYLE_WINDOWS \
-                          Q_GUI_EXPORT_STYLE_WINDOWSXP \
-                          QHELP_EXPORT \
-                          Q_INLINE_TEMPLATE \
-                          Q_INTERNAL_WIN_NO_THROW \
-                          Q_NETWORK_EXPORT \
-                          Q_OPENGL_EXPORT \
-                          Q_OUTOFLINE_TEMPLATE \
-                          Q_SQL_EXPORT \
-                          Q_SVG_EXPORT \
-                          Q_SCRIPT_EXPORT \
-                          Q_TESTLIB_EXPORT \
-                          Q_TYPENAME \
-                          Q_XML_EXPORT \
-                          Q_XMLSTREAM_EXPORT \
-                          Q_XMLPATTERNS_EXPORT \
-                          QDBUS_EXPORT \
-                          QT_BEGIN_NAMESPACE \
-                          QT_BEGIN_INCLUDE_NAMESPACE \
-                          QT_END_NAMESPACE \
-                          QT_END_INCLUDE_NAMESPACE \
-                          EXTENSIONSYSTEM_EXPORT \
-                          QWEBKIT_EXPORT
-Cpp.ignoredirectives    = Q_DECLARE_HANDLE \
-                          Q_DECLARE_INTERFACE \
-                          Q_DECLARE_METATYPE \
-                          Q_DECLARE_OPERATORS_FOR_FLAGS \
-                          Q_DECLARE_PRIVATE \
-                          Q_DECLARE_PUBLIC \
-                          Q_DECLARE_SHARED \
-                          Q_DECLARE_TR_FUNCTIONS \
-                          Q_DECLARE_TYPEINFO \
-                          Q_DISABLE_COPY \
-                          QT_FORWARD_DECLARE_CLASS \
-                          Q_DUMMY_COMPARISON_OPERATOR \
-                          Q_ENUMS \
-                          Q_FLAGS \
-                          Q_INTERFACES \
-                          __attribute__
-
-
-
-HTML.style              = "" \
-                          "h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }"\
-                          "a:link { color: #004faf; text-decoration: none }"\
-                          "a:visited { color: #672967; text-decoration: none }"\
-                          "td.postheader { font-family: sans-serif }"\
-                          "tr.address { font-family: sans-serif }"\
-                          "body { background: #ffffff; color: black }"\
-                          "table tr.odd { background: #f0f0f0; color: black; }"\
-                          "table tr.even { background: #e4e4e4; color: black; }"\
-                          "table.annotated th { padding: 3px; text-align: left }"\
-                          "table.annotated td { padding: 3px; } "\
-                          "table tr pre { padding-top: none; padding-bottom: none; padding-left: none; padding-right: none; border: none; background: none }"\
-                          "tr.qt-style { background: #a2c511; color: black }"\
-                          "body pre { padding: 0.2em; border: #e7e7e7 1px solid; background: #f1f1f1; color: black }"\
-                          "span.preprocessor, span.preprocessor a { color: darkblue; }"\
-                          "span.comment { color: darkred; font-style: italic }"\
-                          "span.string,span.char { color: darkgreen; }"\
-                          ".title { text-align: center }"\
-                          ".subtitle { font-size: 0.8em }"\
-                          ".small-subtitle { font-size: 0.65em }"
-
-HTML.postheader         = ""
-
-HTML.footer             = ""
index ff8a4c3..bf0aa85 100644 (file)
@@ -38,6 +38,8 @@ equals(qmakeVersion, 3.0) {
     MODULE_BASE_OUTDIR = $$ROOT_BUILD_DIR
 }
 
+QMAKE_DOCS = $$PWD/qtwebkit.qdocconf
+
 # We load the relevant modules here, so that the effects of each module
 # on the QT variable can be picked up when we later load(qt_module).
 load(webkit_modules)
diff --git a/Source/qtwebkit.qdocconf b/Source/qtwebkit.qdocconf
new file mode 100644 (file)
index 0000000..82a056e
--- /dev/null
@@ -0,0 +1,13 @@
+include($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf)
+include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
+
+project     = qtwebkit
+description = "Qt WebKit API Documentation"
+version     = 5.0.0
+
+headerdirs = WebKit/qt/Api WebKit2/UIProcess/API/qt
+sourcedirs = WebKit/qt/Api WebKit/qt/docs Source/JavaScriptCore/qt/api WebKit2/UIProcess/API/qt
+exampledirs = WebKit/qt/docs
+imagedirs = WebKit/qt/docs
+
+depends += qtcore qtwidgets qtgui qtscript qtdoc qtprintsupport qtxml
index 93b79f7..73ffcd1 100644 (file)
@@ -1,3 +1,24 @@
+2012-10-17  Tor Arne Vestbø  <tor.arne.vestbo@digia.com>
+
+        [Qt] Modularize documentation for QtWebKit
+
+        Running 'make docs' would fail unless 'make qmake_all' was ran first,
+        but qmake_all involved generating all the derived sources, which seems
+        overly complex just for building documentation.
+
+        We solve this by preventing all subdirs except QtWebKit from having a
+        docs target. This would normally work fine on its own, but since we
+        use CONFIG += ordered, there's now a missing doc target for the
+        immediate dependency of the QtWebKit subdir. We solve this by adding
+        a dummy-target ourselves.
+
+        Finally, we clean up the qdocconf file to match the rest of the Qt
+        documentation modularization efforts.
+
+        Reviewed by Simon Hausmann.
+
+        * qmake/mkspecs/features/default_post.prf:
+
 2012-10-17  Zoltan Horvath  <zoltan@webkit.org>
 
         Remove the JSHeap memory measurement of the PageLoad performacetests since it creates bogus JSGlobalDatas
index aa21b5d..8800e1e 100644 (file)
@@ -249,6 +249,31 @@ for(subdir, SUBDIRS) {
     }
 }
 
+root_project_file {
+    # Tweak documentation rules so that we only get documentation
+    # for the QtWebKit subdir, which means we don't have to run
+    # qmake_all and generate all the derived sources, just to
+    # build documentation.
+    previous_subdir =
+    doc_targets = docs install_docs uninstall_docs
+    for(subdir, SUBDIRS) {
+        equals(subdir, QtWebKit) {
+            for(doc_target, doc_targets) {
+                # Since we use CONFIG += ordered, we need to provide a fake dummy
+                # doc-target for the immediate dependency of the QtWebKit target.
+                dummy_target = sub-$$replace($${previous_subdir}.file, [^a-zA-Z0-9_], -)-$${doc_target}_ordered
+                $${dummy_target}.target = $${dummy_target}
+                QMAKE_EXTRA_TARGETS += $${dummy_target}
+            }
+        } else {
+            previous_subdir = $$subdir # Save for later
+
+            # For all the other subdirs, we disable docs the regular way
+            for(doc_target, doc_targets): $${subdir}.CONFIG += no_$${doc_target}_target
+        }
+    }
+}
+
 incremental.target = incremental
 incremental.commands = $(MAKE) -f $(MAKEFILE) qmake_all && $(MAKE) -f $(MAKEFILE)
 QMAKE_EXTRA_TARGETS += incremental