contrib--caracol-community/Makefile

63 lines
1.3 KiB
Makefile
Raw Normal View History

2020-04-08 18:29:10 +00:00
2020-04-15 12:07:35 +00:00
SLIDES_MD=$(shell find slides \( -name '*.md' ! -name '_*' \))
SLIDES_PDF=$(patsubst slides/%.md,build/slides/%.pdf,$(SLIDES_MD))
2020-04-08 18:29:10 +00:00
all: help
2020-04-15 12:07:35 +00:00
echo:
@echo "SLIDES = $(SLIDES_PDF)"
2020-04-08 18:29:10 +00:00
prepare:
pipenv install
watch: ## run development server
pipenv run honcho start
2020-04-15 12:07:35 +00:00
watch-slides:
npx marp --engine $$(pwd)/engine.js --html --theme theme.css -w slides -s
watch-docs:
2020-04-08 18:29:10 +00:00
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
2020-04-15 12:07:35 +00:00
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:
2020-04-08 18:29:10 +00:00
pipenv run mkdocs build
2020-04-15 12:07:35 +00:00
build: build-docs build-slides ## build static pages
.PHONY: build build-slides
2020-04-08 18:29:10 +00:00
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 ""