Changeset View
Changeset View
Standalone View
Standalone View
website/Makefile
Show All 11 Lines | |||||
# available for local browsing. The website should have been built prior | # available for local browsing. The website 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 | ||||
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 | |||||
RUBYLIB = ../shared/lib | RUBYLIB = ../shared/lib | ||||
.export RUBYLIB | .export RUBYLIB | ||||
.ifndef HOSTNAME | .ifndef HOSTNAME | ||||
.HOST+=localhost | .HOST+=localhost | ||||
.else | .else | ||||
.HOST+=$(HOSTNAME) | .HOST+=$(HOSTNAME) | ||||
.endif | .endif | ||||
Show All 18 Lines | end-message: .PHONY | ||||
@echo "---------------------------------------------------------------" | @echo "---------------------------------------------------------------" | ||||
@echo "Building the website completed on $$(date)" | @echo "Building the website completed on $$(date)" | ||||
@echo "---------------------------------------------------------------" | @echo "---------------------------------------------------------------" | ||||
generate-releases: .PHONY | generate-releases: .PHONY | ||||
${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 -D $(BIND:D--bind=$(BIND)) --baseURL="http://$(.HOST):1313" | ${HUGO_CMD} server ${HUGO_ARGS} -D $(BIND:D--bind=$(BIND)) --baseURL="http://$(.HOST):1313" | ||||
build: .PHONY | build: .PHONY | ||||
${HUGO_CMD} | ${HUGO_CMD} ${HUGO_ARGS} | ||||
post-build: cgi-permissions | post-build: cgi-permissions | ||||
cgi-permissions: | cgi-permissions: | ||||
@chmod 555 ./public/cgi/*.cgi | @chmod 555 ./public/cgi/*.cgi | ||||