From owner-dev-commits-doc-all@freebsd.org Wed Jun 16 20:00:34 2021 Return-Path: Delivered-To: dev-commits-doc-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 25937641FB8 for ; Wed, 16 Jun 2021 20:00:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G4wz60VPmz3Jrb; Wed, 16 Jun 2021 20:00:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB91721D80; Wed, 16 Jun 2021 20:00:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15GK0XuZ098891; Wed, 16 Jun 2021 20:00:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15GK0XLZ098890; Wed, 16 Jun 2021 20:00:33 GMT (envelope-from git) Date: Wed, 16 Jun 2021 20:00:33 GMT Message-Id: <202106162000.15GK0XLZ098890@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Ceri Davies Subject: git: 0b54eb3971 - main - documentation/Makefile: use all languages by default MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b54eb39712d50ae3b3e02ff5f08aa86483a4d7b Auto-Submitted: auto-generated X-BeenThere: dev-commits-doc-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the doc repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jun 2021 20:00:34 -0000 The branch main has been updated by ceri: URL: https://cgit.FreeBSD.org/doc/commit/?id=0b54eb39712d50ae3b3e02ff5f08aa86483a4d7b commit 0b54eb39712d50ae3b3e02ff5f08aa86483a4d7b Author: Ceri Davies AuthorDate: 2021-06-16 16:42:28 +0000 Commit: Ceri Davies 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 @@ MAINTAINER=carlavilla@FreeBSD.org +# 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