summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2016-07-01 16:14:31 +0200
committerKai Koehne <kai.koehne@qt.io>2016-08-10 06:11:18 +0000
commitc8afc67875a3db232f98735602af054bdf2ef531 (patch)
tree074233983266a67c0633cd0725cc8c4a5c413ff7
parent2579fe7bfdf5b215fccacc641b986102664ccffa (diff)
Automatically generate code attribution documentation
Let the qtattributionsscanner tool generate a .qdoc file in the build directory that contains code attributions for this qdoc module. Task-number: QTBUG-55139 Change-Id: Ic7532c9a7c092f552c36e21ee6cbebdd0107689b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>
-rw-r--r--doc/global/config.qdocconf2
-rw-r--r--mkspecs/features/qt_docs.prf15
2 files changed, 15 insertions, 2 deletions
diff --git a/doc/global/config.qdocconf b/doc/global/config.qdocconf
index 97357345c9..ac9e7ac274 100644
--- a/doc/global/config.qdocconf
+++ b/doc/global/config.qdocconf
@@ -10,6 +10,6 @@ dita.metadata.default.audience = programmer
#Set the main Qt index.html
navigation.homepage = "Qt $QT_VER"
-sourcedirs += includes
+sourcedirs += includes $$BUILDDIR
url = http://doc.qt.io/qt-5
diff --git a/mkspecs/features/qt_docs.prf b/mkspecs/features/qt_docs.prf
index 183d0c9502..72dde61a40 100644
--- a/mkspecs/features/qt_docs.prf
+++ b/mkspecs/features/qt_docs.prf
@@ -21,12 +21,16 @@ qtvertag.name = QT_VERSION_TAG
qtvertag.value = $$replace(qtver.value, \.,)
qtdocs.name = QT_INSTALL_DOCS
qtdocs.value = $$[QT_INSTALL_DOCS/src]
-QT_TOOL_ENV = qtver qtmver qtvertag qtdocs
+builddir.name = BUILDDIR
+builddir.value = $$OUT_PWD
+QT_TOOL_ENV = qtver qtmver qtvertag qtdocs builddir
qtPrepareTool(QDOC, qdoc)
QT_TOOL_ENV =
!build_online_docs: qtPrepareTool(QHELPGENERATOR, qhelpgenerator)
+qtPrepareTool(QTATTRIBUTIONSSCANNER, qtattributionsscanner)
+
# qtPrepareTool() must be called outside a build pass, as it protects
# against concurrent wrapper creation by omitting it during build passes.
# However, creating the actual targets is reserved to the build passes.
@@ -63,12 +67,21 @@ DOC_INDEXES =
PREP_DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
}
+
+qtattributionsscanner.target = qtattributionsscanner
+qtattributionsscanner.commands = $$QTATTRIBUTIONSSCANNER $$shell_quote($$MODULE_BASE_INDIR) \
+ --filter "QDocModule=$$QMAKE_DOCS_TARGET" -o $$shell_quote($$OUT_PWD/codeattributions.qdoc)
+qtattributionsscanner.CONFIG += phony
+QMAKE_EXTRA_TARGETS += qtattributionsscanner
+
doc_command = $$QDOC $$QMAKE_DOCS
prepare_docs {
prepare_docs.commands += $$doc_command -prepare $$PREP_DOC_INDEXES -no-link-errors
generate_docs.commands += $$doc_command -generate $$DOC_INDEXES
+ prepare_docs.depends += qtattributionsscanner
} else {
html_docs.commands += $$doc_command $$DOC_INDEXES
+ html_docs.depends += qtattributionsscanner
}
!build_online_docs {