Commit eb209df0 authored by Bernhard Heinloth's avatar Bernhard Heinloth
Browse files

Support different generators

parent d2a751a9
SCREENSHOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/.screenshots
TARGET := demo.pdf
include theme/Makefile
all: demo
.PHONY: alldemo demo-xelatex demo-lualatex demo-pdflatex
demo-xelatex: LATEXMK_GEN := -xelatex
demo-lualatex: LATEXMK_GEN := -lualatex
demo-pdflatex: LATEXMK_GEN := -pdf
.PHONY: demo
demo-xelatex demo-lualatex demo-pdflatex: clean
demo: demo.pdf
mkdir .screenshots
pdftoppm -scale-to 500 -f 1 -l 5 -jpeg $< $(SCREENSHOT_DIR)/$@
demo demo-xelatex demo-lualatex demo-pdflatex: $(TARGET)
test -d "$(SCREENSHOT_DIR)" || mkdir "$(SCREENSHOT_DIR)"
pdftoppm -scale-to 500 -f 1 -l 5 -png $< "$(SCREENSHOT_DIR)/$@"
mrproper::
@rm -f demo.pdf $(SCREENSHOT_DIR)/demo-*.jpg
@rmdir $(SCREENSHOT_DIR)
rm -f "$(TARGET)" "$(SCREENSHOT_DIR)"/demo-*.png
test -d "$(SCREENSHOT_DIR)" && rmdir --ignore-fail-on-non-empty "$(SCREENSHOT_DIR)"
include theme/Makefile
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment