From: Don Armstrong Date: Thu, 30 Jul 2015 17:14:33 +0000 (-0500) Subject: add makefile templates X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9cfa904ffd0a7583bb68f489aa3733f2359f2762;p=lib.git add makefile templates --- diff --git a/templates/makefiles/knitr_rules.mk b/templates/makefiles/knitr_rules.mk new file mode 100644 index 0000000..5d1bc7e --- /dev/null +++ b/templates/makefiles/knitr_rules.mk @@ -0,0 +1,15 @@ +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('$<')" + +%.pdf: %.tex $(wildcard *.bib) $(wildcard *.tex) + latexmk -pdf -pdflatex='xelatex -interaction=nonstopmode %O %S' -bibtex -use-make $< diff --git a/templates/makefiles/xls_txt_conversion.mk b/templates/makefiles/xls_txt_conversion.mk new file mode 100644 index 0000000..bc04031 --- /dev/null +++ b/templates/makefiles/xls_txt_conversion.mk @@ -0,0 +1,16 @@ +SSCONVERT ?=ssconvert + +%.xls: %.gnumeric + $(SSCONVERT) --export-type Gnumeric_Excel:excel_dsf $< $@ + +%.txt: %.gnumeric + $(SSCONVERT) --export-type Gnumeric_stf:stf_assistant -O 'separator=" " quote="" eol="unix"' $< $@ + +%.txt: %.xls + $(SSCONVERT) --export-type Gnumeric_stf:stf_assistant -O 'separator=" " quote="" eol="unix"' $< $@ + +%.txt: %.xlsx + $(SSCONVERT) --export-type Gnumeric_stf:stf_assistant -O 'separator=" " quote="" eol="unix"' $< $@ + +%.xls: %.txt + txt2xls $< > $@