CONTENTDIR = content STATICDIR = static BUILDDIR = build all: html help: @echo 'Build site' @echo @echo 'Available targets:' @echo @echo ' html render HTML' @echo ' serve serve site' @echo ' css generate Pygments stylesheet' @echo @echo 'Run without target to build html' html: test -d $(BUILDDIR) && rm -rf $(BUILDDIR) || true python rstw serve: if hash http-server; \ then \ http-server $(BUILDDIR)/; \ else \ python3 -m http.server --directory $(BUILDDIR)/; \ fi css: mkdir -pv $(STATICDIR)/css/pygments pygmentize -f html -S $(filter-out $@,$(MAKECMDGOALS)) -a .highlight \ > $(STATICDIR)/css/pygments/$(filter-out $@,$(MAKECMDGOALS)).css %: @: