Skip to content

Commit d829f58

Browse files
committed
refinements to Makefiles
1 parent 797e7f8 commit d829f58

File tree

3 files changed

+36
-7
lines changed

3 files changed

+36
-7
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
* vignettes/Rcpp-package.Rnw: Another wrapper
44
* vignettes/Rcpp-jss-2011.Rnw: Idem
55

6+
* vignettes/Makefile: Refinements
7+
* vignettes/rmd/Makefile: Idem
8+
69
2019-10-23 Dirk Eddelbuettel <[email protected]>
710

811
* vignettes/Rcpp-*.Rnw: Wrappers around pdf/*pdf

vignettes/Makefile

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
11

2+
## No GNUmake for R so replacing efficient wildcard ops with explicit enumeration
3+
## Remove spaces between ': =' and '$ ( ... )' to re-activate
24

3-
rnwsources := $(wildcard *.Rnw)
4-
rnwvignettes := $(rnwsources:.Rnw=.pdf)
5+
##rnwsources : = $ ( wildcard *.Rnw )
6+
##rnwvignettes : = $ ( rnwsources:.Rnw=.pdf )
7+
8+
rnwsources = Rcpp-attributes.Rnw \
9+
Rcpp-extending.Rnw \
10+
Rcpp-FAQ.Rnw \
11+
Rcpp-introduction.Rnw \
12+
Rcpp-jss-2011.Rnw \
13+
Rcpp-modules.Rnw \
14+
Rcpp-package.Rnw \
15+
Rcpp-quickref.Rnw \
16+
Rcpp-sugar.Rnw
17+
18+
rnwvignettes = Rcpp-attributes.pdf \
19+
Rcpp-extending.pdf \
20+
Rcpp-FAQ.pdf \
21+
Rcpp-introduction.pdf \
22+
Rcpp-jss-2011.pdf \
23+
Rcpp-modules.pdf \
24+
Rcpp-package.pdf \
25+
Rcpp-quickref.pdf \
26+
Rcpp-sugar.pdf
527

628
%.tex: %.Rnw
729
Rscript -e 'Sweave("$<")'
@@ -12,6 +34,4 @@ rnwvignettes := $(rnwsources:.Rnw=.pdf)
1234
Rscript -e 'tools::compactPDF("$@", gs_quality="ebook")'
1335

1436
all: ${rnwvignettes}
15-
16-
clean:
17-
rm -f *.aux *.log *.tex
37+
@rm -f *.aux *.log *.tex

vignettes/rmd/Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
## This Makefile is not included in the package sources so we can use GNUmake idioms. Yay.
23

34
rmdsources := $(wildcard *.Rmd)
45
rmdvignettes := $(rmdsources:.Rmd=.pdf)
@@ -10,9 +11,14 @@ rmdvignettes := $(rmdsources:.Rmd=.pdf)
1011

1112
all: ${rmdvignettes} Rcpp-jss-2011.pdf
1213

13-
Rcpp-jss-2011.pdf: Rcpp-jss-2011.Rnw
14+
Rcpp-jss-2011.tex: Rcpp-jss-2011.Rnw
1415
Rscript -e 'Sweave("$<")'
16+
17+
Rcpp-jss-2011.pdf: Rcpp-jss-2011.tex
18+
Rscript -e 'tools::texi2pdf("$<", texi2dvi="pdflatex")'
19+
Rscript -e 'tools::texi2pdf("$<", texi2dvi="pdflatex")'
1520
Rscript -e 'tools::compactPDF("$@", gs_quality="ebook")'
21+
cp -vax $@ ../pdf
1622

1723
clean:
18-
rm -rf *.aux *.log *.tex *.pdf Rcpp-introduction_cache pinp.cls jss.bst
24+
@rm -rf *.aux *.log *.out *.tex *.pdf Rcpp-introduction_cache pinp.cls

0 commit comments

Comments
 (0)