aboutsummaryrefslogtreecommitdiff
path: root/documentation
diff options
context:
space:
mode:
authorDanilo G. Baio <dbaio@FreeBSD.org>2021-10-09 21:13:16 +0000
committerDanilo G. Baio <dbaio@FreeBSD.org>2021-10-09 21:13:16 +0000
commit151b473480373cea7cdc1af86a1e7837976429a1 (patch)
treea72de7bafd8faf38d0559a50fe499bb9b5e37cbf /documentation
parentbc33e86596601ce58a9451019f9d7d59cfa84043 (diff)
downloaddoc-151b473480373cea7cdc1af86a1e7837976429a1.tar.gz
doc-151b473480373cea7cdc1af86a1e7837976429a1.zip
documentation: Remove asciidoctor-pdf from default requirements
With the current requirements, if textproc/docproj is built with PDF option disabled, you can't build the documentation. This fixes that, and now asciidoctor-pdf will be checked only when building PDF. Reported by: jhb
Diffstat (limited to 'documentation')
-rw-r--r--documentation/Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/documentation/Makefile b/documentation/Makefile
index c8c4f4322d..44bb80fa28 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -52,7 +52,6 @@ RUBYLIB = ../shared/lib
RUN_DEPENDS= ${PYTHON_CMD} \
${HUGO_CMD} \
${LOCALBASE}/bin/asciidoctor \
- ${LOCALBASE}/bin/asciidoctor-pdf \
${LOCALBASE}/bin/rougify
.ifndef HOSTNAME
@@ -108,6 +107,12 @@ requirements:
.endif
.endfor
+requirements-pdf:
+.if !exists(${LOCALBASE}/bin/asciidoctor-pdf)
+ @(echo ${LOCALBASE}/bin/asciidoctor-pdf not found, please run 'pkg install rubygem-asciidoctor-pdf'; exit 1)
+.endif
+
+
starting-message: .PHONY
@echo ---------------------------------------------------------------
@echo Building the documentation
@@ -169,7 +174,7 @@ TTMP += ${.CURDIR}/content/${_lang}/articles/*/
.endfor
ARTICLESDIR != echo ${TTMP}
-pdf-books: pdf-books-target generate-books-toc
+pdf-books: requirements-pdf pdf-books-target generate-books-toc
# Books build
#
@@ -213,7 +218,7 @@ pdf-books: pdf-books-target generate-books-toc
.endif
.endfor
-pdf-articles: pdf-articles-target
+pdf-articles: requirements-pdf pdf-articles-target
# Articles build
.for _curpdf in ${ARTICLESDIR}