pandoc_sources := $(wildcard *.md) presentations = $(pandoc_sources:%.md=%.html) basedir = ../.. core_code_files := reset.css reveal.css theme/black.css reveal.js plugin_code_files := notes/notes.js search/search.js zoom/zoom.js all_core_code_files = $(core_code_files:%=$(basedir)/revealjs/dist/%) all_plugin_code_files = $(plugin_code_files:%=$(basedir)/revealjs/plugin/%) all: $(presentations) $(presentations): %.html : %.md $(basedir)/.gitignore \ $(all_core_code_files) $(all_plugin_code_files) # mkdir -p $(dir $@) pandoc -f commonmark_x -t revealjs --slide-level=2 --standalone -V revealjs-url=$(basedir)/revealjs --resource-path=.. -o "$@" -- "$<" $(all_core_code_files): $(basedir)/revealjs/dist/%: wget -P revealjs -x -nH --cut-dirs=2 --directory-prefix=$(basedir)/revealjs/dist https://unpkg.com/reveal.js@^4/dist/"$*" $(all_plugin_code_files): $(basedir)/revealjs/plugin/%: wget -P revealjs -x -nH --cut-dirs=1 --directory-prefix=$(basedir)/revealjs https://unpkg.com/reveal.js@^4/plugin/"$*"