diff --git a/Makefile b/Makefile index 0565a10..a0dc83c 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,9 @@ COPY_PDF=$(shell find . -name '*.pdf' -not -path './build/*') COPY_TARGETS=$(COPY_PDF:%.pdf=build/%.pdf) +COPY_JPG=$(shell find . -name '*.jpg' -not -path './build/*') +COPY_TARGETS_JPG=$(COPY_JPG:%.jpg=build/%.jpg) + MD_SOURCES=$(shell find . -name '*.md' -not -path "./templates/*") HTML_TARGETS=$(MD_SOURCES:%.md=build/%.html) PDF_TARGETS=$(MD_SOURCES:%.md=build/%.pdf) @@ -17,7 +20,7 @@ COMPRESS_TARGETS=$(HTML_TARGETS:%=%.gz) COMPRESS_TARGETS+=$(PDF_TARGETS:%=%.gz) COMPRESS_TARGETS+=$(TEX_TARGETS:%=%.gz) -default: $(DOT_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(TEX_TARGETS) $(COPY_TARGETS) +default: $(DOT_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(TEX_TARGETS) $(COPY_TARGETS) $(COPY_TARGETS_JPG) compress: default $(COMPRESS_TARGETS) @@ -35,7 +38,7 @@ build/%.png: %.dot build/%.pdf: %.tex @mkdir -p $$(dirname $@) - latexmk -pdf -outdir=$$(dirname $@) $< + latexmk -shell-escape -pdf -outdir=$$(dirname $@) $< %.gz: % gzip -k -f -9 $< @@ -44,5 +47,9 @@ build/%.pdf: %.pdf @mkdir -p $$(dirname $@) cp $< $@ +build/%.jpg: %.jpg + @mkdir -p $$(dirname $@) + cp $< $@ + clean: rm -r build