]> git.donarmstrong.com Git - presentations/genome_diversity_oct_2016.git/blobdiff - Makefile
add makefile and gitignore
[presentations/genome_diversity_oct_2016.git] / Makefile
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..a655bfc
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+#!/usr/bin/make -f
+
+all: simmons_genome_diversity_oct_2016.pdf
+
+R ?= R
+
+%.pdf: %.svg
+       inkscape -A $@ $<
+       pdfcrop $@
+       mv $(dir $@)*-crop.pdf $@
+
+%.png: %.svg
+       inkscape -e $@ -d 300 $<
+
+%.tex: %.Rnw
+       $(R) --encoding=utf-8 -e "library('knitr'); knit('$<')"
+
+simmons_genome_diversity_oct_2016.pdf:                                                                 \
+simmons_genome_diversity_oct_2016.tex genome_diversity_paper figures
+
+%.pdf: %.tex $(wildcard *.bib) $(wildcard *.tex)
+       latexmk -f -pdf -pdflatex='xelatex -shell-escape -8bit -interaction=nonstopmode %O %S' -bibtex -use-make $<
+
+