diff --git a/.gitignore b/.gitignore index 65d7db3..eca09bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ *.pdf *.epub -Makefile *.xcf diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8afe6f5 --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +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 +show: $(pdfs) ## Generate all pdfs + +.PHONY: clean +clean: ## Delete all pdfs + find . -name "*.pdf" -exec rm '{}' ';' diff --git a/configure b/configure deleted file mode 100755 index b1e1664..0000000 --- a/configure +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/bash -FOLDERS=$(cd slides/ ; echo *) - -rm -f Makefile -echo -n 'all:' >> Makefile -for i in $FOLDERS ; do echo -n " $i.pdf" >> Makefile ; done -echo "" >> Makefile - -for i in $FOLDERS ; do echo -e "$i.pdf:\n\tpandoc -t beamer -V theme:Warsaw -i slides/$i/$i.md -o slides/$i/$i.pdf\n" >> Makefile ; done - -echo -ne "clean:\n\trm -f" >> Makefile -for i in $FOLDERS; do echo -n " slides/$i/$i.pdf" >> Makefile ; done -echo "" >> Makefile