revamp doc generation targets
- the old docs target becomes html_docs - a new qch_docs target is added. the .qch files end up directly in QT_INSTALL_DOCS, wihout any subdirectories in between - the new docs target invokes html_docs and qch_docs - respective un-/install targets are added as well. note that the install targets don't depend on the build targets, as it's virtually impossible to get the dependencies right throughout the hierarchy. Change-Id: I07a2589db8252371e77cf925c47c4e59fbd1b2ca Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
This commit is contained in:
parent
80b99a6dd7
commit
6133c8a9e7
@ -62,10 +62,12 @@ QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST
|
||||
prepare_docs {
|
||||
prepareRecursiveTarget(prepare_docs)
|
||||
prepareRecursiveTarget(generate_docs)
|
||||
docs.commands = $(MAKE) -f $(MAKEFILE) prepare_docs && $(MAKE) -f $(MAKEFILE) generate_docs
|
||||
html_docs.commands = $(MAKE) -f $(MAKEFILE) prepare_docs && $(MAKE) -f $(MAKEFILE) generate_docs
|
||||
} else {
|
||||
prepareRecursiveTarget(docs)
|
||||
prepareRecursiveTarget(html_docs)
|
||||
}
|
||||
prepareRecursiveTarget(qch_docs)
|
||||
prepareRecursiveTarget(docs)
|
||||
} else {
|
||||
# apps and libs only generate docs if QMAKE_DOCS is set
|
||||
!isEmpty(QMAKE_DOCS) {
|
||||
@ -75,24 +77,35 @@ QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST
|
||||
!isEmpty(QMAKE_DOCS_OUTPUTDIR):QMAKE_DOCS_OPTIONS += -outputdir $$QMAKE_DOCS_OUTPUTDIR
|
||||
!isEmpty(QMAKE_DOCS_INSTALLDIR):QMAKE_DOCS_OPTIONS += -installdir $$QMAKE_DOCS_INSTALLDIR
|
||||
doc_command = $$QDOC $$QMAKE_DOCS_OPTIONS $$QDOC_INDEX $$QMAKE_DOCS
|
||||
|
||||
prepare_docs {
|
||||
prepare_docs.commands += $$doc_command -prepare -no-link-errors
|
||||
generate_docs.commands += $$doc_command -generate
|
||||
docs.depends += generate_docs
|
||||
html_docs.depends += generate_docs
|
||||
} else {
|
||||
docs.commands += $$doc_command
|
||||
html_docs.commands += $$doc_command
|
||||
}
|
||||
|
||||
qtPrepareTool(QHELPGENERATOR, qhelpgenerator)
|
||||
isEmpty(QMAKE_DOCS_TARGET): QMAKE_DOCS_TARGET = $$basename(QMAKE_DOCS_OUTPUTDIR)
|
||||
qch_docs.commands = $$QHELPGENERATOR $$QMAKE_DOCS_OUTPUTDIR/$${QMAKE_DOCS_TARGET}.qhp -o $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch
|
||||
}
|
||||
}
|
||||
QMAKE_EXTRA_TARGETS += docs
|
||||
docs.commands = $(MAKE) -f $(MAKEFILE) html_docs && $(MAKE) -f $(MAKEFILE) qch_docs
|
||||
QMAKE_EXTRA_TARGETS += html_docs qch_docs docs
|
||||
prepare_docs: QMAKE_EXTRA_TARGETS += prepare_docs generate_docs
|
||||
}
|
||||
|
||||
!contains(QMAKE_EXTRA_TARGETS, install_docs) {
|
||||
contains(TEMPLATE, subdirs) {
|
||||
prepareRecursiveTarget(install_html_docs)
|
||||
prepareRecursiveTarget(uninstall_html_docs)
|
||||
prepareRecursiveTarget(install_qch_docs)
|
||||
prepareRecursiveTarget(uninstall_qch_docs)
|
||||
prepareRecursiveTarget(install_docs)
|
||||
prepareRecursiveTarget(uninstall_docs)
|
||||
}
|
||||
QMAKE_EXTRA_TARGETS += install_docs uninstall_docs
|
||||
QMAKE_EXTRA_TARGETS += \
|
||||
install_html_docs uninstall_html_docs \
|
||||
install_qch_docs uninstall_qch_docs \
|
||||
install_docs uninstall_docs
|
||||
}
|
||||
|
@ -49,13 +49,20 @@ qt_install_module {
|
||||
}
|
||||
|
||||
qt_install_module_docs {
|
||||
module_docs.files = $$QMAKE_DOCS_OUTPUTDIR
|
||||
module_docs.path = $$[QT_INSTALL_DOCS]
|
||||
module_docs.CONFIG += no_check_exist directory no_default_install
|
||||
module_docs.depends += docs
|
||||
INSTALLS += module_docs
|
||||
inst_html_docs.files = $$QMAKE_DOCS_OUTPUTDIR
|
||||
inst_html_docs.path = $$[QT_INSTALL_DOCS]
|
||||
inst_html_docs.CONFIG += no_check_exist directory no_default_install
|
||||
INSTALLS += inst_html_docs
|
||||
|
||||
install_docs.depends = install_module_docs
|
||||
uninstall_docs.depends = uninstall_module_docs
|
||||
QMAKE_EXTRA_TARGETS += install_docs uninstall_docs
|
||||
inst_qch_docs.files = $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch
|
||||
inst_qch_docs.path = $$[QT_INSTALL_DOCS]
|
||||
inst_qch_docs.CONFIG += no_check_exist no_default_install
|
||||
INSTALLS += inst_qch_docs
|
||||
|
||||
install_html_docs.depends = install_inst_html_docs
|
||||
uninstall_html_docs.depends = uninstall_inst_html_docs
|
||||
install_qch_docs.depends = install_inst_qch_docs
|
||||
uninstall_qch_docs.depends = uninstall_inst_qch_docs
|
||||
install_docs.depends = install_html_docs install_qch_docs
|
||||
uninstall_docs.depends = uninstall_html_docs uninstall_qch_docs
|
||||
}
|
||||
|
@ -114,7 +114,9 @@ CONFIG += qmake_cache target_qt
|
||||
doc_subdir = doc
|
||||
|
||||
unset(QMAKE_DOCS_INDEX)
|
||||
QMAKE_DOCS_OUTPUTDIR = $$MODULE_BASE_OUTDIR/$$doc_subdir/qt$${MODULE}
|
||||
QMAKE_DOCS_BASE_OUTDIR = $$MODULE_BASE_OUTDIR/$$doc_subdir
|
||||
QMAKE_DOCS_OUTPUTDIR = $$QMAKE_DOCS_BASE_OUTDIR/qt$${MODULE}
|
||||
QMAKE_DOCS_TARGET = $$replace(QMAKE_DOCS, ^(.*/)?(.*)\\.qdocconf$, \\2)
|
||||
for(qmod, QMAKEMODULES): \
|
||||
QMAKE_DOCS_INDEX += $$section(qmod, /, 0, -3)/$$doc_subdir
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user