-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
32 lines (19 loc) · 914 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.PHONY: help script clean
help: ## Prints a help guide
@echo "Available tasks:"
@grep -E '^[\%a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
all: script script-docx slides ## Build everything
script: script.pdf ## Generate script as a PDF
script-docx: script.docx ## Generate script as a Microsoft Word document
slides: slides.html ## Generate revealjs slides
slides-pdf: slides.pdf ## Generate LaTeX beamer PDF slides
script.pdf: script.md
pandoc -o $@ $< -V geometry:margin=1in -V papersize=a5
script.docx: script.md
pandoc -o $@ $<
slides.html: slides.md Makefile
pandoc -t revealjs -s -o slides.html slides.md -V revealjs-url=./reveal.js -V transition=fade --slide-level 2 -i --highlight-style zenburn
slides.pdf: slides.md
pandoc -o $@ $< -t beamer
clean: ## Remove generated files
rm -rf *.pdf *.docx *.html