contrib--caracol-community/Makefile

63 lines
1.3 KiB
Makefile

SLIDES_MD=$(shell find slides \( -name '*.md' ! -name '_*' \))
SLIDES_PDF=$(patsubst slides/%.md,build/slides/%.pdf,$(SLIDES_MD))
all: help
echo:
@echo "SLIDES = $(SLIDES_PDF)"
prepare:
pipenv install
watch: ## run development server
pipenv run honcho start
watch-slides:
npx marp --engine $$(pwd)/engine.js --html --theme theme.css -w slides -s
watch-docs:
pipenv run mkdocs serve --dev-addr 0.0.0.0:5001
serve: watch
tocupdate:
while inotifywait -q -e move -e modify -e create -e attrib -e delete -r docs ; do \
sleep 1 ; \
pipenv run ./scripts/update-toc ; \
done
build/slides/%.pdf: slides/%.md
mkdir -p build/slides
npx marp --allow-local-files \
--engine $$(pwd)/engine.js \
--html \
--theme theme.css \
$< \
-o $@
build-slides: $(SLIDES_PDF) $(SLIDES_MD)
build-docs:
pipenv run mkdocs build
build: build-docs build-slides ## build static pages
.PHONY: build build-slides
install: ## deploy static pages to github
git push
pipenv run mkdocs gh-deploy
help: ## print this help
@echo "Usage: make <target>"
@echo ""
@echo "With one of following targets:"
@echo ""
@awk 'BEGIN {FS = ":.*?## "} \
/^[a-zA-Z_-]+:.*?## / \
{ sub("\\\\n",sprintf("\n%22c"," "), $$2); \
printf("\033[36m%-20s\033[0m %s\n", $$1, $$2); \
}' $(MAKEFILE_LIST)
@echo ""