Doc build: overcome command-line length limitation on Windows
On Windows, create a file containing include paths for QDoc in cases where number of include paths exceed 30. Based on how moc does this. Task-number: QTBUG-68259 Change-Id: I0d03fab4b809174cb6b48c36ee9f8880ff294ff4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>bb10
parent
4fa0b41523
commit
23841083e3
|
|
@ -27,6 +27,24 @@ QT_TOOL_ENV = qtver qtmver qtvertag qtdocs builddir
|
|||
qtPrepareTool(QDOC, qdoc)
|
||||
QT_TOOL_ENV =
|
||||
|
||||
# On Windows, put the includes into a .inc file which QDoc will read, if the project
|
||||
# has too many includes. We do this to overcome a command-line limit on Windows.
|
||||
WIN_INCLUDETEMP=
|
||||
INCLUDE_PATHS=$$INCPATH
|
||||
win32:count(INCLUDE_PATHS, 30, >) {
|
||||
WIN_INCLUDETEMP = $$OUT_PWD/qdocincludepaths.inc
|
||||
WIN_INCLUDETEMP_CONTENT =
|
||||
for (inc, INCLUDE_PATHS): \
|
||||
WIN_INCLUDETEMP_CONTENT += -I$$inc
|
||||
write_file($$absolute_path($$WIN_INCLUDETEMP, $$OUT_PWD), WIN_INCLUDETEMP_CONTENT)|error()
|
||||
}
|
||||
|
||||
isEmpty(WIN_INCLUDETEMP) {
|
||||
QDOC_INCLUDE_PATHS=$(INCPATH)
|
||||
} else {
|
||||
QDOC_INCLUDE_PATHS=@$$shell_quote($$WIN_INCLUDETEMP)
|
||||
}
|
||||
|
||||
!build_online_docs: qtPrepareTool(QHELPGENERATOR, qhelpgenerator)
|
||||
|
||||
qtPrepareTool(QTATTRIBUTIONSSCANNER, qtattributionsscanner)
|
||||
|
|
@ -75,12 +93,13 @@ 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 $(INCPATH)
|
||||
generate_docs.commands += $$doc_command -generate $$DOC_INDEXES $(INCPATH)
|
||||
prepare_docs.commands += $$doc_command -prepare $$PREP_DOC_INDEXES -no-link-errors $$QDOC_INCLUDE_PATHS
|
||||
generate_docs.commands += $$doc_command -generate $$DOC_INDEXES $$QDOC_INCLUDE_PATHS
|
||||
prepare_docs.depends += qtattributionsscanner
|
||||
} else {
|
||||
html_docs.commands += $$doc_command $$DOC_INDEXES $(INCPATH)
|
||||
html_docs.commands += $$doc_command $$DOC_INDEXES $(QDOC_INCLUDE_PATHS)
|
||||
html_docs.depends += qtattributionsscanner
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue