git: 0b54eb3971 - main - documentation/Makefile: use all languages by default
Ceri Davies <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.cvs.doc |
|---|---|
| Message-ID | <[email protected]> |
The branch main has been updated by ceri: URL: https://cgit.FreeBSD.org/doc/commit/?id=0b54eb39712d50ae3b3e02ff5f08aa86483a4d7b commit 0b54eb39712d50ae3b3e02ff5f08aa86483a4d7b Author: Ceri Davies <[email protected]> AuthorDate: 2021-06-16 16:42:28 +0000 Commit: Ceri Davies <[email protected]> CommitDate: 2021-06-16 20:00:26 +0000 documentation/Makefile: use all languages by default Previously we only added languages with content in books/ to the LANGUAGES variable because they would cause the build to fail, and this meant that they did not get PDFs built either. It also meant they could not be included in DOC_LANG as this then break the build. Add a new variable, ARTICLEONLY_LANGS, to identify them and, with the safety of the new logic in the tools/book-toc*py scripts to warn if we miss one, build all of the content by default under the PDF target. This also makes DOC_LANG safe to use even if there isn't a book in that language. --- documentation/Makefile | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/documentation/Makefile b/documentation/Makefile index 0c4725d19e..9ce6a8b616 100644 --- a/documentation/Makefile +++ b/documentation/Makefile @@ -16,6 +16,9 @@ [email protected] +# List of languages without book translations +ARTICLEONLY_LANGS= bd da ko tr + LOCALBASE?= /usr/local PYTHON_CMD = ${LOCALBASE}/bin/python3 @@ -24,9 +27,9 @@ HUGO_CMD = ${LOCALBASE}/bin/hugo HUGO_ARGS?= --verbose --minify ASCIIDOCTORPDF_CMD= ${LOCALBASE}/bin/asciidoctor-pdf .if defined(DOC_LANG) && !empty(DOC_LANG) -LANGUAGES = ${DOC_LANG} +LANGUAGES= ${DOC_LANG:S/,/ /g} .else -LANGUAGES = en,es,pt-br,de,ja,zh-cn,zh-tw,ru,el,hu,it,mn,nl,pl,fr +LANGUAGES= bd da de el en es fr hu it ja ko mn nl pl pt-br ru tr zh-cn zh-tw .endif RUBYLIB = ../shared/lib @@ -48,6 +51,13 @@ RUN_DEPENDS= ${PYTHON_CMD} \ .HOST=$(HOSTNAME) .endif +# Strip the languages without articles from the list of languages we +# will use to build books. +BOOK_LANGS= ${LANGUAGES} +.for a in ${ARTICLEONLY_LANGS} +BOOK_LANGS:= ${BOOK_LANGS:N${a}} +.endfor + .ORDER: all run .ORDER: requirements @@ -71,11 +81,11 @@ starting-message: .PHONY @echo --------------------------------------------------------------- generate-books-toc: .PHONY - ${PYTHON_CMD} ./tools/books-toc-parts-creator.py -l ${LANGUAGES} - ${PYTHON_CMD} ./tools/books-toc-creator.py -l ${LANGUAGES} - ${PYTHON_CMD} ./tools/books-toc-figures-creator.py -l ${LANGUAGES} - ${PYTHON_CMD} ./tools/books-toc-tables-creator.py -l ${LANGUAGES} - ${PYTHON_CMD} ./tools/books-toc-examples-creator.py -l ${LANGUAGES} + ${PYTHON_CMD} ./tools/books-toc-parts-creator.py -l ${BOOK_LANGS} + ${PYTHON_CMD} ./tools/books-toc-creator.py -l ${BOOK_LANGS} + ${PYTHON_CMD} ./tools/books-toc-figures-creator.py -l ${BOOK_LANGS} + ${PYTHON_CMD} ./tools/books-toc-tables-creator.py -l ${BOOK_LANGS} + ${PYTHON_CMD} ./tools/books-toc-examples-creator.py -l ${BOOK_LANGS} generate-pgpkeys-txt: static/pgpkeys/pgpkeys.txt @@ -90,7 +100,7 @@ build: .PHONY # # PDF targets -# Use DOC_LANG to choose the language, e.g., make DOC_LANG="en,fr" pdf-books +# Use DOC_LANG to choose the language, e.g., make DOC_LANG="en fr" pdf-books # pdf: pdf-articles pdf-books _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-doc-all To unsubscribe, send any mail to "[email protected]"