Changeset View
Changeset View
Standalone View
Standalone View
documentation/Makefile
# Generate the FreeBSD documentation | # Generate the FreeBSD documentation | |||||||||||||||||||||
# | # | |||||||||||||||||||||
# Copyright (c) 2020-2021, The FreeBSD Documentation Project | # Copyright (c) 2020-2021, The FreeBSD Documentation Project | |||||||||||||||||||||
# Copyright (c) 2020-2021, Sergio Carlavilla <carlavilla@FreeBSD.org> | # Copyright (c) 2020-2021, Sergio Carlavilla <carlavilla@FreeBSD.org> | |||||||||||||||||||||
# | # | |||||||||||||||||||||
# Targets intended for use on the command line | # Targets intended for use on the command line | |||||||||||||||||||||
# | # | |||||||||||||||||||||
# all (default) - generate the books TOC and compile all the documentation | # all (default) - generate the books TOC and compile all the documentation | |||||||||||||||||||||
# clean - removes generated files | # clean - removes generated files | |||||||||||||||||||||
# run - serves the built documentation site for local browsing | # run - serves the built documentation site for local browsing | |||||||||||||||||||||
# pdf - build PDF versions of the articles and books. | # pdf - build PDF versions of the articles and books. | |||||||||||||||||||||
# html - build HTML versions of the articles and books for | ||||||||||||||||||||||
# offline use | ||||||||||||||||||||||
# | # | |||||||||||||||||||||
# The run target uses hugo's built-in webserver to make the documentation site | # The run target uses hugo's built-in webserver to make the documentation site | |||||||||||||||||||||
# available for local browsing. The documentation should have been built prior | # available for local browsing. The documentation should have been built prior | |||||||||||||||||||||
# to attempting to use the `run` target. By default, hugo will start its | # to attempting to use the `run` target. By default, hugo will start its | |||||||||||||||||||||
# webserver on port 1313. | # webserver on port 1313. | |||||||||||||||||||||
MAINTAINER=carlavilla@FreeBSD.org | MAINTAINER=carlavilla@FreeBSD.org | |||||||||||||||||||||
# List of languages without book translations | # List of languages without book translations | |||||||||||||||||||||
ARTICLEONLY_LANGS= bd da ko tr | ARTICLEONLY_LANGS= bd da ko tr | |||||||||||||||||||||
# List of languages without article translations | ||||||||||||||||||||||
BOOKONLY_LANGS= mn | ||||||||||||||||||||||
# List of all languages we have content for | # List of all languages we have content for | |||||||||||||||||||||
ALL_LANGUAGES= bd da de el en es fr hu it ja ko mn nl pl pt-br ru tr zh-cn zh-tw | ALL_LANGUAGES= bd da de el en es fr hu it ja ko mn nl pl pt-br ru tr zh-cn zh-tw | |||||||||||||||||||||
LOCALBASE?= /usr/local | LOCALBASE?= /usr/local | |||||||||||||||||||||
PYTHON_CMD = ${LOCALBASE}/bin/python3 | PYTHON_CMD = ${LOCALBASE}/bin/python3 | |||||||||||||||||||||
RUBY_CMD = ${LOCALBASE}/bin/ruby | RUBY_CMD = ${LOCALBASE}/bin/ruby | |||||||||||||||||||||
HUGO_CMD = ${LOCALBASE}/bin/hugo | HUGO_CMD = ${LOCALBASE}/bin/hugo | |||||||||||||||||||||
HUGO_ARGS?= --verbose --minify | HUGO_ARGS?= --verbose --minify | |||||||||||||||||||||
ASCIIDOCTOR_CMD= ${LOCALBASE}/bin/asciidoctor | ||||||||||||||||||||||
ASCIIDOCTORPDF_CMD= ${LOCALBASE}/bin/asciidoctor-pdf | ASCIIDOCTORPDF_CMD= ${LOCALBASE}/bin/asciidoctor-pdf | |||||||||||||||||||||
SED_CMD = /usr/bin/sed | ||||||||||||||||||||||
.if defined(DOC_LANG) && !empty(DOC_LANG) | .if defined(DOC_LANG) && !empty(DOC_LANG) | |||||||||||||||||||||
LANGUAGES= ${DOC_LANG:S/,/ /g} | LANGUAGES= ${DOC_LANG:S/,/ /g} | |||||||||||||||||||||
.if ${LANGUAGES:Men} == "" && ${.TARGETS:Mpdf*} == "" | .if ${LANGUAGES:Men} == "" && ${.TARGETS:Mpdf*} == "" && ${.TARGETS:Mhtml*} == "" | |||||||||||||||||||||
.warning "Warning: cannot skip 'en'; adding it back" | .warning "Warning: cannot skip 'en'; adding it back" | |||||||||||||||||||||
LANGUAGES+= en | LANGUAGES+= en | |||||||||||||||||||||
.endif | .endif | |||||||||||||||||||||
.else | .else | |||||||||||||||||||||
LANGUAGES= ${ALL_LANGUAGES} | LANGUAGES= ${ALL_LANGUAGES} | |||||||||||||||||||||
.endif | .endif | |||||||||||||||||||||
RUBYLIB = ../shared/lib | RUBYLIB = ../shared/lib | |||||||||||||||||||||
Show All 10 Lines | ||||||||||||||||||||||
.HOST=$(BIND) | .HOST=$(BIND) | |||||||||||||||||||||
. else | . else | |||||||||||||||||||||
.HOST=localhost | .HOST=localhost | |||||||||||||||||||||
. endif | . endif | |||||||||||||||||||||
.else | .else | |||||||||||||||||||||
.HOST=$(HOSTNAME) | .HOST=$(HOSTNAME) | |||||||||||||||||||||
.endif | .endif | |||||||||||||||||||||
# Strip the languages without articles from the list of languages we | # Strip the languages with only articles from the list of languages we | |||||||||||||||||||||
ceri: Apologies - this is my bug but this should read "with only articles" rather than "without… | ||||||||||||||||||||||
# will use to build books. | # will use to build books. | |||||||||||||||||||||
BOOK_LANGS= ${LANGUAGES} | BOOK_LANGS= ${LANGUAGES} | |||||||||||||||||||||
.for a in ${ARTICLEONLY_LANGS} | .for a in ${ARTICLEONLY_LANGS} | |||||||||||||||||||||
BOOK_LANGS:= ${BOOK_LANGS:N${a}} | BOOK_LANGS:= ${BOOK_LANGS:N${a}} | |||||||||||||||||||||
.endfor | .endfor | |||||||||||||||||||||
# Strip the languages with only books from the list of languages we | ||||||||||||||||||||||
Done Inline Actions
Same here. ceri: Same here. | ||||||||||||||||||||||
# will use to build articles. | ||||||||||||||||||||||
ARTICLE_LANGS= ${LANGUAGES} | ||||||||||||||||||||||
.for a in ${BOOKONLY_LANGS} | ||||||||||||||||||||||
ARTICLE_LANGS:= ${ARTICLE_LANGS:N${a}} | ||||||||||||||||||||||
.endfor | ||||||||||||||||||||||
# Take the list of all languages, and take out the ones we have been | # Take the list of all languages, and take out the ones we have been | |||||||||||||||||||||
# asked for. We'll feed this to hugo. | # asked for. We'll feed this to hugo. | |||||||||||||||||||||
SKIP_LANGS= | SKIP_LANGS= | |||||||||||||||||||||
.for a in ${ALL_LANGUAGES} | .for a in ${ALL_LANGUAGES} | |||||||||||||||||||||
.if ${LANGUAGES:M${a}} == "" | .if ${LANGUAGES:M${a}} == "" | |||||||||||||||||||||
SKIP_LANGS+= ${a} | SKIP_LANGS+= ${a} | |||||||||||||||||||||
.endif | .endif | |||||||||||||||||||||
Show All 21 Lines | ||||||||||||||||||||||
starting-message: .PHONY | starting-message: .PHONY | |||||||||||||||||||||
@echo --------------------------------------------------------------- | @echo --------------------------------------------------------------- | |||||||||||||||||||||
@echo Building the documentation | @echo Building the documentation | |||||||||||||||||||||
@echo included languages: ${LANGUAGES} | @echo included languages: ${LANGUAGES} | |||||||||||||||||||||
@echo excluded languages: ${SKIP_LANGS} | @echo excluded languages: ${SKIP_LANGS} | |||||||||||||||||||||
@echo --------------------------------------------------------------- | @echo --------------------------------------------------------------- | |||||||||||||||||||||
generate-books-toc: .PHONY | generate-books-toc: .PHONY | |||||||||||||||||||||
.if !empty(BOOK_LANGS) | ||||||||||||||||||||||
${PYTHON_CMD} ./tools/books-toc-parts-creator.py -l ${BOOK_LANGS} | ${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-creator.py -l ${BOOK_LANGS} | |||||||||||||||||||||
${PYTHON_CMD} ./tools/books-toc-figures-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-tables-creator.py -l ${BOOK_LANGS} | |||||||||||||||||||||
${PYTHON_CMD} ./tools/books-toc-examples-creator.py -l ${BOOK_LANGS} | ${PYTHON_CMD} ./tools/books-toc-examples-creator.py -l ${BOOK_LANGS} | |||||||||||||||||||||
.endif | ||||||||||||||||||||||
Done Inline Actions
We need to wrap this in a check that BOOK_LANGS is not empty, otherwise we get a failure with DOC_LANG=tr, for example. ceri: We need to wrap this in a check that BOOK_LANGS is not empty, otherwise we get a failure with… | ||||||||||||||||||||||
generate-pgpkeys-txt: static/pgpkeys/pgpkeys.txt | generate-pgpkeys-txt: static/pgpkeys/pgpkeys.txt | |||||||||||||||||||||
static/pgpkeys/pgpkeys.txt: static/pgpkeys/*key | static/pgpkeys/pgpkeys.txt: static/pgpkeys/*key | |||||||||||||||||||||
${RUBY_CMD} ./tools/global-pgpkeys-creator.rb | ${RUBY_CMD} ./tools/global-pgpkeys-creator.rb | |||||||||||||||||||||
run-local: .PHONY | run-local: .PHONY | |||||||||||||||||||||
HUGO_DISABLELANGUAGES="${SKIP_LANGS}" ${HUGO_CMD} server \ | HUGO_DISABLELANGUAGES="${SKIP_LANGS}" ${HUGO_CMD} server \ | |||||||||||||||||||||
Show All 17 Lines | ||||||||||||||||||||||
# | # | |||||||||||||||||||||
# PDF targets | # 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 | pdf: pdf-articles pdf-books | |||||||||||||||||||||
pdf-books-target: | pdf-books-target: | |||||||||||||||||||||
.for _lang in ${LANGUAGES:S|,| |g} | .for _lang in ${BOOK_LANGS} | |||||||||||||||||||||
.if exists(${.CURDIR}/content/${_lang}/books/) | ||||||||||||||||||||||
TMP += ${.CURDIR}/content/${_lang}/books/*/ | TMP+= ${.CURDIR}/content/${_lang}/books/*/ | |||||||||||||||||||||
.endif | ||||||||||||||||||||||
.endfor | .endfor | |||||||||||||||||||||
BOOKSDIR != echo ${TMP} | BOOKSDIR != echo ${TMP} | |||||||||||||||||||||
pdf-articles-target: | pdf-articles-target: | |||||||||||||||||||||
.for _lang in ${LANGUAGES:S|,| |g} | .for _lang in ${ARTICLE_LANGS} | |||||||||||||||||||||
.if exists(${.CURDIR}/content/${_lang}/articles/) | ||||||||||||||||||||||
TTMP += ${.CURDIR}/content/${_lang}/articles/*/ | TTMP += ${.CURDIR}/content/${_lang}/articles/*/ | |||||||||||||||||||||
.endif | ||||||||||||||||||||||
.endfor | .endfor | |||||||||||||||||||||
ARTICLESDIR != echo ${TTMP} | ARTICLESDIR != echo ${TTMP} | |||||||||||||||||||||
pdf-books: pdf-books-target generate-books-toc | pdf-books: pdf-books-target generate-books-toc | |||||||||||||||||||||
# Books build | # Books build | |||||||||||||||||||||
# | # | |||||||||||||||||||||
# Notes: | # Notes: | |||||||||||||||||||||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | ||||||||||||||||||||||
.endfor | .endfor | |||||||||||||||||||||
pdf-clean: pdf-articles-clean pdf-books-clean | pdf-clean: pdf-articles-clean pdf-books-clean | |||||||||||||||||||||
pdf-books-clean: pdf-books-target toc-clean | pdf-books-clean: pdf-books-target toc-clean | |||||||||||||||||||||
.for _curpdf in ${BOOKSDIR} | .for _curpdf in ${BOOKSDIR} | |||||||||||||||||||||
rm -f ${.CURDIR}/public${_curpdf:S|^${.CURDIR}/content||}book.pdf | rm -f ${.CURDIR}/public${_curpdf:S|^${.CURDIR}/content||}book.pdf | |||||||||||||||||||||
.endfor | .endfor | |||||||||||||||||||||
.for _lang in ${LANGUAGES:S|,| |g} | .for _lang in ${BOOK_LANGS} | |||||||||||||||||||||
rm -fr ${.CURDIR}/public/${_lang}/books | rm -fr ${.CURDIR}/public/${_lang}/books | |||||||||||||||||||||
.if !exists(${.CURDIR}/public/${_lang}/articles) | -rmdir ${.CURDIR}/public/${_lang} | |||||||||||||||||||||
rm -fr ${.CURDIR}/public/${_lang} | .endfor | |||||||||||||||||||||
-rmdir ${.CURDIR}/public/ | ||||||||||||||||||||||
# | ||||||||||||||||||||||
# HTML targets | ||||||||||||||||||||||
# Use DOC_LANG to choose the language, e.g., make DOC_LANG="en fr" html-books | ||||||||||||||||||||||
# | ||||||||||||||||||||||
html: html-articles html-books | ||||||||||||||||||||||
html-books-target: | ||||||||||||||||||||||
.for _lang in ${BOOK_LANGS} | ||||||||||||||||||||||
TMPH += ${.CURDIR}/content/${_lang}/books/*/ | ||||||||||||||||||||||
.endfor | ||||||||||||||||||||||
BOOKSDIR != echo ${TMPH} | ||||||||||||||||||||||
html-articles-target: | ||||||||||||||||||||||
.for _lang in ${ARTICLE_LANGS} | ||||||||||||||||||||||
TTMPH += ${.CURDIR}/content/${_lang}/articles/*/ | ||||||||||||||||||||||
.endfor | ||||||||||||||||||||||
ARTICLESDIR != echo ${TTMPH} | ||||||||||||||||||||||
html-books: html-books-target generate-books-toc | ||||||||||||||||||||||
# Books build | ||||||||||||||||||||||
# | ||||||||||||||||||||||
.for _curhtml in ${BOOKSDIR} | ||||||||||||||||||||||
@mkdir -p ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||} | ||||||||||||||||||||||
.if exists(${_curhtml}book.adoc) | ||||||||||||||||||||||
${ASCIIDOCTOR_CMD} \ | ||||||||||||||||||||||
-B ${.CURDIR}/ \ | ||||||||||||||||||||||
-r ./shared/lib/man-macro.rb \ | ||||||||||||||||||||||
-r ./shared/lib/man-macro.rb \ | ||||||||||||||||||||||
-r ./shared/lib/git-macro.rb \ | ||||||||||||||||||||||
-r ./shared/lib/packages-macro.rb \ | ||||||||||||||||||||||
-r ./shared/lib/inter-document-references-macro.rb \ | ||||||||||||||||||||||
-r ./shared/lib/sectnumoffset-treeprocessor.rb \ | ||||||||||||||||||||||
--doctype=book \ | ||||||||||||||||||||||
-a skip-front-matter \ | ||||||||||||||||||||||
-a linkcss -a copycss=${.CURDIR}/themes/beastie/static/css/docbook.css -a stylesheet=docbook.css -a stylesdir=../../css \ | ||||||||||||||||||||||
-a iconfont-remote! -a iconfont-name=font-awesome-min \ | ||||||||||||||||||||||
-o ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}book.html \ | ||||||||||||||||||||||
${_curhtml}book.adoc | ||||||||||||||||||||||
.if exists(${.CURDIR}/static/images/books/${_curhtml:H:T}) | ||||||||||||||||||||||
@mkdir -p ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/images/books/ | ||||||||||||||||||||||
cp -R ${.CURDIR}/static/images/books/${_curhtml:H:T}/ \ | ||||||||||||||||||||||
${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/images/books/${_curhtml:H:T}/ | ||||||||||||||||||||||
${SED_CMD} -i '' -e "s|../../../../images|../../images|g" \ | ||||||||||||||||||||||
${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}book.html | ||||||||||||||||||||||
.endif | .endif | |||||||||||||||||||||
.else | ||||||||||||||||||||||
# some books use _index.adoc as main document | ||||||||||||||||||||||
${ASCIIDOCTOR_CMD} \ | ||||||||||||||||||||||
-B ${.CURDIR}/ \ | ||||||||||||||||||||||
-r ./shared/lib/man-macro.rb \ | ||||||||||||||||||||||
-r ./shared/lib/man-macro.rb \ | ||||||||||||||||||||||
-r ./shared/lib/git-macro.rb \ | ||||||||||||||||||||||
-r ./shared/lib/packages-macro.rb \ | ||||||||||||||||||||||
-r ./shared/lib/inter-document-references-macro.rb \ | ||||||||||||||||||||||
-r ./shared/lib/sectnumoffset-treeprocessor.rb \ | ||||||||||||||||||||||
--doctype=book \ | ||||||||||||||||||||||
-a skip-front-matter \ | ||||||||||||||||||||||
-a linkcss -a copycss=${.CURDIR}/themes/beastie/static/css/docbook.css -a stylesheet=docbook.css -a stylesdir=../../css \ | ||||||||||||||||||||||
-a iconfont-remote! -a iconfont-name=font-awesome-min \ | ||||||||||||||||||||||
-o ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}book.html \ | ||||||||||||||||||||||
${_curhtml}_index.adoc | ||||||||||||||||||||||
.if exists(${.CURDIR}/static/images/books/${_curhtml:H:T}) | ||||||||||||||||||||||
@mkdir -p ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/images/books/ | ||||||||||||||||||||||
cp -R ${.CURDIR}/static/images/books/${_curhtml:H:T}/ \ | ||||||||||||||||||||||
${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/images/books/${_curhtml:H:T}/ | ||||||||||||||||||||||
${SED_CMD} -i '' -e "s|../../../../images|../../images|g" \ | ||||||||||||||||||||||
${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}book.html | ||||||||||||||||||||||
.endif | ||||||||||||||||||||||
.endif | ||||||||||||||||||||||
.if !exists(${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/fonts/) | ||||||||||||||||||||||
mkdir -p ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/fonts/ | ||||||||||||||||||||||
cp -R ${.CURDIR}/themes/beastie/static/fonts/ \ | ||||||||||||||||||||||
${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/fonts/ | ||||||||||||||||||||||
cp ${.CURDIR}/themes/beastie/static/css/font-awesome-min.css \ | ||||||||||||||||||||||
${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/css/ | ||||||||||||||||||||||
.endif | ||||||||||||||||||||||
.endfor | .endfor | |||||||||||||||||||||
@if [ -d ${.CURDIR}/public/ ]; then \ | ||||||||||||||||||||||
if [ -z "`ls -A ${.CURDIR}/public/`" ]; then \ | ||||||||||||||||||||||
rm -fr ${.CURDIR}/public; \ | ||||||||||||||||||||||
fi; \ | ||||||||||||||||||||||
fi | ||||||||||||||||||||||
html-articles: html-articles-target | ||||||||||||||||||||||
# Articles build | ||||||||||||||||||||||
.for _curhtml in ${ARTICLESDIR} | ||||||||||||||||||||||
@mkdir -p ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||} | ||||||||||||||||||||||
${ASCIIDOCTOR_CMD} \ | ||||||||||||||||||||||
-B ${.CURDIR}/ \ | ||||||||||||||||||||||
-r ./shared/lib/man-macro.rb \ | ||||||||||||||||||||||
-r ./shared/lib/man-macro.rb \ | ||||||||||||||||||||||
-r ./shared/lib/git-macro.rb \ | ||||||||||||||||||||||
-r ./shared/lib/packages-macro.rb \ | ||||||||||||||||||||||
-r ./shared/lib/inter-document-references-macro.rb \ | ||||||||||||||||||||||
-r ./shared/lib/sectnumoffset-treeprocessor.rb \ | ||||||||||||||||||||||
--doctype=article \ | ||||||||||||||||||||||
-a skip-front-matter \ | ||||||||||||||||||||||
-a linkcss -a copycss=${.CURDIR}/themes/beastie/static/css/docbook.css -a stylesheet=docbook.css -a stylesdir=../../css \ | ||||||||||||||||||||||
-a iconfont-remote! -a iconfont-name=font-awesome-min \ | ||||||||||||||||||||||
-o ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}article.html \ | ||||||||||||||||||||||
${_curhtml}_index.adoc | ||||||||||||||||||||||
.if exists(${.CURDIR}/static/source/articles/${_curhtml:H:T}) | ||||||||||||||||||||||
cp -R ${.CURDIR}/static/source/articles/${_curhtml:H:T}/ \ | ||||||||||||||||||||||
${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||} | ||||||||||||||||||||||
.endif | ||||||||||||||||||||||
.if exists(${.CURDIR}/static/images/articles/${_curhtml:H:T}) | ||||||||||||||||||||||
@mkdir -p ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/images/articles/ | ||||||||||||||||||||||
cp -R ${.CURDIR}/static/images/articles/${_curhtml:H:T}/ \ | ||||||||||||||||||||||
${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/images/articles/${_curhtml:H:T}/ | ||||||||||||||||||||||
${SED_CMD} -i '' -e "s|../../../images|../../images|g" \ | ||||||||||||||||||||||
${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}article.html | ||||||||||||||||||||||
.endif | ||||||||||||||||||||||
.if !exists(${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/fonts/) | ||||||||||||||||||||||
mkdir -p ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/fonts/ | ||||||||||||||||||||||
cp -R ${.CURDIR}/themes/beastie/static/fonts/ \ | ||||||||||||||||||||||
${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/fonts/ | ||||||||||||||||||||||
cp ${.CURDIR}/themes/beastie/static/css/font-awesome-min.css \ | ||||||||||||||||||||||
${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||:H:H:H}/css/ | ||||||||||||||||||||||
.endif | ||||||||||||||||||||||
.endfor | ||||||||||||||||||||||
html-clean: html-resources-clean html-articles-clean html-books-clean | ||||||||||||||||||||||
html-resources-clean: | ||||||||||||||||||||||
.for _lang in ${LANGUAGES} | ||||||||||||||||||||||
rm -fr ${.CURDIR}/public/${_lang}/css | ||||||||||||||||||||||
rm -fr ${.CURDIR}/public/${_lang}/fonts | ||||||||||||||||||||||
rm -fr ${.CURDIR}/public/${_lang}/images | ||||||||||||||||||||||
.endfor | ||||||||||||||||||||||
html-books-clean: html-books-target toc-clean | ||||||||||||||||||||||
.for _curhtml in ${BOOKSDIR} | ||||||||||||||||||||||
rm -f ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}book.html ${_curhtml}toc*.adoc | ||||||||||||||||||||||
-rmdir ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||} | ||||||||||||||||||||||
.endfor | ||||||||||||||||||||||
.for _lang in ${BOOK_LANGS} | ||||||||||||||||||||||
rm -fr ${.CURDIR}/public/${_lang}/books | ||||||||||||||||||||||
rm -fr ${.CURDIR}/public/${_lang}/images/books | ||||||||||||||||||||||
-rmdir ${.CURDIR}/public/${_lang} | ||||||||||||||||||||||
.endfor | ||||||||||||||||||||||
-rmdir ${.CURDIR}/public | ||||||||||||||||||||||
html-articles-clean: html-articles-target | ||||||||||||||||||||||
.for _curhtml in ${ARTICLESDIR} | ||||||||||||||||||||||
rm -f ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||}article.html | ||||||||||||||||||||||
-rmdir ${.CURDIR}/public${_curhtml:S|^${.CURDIR}/content||} | ||||||||||||||||||||||
.endfor | ||||||||||||||||||||||
.for _lang in ${ARTICLE_LANGS} | ||||||||||||||||||||||
rm -fr ${.CURDIR}/public/${_lang}/articles | ||||||||||||||||||||||
rm -fr ${.CURDIR}/public/${_lang}/images/articles | ||||||||||||||||||||||
-rmdir ${.CURDIR}/public/${_lang} | ||||||||||||||||||||||
.endfor | ||||||||||||||||||||||
-rmdir ${.CURDIR}/public | ||||||||||||||||||||||
pdf-articles-clean: pdf-articles-target | pdf-articles-clean: pdf-articles-target | |||||||||||||||||||||
.for _curpdf in ${ARTICLESDIR} | .for _curpdf in ${ARTICLESDIR} | |||||||||||||||||||||
rm -f ${.CURDIR}/public${_curpdf:S|^${.CURDIR}/content||}article.pdf | rm -f ${.CURDIR}/public${_curpdf:S|^${.CURDIR}/content||}article.pdf | |||||||||||||||||||||
.endfor | .endfor | |||||||||||||||||||||
.for _lang in ${LANGUAGES:S|,| |g} | .for _lang in ${ARTICLE_LANGS} | |||||||||||||||||||||
rm -fr ${.CURDIR}/public/${_lang}/articles | rm -fr ${.CURDIR}/public/${_lang}/articles | |||||||||||||||||||||
.if !exists(${.CURDIR}/public/${_lang}/books) | .if !exists(${.CURDIR}/public/${_lang}/books) | |||||||||||||||||||||
rm -fr ${.CURDIR}/public/${_lang} | rm -fr ${.CURDIR}/public/${_lang} | |||||||||||||||||||||
.endif | .endif | |||||||||||||||||||||
.endfor | .endfor | |||||||||||||||||||||
@if [ -d ${.CURDIR}/public/ ]; then \ | -rmdir ${.CURDIR}/public | |||||||||||||||||||||
if [ -z "`ls -A ${.CURDIR}/public/`" ]; then \ | ||||||||||||||||||||||
rm -fr ${.CURDIR}/public; \ | ||||||||||||||||||||||
fi; \ | ||||||||||||||||||||||
fi | ||||||||||||||||||||||
Apologies - this is my bug but this should read "with only articles" rather than "without articles".