diff options
author | Ceri Davies <ceri@FreeBSD.org> | 2021-06-29 08:57:30 +0000 |
---|---|---|
committer | Ceri Davies <ceri@FreeBSD.org> | 2021-06-29 09:01:08 +0000 |
commit | caf940e083764a4e1ee6a3624b55f6fb00b0df91 (patch) | |
tree | 70a97aaabf998960361959327032213b80cda0c4 /documentation/Makefile | |
parent | 2d7be12e580bd9a2250a69babe449bfa10c0566f (diff) | |
download | doc-caf940e083764a4e1ee6a3624b55f6fb00b0df91.tar.gz doc-caf940e083764a4e1ee6a3624b55f6fb00b0df91.zip |
Diffstat (limited to 'documentation/Makefile')
-rw-r--r-- | documentation/Makefile | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/documentation/Makefile b/documentation/Makefile index 9ce6a8b616..519f3edb65 100644 --- a/documentation/Makefile +++ b/documentation/Makefile @@ -6,6 +6,7 @@ # Targets intended for use on the command line # # all (default) - generate the books TOC and compile all the documentation +# clean - removes generated files # run - serves the built documentation site for local browsing # pdf - build PDF versions of the articles and books. # @@ -68,6 +69,9 @@ BOOK_LANGS:= ${BOOK_LANGS:N${a}} all: requirements starting-message generate-books-toc generate-pgpkeys-txt build run: requirements starting-message generate-books-toc generate-pgpkeys-txt run-local +# clean does not call pdf-clean as that is a subset of hugo-clean +clean: hugo-clean pgp-clean toc-clean + requirements: .for dep in ${RUN_DEPENDS} .if !exists(${dep}) @@ -98,6 +102,19 @@ run-local: .PHONY build: .PHONY ${HUGO_CMD} ${HUGO_ARGS} +toc-clean: .PHONY + rm -f $$(${PYTHON_CMD} ./tools/books-toc-parts-creator.py -l ${BOOK_LANGS} -o) + rm -f $$(${PYTHON_CMD} ./tools/books-toc-creator.py -l ${BOOK_LANGS} -o) + rm -f $$(${PYTHON_CMD} ./tools/books-toc-figures-creator.py -l ${BOOK_LANGS} -o) + rm -f $$(${PYTHON_CMD} ./tools/books-toc-tables-creator.py -l ${BOOK_LANGS} -o) + rm -f $$(${PYTHON_CMD} ./tools/books-toc-examples-creator.py -l ${BOOK_LANGS} -o) + +pgp-clean: .PHONY + rm -f static/pgpkeys/pgpkeys.txt + +hugo-clean: .PHONY + rm -rf resources public + # # PDF targets # Use DOC_LANG to choose the language, e.g., make DOC_LANG="en fr" pdf-books @@ -189,10 +206,9 @@ pdf-articles: pdf-articles-target pdf-clean: pdf-articles-clean pdf-books-clean -pdf-books-clean: pdf-books-target +pdf-books-clean: pdf-books-target toc-clean .for _curpdf in ${BOOKSDIR} - rm -f ${.CURDIR}/public${_curpdf:S|^${.CURDIR}/content||}book.pdf ${_curpdf}toc*.adoc - rm -fr ${.CURDIR}/public${_curpdf:S|^${.CURDIR}/content||} + rm -f ${.CURDIR}/public${_curpdf:S|^${.CURDIR}/content||}book.pdf .endfor .for _lang in ${LANGUAGES:S|,| |g} rm -fr ${.CURDIR}/public/${_lang}/books @@ -209,7 +225,6 @@ pdf-books-clean: pdf-books-target pdf-articles-clean: pdf-articles-target .for _curpdf in ${ARTICLESDIR} rm -f ${.CURDIR}/public${_curpdf:S|^${.CURDIR}/content||}article.pdf - rm -fr ${.CURDIR}/public${_curpdf:S|^${.CURDIR}/content||} .endfor .for _lang in ${LANGUAGES:S|,| |g} rm -fr ${.CURDIR}/public/${_lang}/articles @@ -222,3 +237,4 @@ pdf-articles-clean: pdf-articles-target rm -fr ${.CURDIR}/public; \ fi; \ fi + |