/
Makefile
92 lines (61 loc) · 2.03 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
## This is bbmisc
current: target
-include target.mk
######################################################################
## Content
rmdfiles = $(wildcard *.rmd)
rmdh = $(rmdfiles:%.rmd=%.html)
Sources += $(rmdfiles)
Ignore += $(rmdh)
peak_I.html: peak_I.rmd
peak_I_simple.html: peak_I_simple.rmd
peak_reduction.Rout: peak_reduction.R
######################################################################
## Spline stuff 2022 Nov 07 (Mon)
## git diff dca3b2c0 -- Rmisc/spline_quantiles.R
Sources += Rmisc/spline_quantiles.R
Rmisc/spline_quantiles.Rout: Rmisc/spline_quantiles.R
$(pipeR)
######################################################################
## Rules from Bolker
%.html: %.qmd
quarto render $<
%.pdf: %.pdf
quarto render $< --to pdf
%.html: %.[Rr]md
Rscript -e "library(\"rmarkdown\"); render(\"$<\")"
%.html: %.md
Rscript -e "library(\"rmarkdown\"); render(\"$<\")"
%.md: %.rmd
Rscript -e "library(\"knitr\"); knit(\"$<\")"
%.tex: %.Rnw
Rscript -e "library(\"knitr\"); knit(\"$<\")"
%.tex: %.md
pandoc -s -S -t latex -V documentclass=tufte-handout $*.md -o $*.tex
%.pdf: %.md
echo "rmarkdown::render(\"$<\", output_format=\"pdf_document\")" | R --slave
%.pdf: %.tex
pdflatex --interaction=nonstopmode $*
clean:
rm -f *.log *.aux *.md *.out *.nav *.snm *.toc *.vrb texput.log *~
peeves: peeves.md
Rscript -e 'rmarkdown::render("peeves.md")'
mv peeves.html docs/
rtips: r_parallel_hpc.rmd
Rscript -e 'rmarkdown::render("r_parallel_hpc.rmd")'
mv r_parallel_hpc.html docs/
######################################################################
## makestuff needs to be made manually, since we want to allow Bolker-style making without makestuff
alldirs += bayes
Sources += Makefile
Ignore += makestuff
msrepo = https://github.com/dushoff
makestuff: makestuff/Makefile
makestuff/Makefile:
(ls ../makestuff/Makefile && /bin/ln -s ../makestuff) || git clone $(msrepo)/makestuff
ls $@
-include makestuff/os.mk
-include makestuff/pipeR.mk
-include makestuff/git.mk
-include makestuff/visual.mk
-include makestuff/projdir.mk