-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
36 lines (28 loc) · 1.02 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
# run `make vignettes && make clean` before `R CMD build ...`
vignettes: vignettes/paper.Rtex
vignettes/paper-original.Rnw: paper.Rnw
cp paper.Rnw vignettes/paper-original.Rnw
vignettes/paper-Sweave.Rtex: vignettes/paper-original.Rnw
R -e 'knitr::knit("vignettes/paper-original.Rnw")'
mv paper-original.tex vignettes/paper-original.tex
mv vignettes/paper-original.tex vignettes/paper-Sweave.Rtex
mv Figures vignettes/Figures
vignettes/paper.Rtex: vignettes/paper-knitr.Rtex
cp vignettes/paper-knitr.Rtex vignettes/paper.Rtex
vignettes/paper-knitr.Rtex: vignettes/paper-Sweave.Rtex
R -e 'knitr::Sweave2knitr("vignettes/paper-Sweave.Rtex")'
mv vignettes/paper-Sweave-knitr.Rtex vignettes/paper-knitr.Rtex
clean:
rm -rf \
vignettes/paper-original.Rnw \
vignettes/paper-knitr.Rtex \
vignettes/paper-Sweave.Rtex \
vignettes/Sweave.sty
distclean:
rm -rf \
vignettes/paper-original.Rnw \
vignettes/paper-knitr.Rtex \
vignettes/paper-Sweave.Rtex \
vignettes/Sweave.sty \
vignettes/paper.Rtex \
vignettes/Figures