Changeset View
Changeset View
Standalone View
Standalone View
website/Makefile
Context not available. | |||||
MAINTAINER=carlavilla@FreeBSD.org | MAINTAINER=carlavilla@FreeBSD.org | ||||
# List of all languages we have content for | |||||
dbaio: Please, add this comment to `documentation/Makefile` as well | |||||
ALL_LANGUAGES= de el en es fr hu it ja nl ru tr zh-cn zh-tw | |||||
PYTHON_CMD = /usr/local/bin/python3 | PYTHON_CMD = /usr/local/bin/python3 | ||||
HUGO_CMD = /usr/local/bin/hugo | HUGO_CMD = /usr/local/bin/hugo | ||||
HUGO_ARGS?= --verbose | HUGO_ARGS?= --verbose | ||||
Context not available. | |||||
.HOST=$(HOSTNAME) | .HOST=$(HOSTNAME) | ||||
.endif | .endif | ||||
.if defined(DOC_LANG) && !empty(DOC_LANG) | |||||
LANGUAGES= ${DOC_LANG:S/,/ /g} | |||||
.if ${LANGUAGES:Men} == "" | |||||
.warning "Warning: cannot skip 'en'; adding it back" | |||||
LANGUAGES+= en | |||||
.endif | |||||
.else | |||||
LANGUAGES= ${ALL_LANGUAGES} | |||||
.endif | |||||
# Take the list of all languages, and take out the ones we have been | |||||
# asked for via DOC_LANG. We'll feed this to hugo. | |||||
SKIP_LANGS= | |||||
.for a in ${ALL_LANGUAGES} | |||||
.if ${LANGUAGES:M${a}} == "" | |||||
SKIP_LANGS+= ${a} | |||||
.endif | |||||
.endfor | |||||
.ORDER: all run | .ORDER: all run | ||||
.ORDER: starting-message generate-releases | .ORDER: starting-message generate-releases | ||||
Context not available. | |||||
starting-message: .PHONY | starting-message: .PHONY | ||||
@echo "---------------------------------------------------------------" | @echo "---------------------------------------------------------------" | ||||
@echo "Building the website started on $$(date)" | @echo "Building the website started on $$(date)" | ||||
@echo " included languages: ${LANGUAGES}" | |||||
@echo " excluded languages: ${SKIP_LANGS}" | |||||
Done Inline ActionsMessages are different from documentation/Makefile, I think it's better to keep them equal. dbaio: Messages are different from `documentation/Makefile`, I think it's better to keep them equal. | |||||
@echo "---------------------------------------------------------------" | @echo "---------------------------------------------------------------" | ||||
end-message: .PHONY | end-message: .PHONY | ||||
Context not available. | |||||
${PYTHON_CMD} ./tools/releases-toml.py -p ./shared/releases.adoc | ${PYTHON_CMD} ./tools/releases-toml.py -p ./shared/releases.adoc | ||||
run-local: .PHONY | run-local: .PHONY | ||||
${HUGO_CMD} server ${HUGO_ARGS} -D $(BIND:D--bind=$(BIND)) --baseURL="http://$(.HOST):1313" | HUGO_DISABLELANGUAGES="${SKIP_LANGS}" ${HUGO_CMD} server \ | ||||
${HUGO_ARGS} -D $(BIND:D--bind=$(BIND)) --baseURL="http://$(.HOST):1313" | |||||
build: .PHONY | build: .PHONY | ||||
${HUGO_CMD} ${HUGO_ARGS} | HUGO_DISABLELANGUAGES="${SKIP_LANGS}" ${HUGO_CMD} ${HUGO_ARGS} | ||||
post-build: cgi-permissions | post-build: cgi-permissions | ||||
Context not available. |
Please, add this comment to documentation/Makefile as well