Copy images and allow minted to execute lexer

This commit is contained in:
Valentin Brandl 2018-11-15 11:54:25 +01:00
parent 2fb821b474
commit e432146791
No known key found for this signature in database
GPG Key ID: 30D341DD34118D7D

View File

@ -3,6 +3,9 @@
COPY_PDF=$(shell find . -name '*.pdf' -not -path './build/*') COPY_PDF=$(shell find . -name '*.pdf' -not -path './build/*')
COPY_TARGETS=$(COPY_PDF:%.pdf=build/%.pdf) 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/*") MD_SOURCES=$(shell find . -name '*.md' -not -path "./templates/*")
HTML_TARGETS=$(MD_SOURCES:%.md=build/%.html) HTML_TARGETS=$(MD_SOURCES:%.md=build/%.html)
PDF_TARGETS=$(MD_SOURCES:%.md=build/%.pdf) PDF_TARGETS=$(MD_SOURCES:%.md=build/%.pdf)
@ -17,7 +20,7 @@ COMPRESS_TARGETS=$(HTML_TARGETS:%=%.gz)
COMPRESS_TARGETS+=$(PDF_TARGETS:%=%.gz) COMPRESS_TARGETS+=$(PDF_TARGETS:%=%.gz)
COMPRESS_TARGETS+=$(TEX_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) compress: default $(COMPRESS_TARGETS)
@ -35,7 +38,7 @@ build/%.png: %.dot
build/%.pdf: %.tex build/%.pdf: %.tex
@mkdir -p $$(dirname $@) @mkdir -p $$(dirname $@)
latexmk -pdf -outdir=$$(dirname $@) $< latexmk -shell-escape -pdf -outdir=$$(dirname $@) $<
%.gz: % %.gz: %
gzip -k -f -9 $< gzip -k -f -9 $<
@ -44,5 +47,9 @@ build/%.pdf: %.pdf
@mkdir -p $$(dirname $@) @mkdir -p $$(dirname $@)
cp $< $@ cp $< $@
build/%.jpg: %.jpg
@mkdir -p $$(dirname $@)
cp $< $@
clean: clean:
rm -r build rm -r build