6133c8a9e7
- 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>
112 lines
4.5 KiB
Plaintext
112 lines
4.5 KiB
Plaintext
contains(TEMPLATE, ".*(lib|app)"):CONFIG += have_target
|
|
|
|
!have_target:!force_qt: CONFIG -= qt
|
|
|
|
!shared:!dll:!static:!staticlib {
|
|
contains(QT_CONFIG, static): CONFIG += static
|
|
else: CONFIG += shared
|
|
}
|
|
|
|
QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
|
|
!isEmpty(QT_BREAKPAD_ROOT_PATH): \ # quick test first whether requested ...
|
|
!staticlib:!static:CONFIG(release, debug|release):have_target: \ # is it applicable?
|
|
!contains(TARGET, .*phony_target.*): \ # monster hack, you don't really see this here, right? ;)
|
|
system($$QT_BREAKPAD_ROOT_PATH/qtbreakpadsymbols --breakpad-exists) { # do we really have it?
|
|
CONFIG += breakpad force_debug_info
|
|
CONFIG -= no_debug_info separate_debug_info
|
|
}
|
|
|
|
force_debug_info {
|
|
QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
|
|
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO
|
|
QMAKE_LFLAGS_RELEASE = $$QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO
|
|
}
|
|
|
|
CONFIG(debug, debug|release):load(debug)
|
|
else:load(release)
|
|
debug_and_release:load(debug_and_release)
|
|
incredibuild_xge {
|
|
CONFIG -= incredibuild_xge
|
|
CONFIG = incredibuild_xge $$CONFIG
|
|
}
|
|
|
|
force_debug_info:win32 {
|
|
load(resolve_target)
|
|
QMAKE_CLEAN += $$replace(QMAKE_RESOLVED_TARGET, ...$, pdb) # for the debug case it is hardcoded in qmake
|
|
}
|
|
|
|
breakpad {
|
|
load(resolve_target)
|
|
DEBUGFILENAME = $$shell_quote($$shell_path($$QMAKE_RESOLVED_TARGET))
|
|
PROJECTPATH = $$shell_quote($$shell_path($$OUT_PWD))
|
|
|
|
!isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$QMAKE_POST_LINK$$escape_expand(\\n\\t)
|
|
QMAKE_POST_LINK = $$QMAKE_POST_LINK$$quote($${QT_BREAKPAD_ROOT_PATH}$${QMAKE_DIR_SEP}qtbreakpadsymbols $$DEBUGFILENAME $$PROJECTPATH)
|
|
!isEmpty(QMAKE_STRIP):QMAKE_POST_LINK = $$QMAKE_POST_LINK$$escape_expand(\\n\\t)$$quote($$QMAKE_STRIP $$DEBUGFILENAME)
|
|
}
|
|
|
|
QMAKE_INCDIR += $$QMAKE_INCDIR_POST
|
|
QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST
|
|
|
|
# Let every project have a standard GNU `check' target
|
|
!contains(QMAKE_EXTRA_TARGETS, check) {
|
|
contains(TEMPLATE, subdirs): \
|
|
prepareRecursiveTarget(check)
|
|
else: \
|
|
check.depends = first # `make check' implies build
|
|
QMAKE_EXTRA_TARGETS += check
|
|
}
|
|
|
|
!contains(QMAKE_EXTRA_TARGETS, docs) {
|
|
contains(TEMPLATE, subdirs) {
|
|
prepare_docs {
|
|
prepareRecursiveTarget(prepare_docs)
|
|
prepareRecursiveTarget(generate_docs)
|
|
html_docs.commands = $(MAKE) -f $(MAKEFILE) prepare_docs && $(MAKE) -f $(MAKEFILE) generate_docs
|
|
} else {
|
|
prepareRecursiveTarget(html_docs)
|
|
}
|
|
prepareRecursiveTarget(qch_docs)
|
|
prepareRecursiveTarget(docs)
|
|
} else {
|
|
# apps and libs only generate docs if QMAKE_DOCS is set
|
|
!isEmpty(QMAKE_DOCS) {
|
|
!exists($$QMAKE_DOCS):error("Cannot find documentation specification file $$QMAKE_DOCS")
|
|
qtPrepareTool(QDOC, qdoc)
|
|
for(index, QMAKE_DOCS_INDEX):QDOC_INDEX += -indexdir $$index
|
|
!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
|
|
html_docs.depends += generate_docs
|
|
} else {
|
|
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
|
|
}
|
|
}
|
|
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_html_docs uninstall_html_docs \
|
|
install_qch_docs uninstall_qch_docs \
|
|
install_docs uninstall_docs
|
|
}
|