diff --git a/Makefile b/Makefile index d15744a..da85835 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,14 @@ DOT_TARGETS=$(DOT_SOURCES:%.dot=build/%.png) TEX_SOURCES=$(shell find . -not -path "./templates/*" -name '*.tex') TEX_TARGETS=$(TEX_SOURCES:%.tex=build/%.pdf) +COMPRESS_TARGETS=$(HTML_TARGETS:%=%.gz) +COMPRESS_TARGETS+=$(PDF_TARGETS:%=%.gz) +COMPRESS_TARGETS+=$(TEX_TARGETS:%=%.gz) + default: $(DOT_TARGETS) $(HTML_TARGETS) $(PDF_TARGETS) $(TEX_TARGETS) +compress: default $(COMPRESS_TARGETS) + build/%.html: %.md @mkdir -p $$(dirname $@) pandoc -s --mathjax --template ./templates/mindoc.html --toc --toc-depth=2 -o $@ $< @@ -28,5 +34,8 @@ build/%.pdf: %.tex @mkdir -p $$(dirname $@) latexmk -pdf -outdir=$$(dirname $@) $< +%.gz: % + gzip -k -f -9 $< + clean: rm -r build