workshops/Makefile

20 lines
685 B
Makefile
Raw Normal View History

2024-12-06 08:18:40 +00:00
help: ## Print the help message
$(info Make a single pdf by hitting the tab key a lot)
@awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | \
sort | \
column -s ':' -t
# Search should not include slides separated by '***', as those are for mdp, not pandoc.
markdown != find slides/ -maxdepth 2 -type f -name "*.md" -exec grep -LF '***' '{}' ';'
pdfs = $(patsubst %.md, %.pdf, $(markdown))
$(pdfs): %.pdf: %.md
pandoc -t beamer -V theme:Warsaw -i $< -o $@
.PHONY: show
2024-12-09 00:39:47 +00:00
show: $(pdfs) ## Generate all pdfs (try `make -j 4 pdfs`)
2024-12-06 08:18:40 +00:00
.PHONY: clean
clean: ## Delete all pdfs
find . -name "*.pdf" -exec rm '{}' ';'