Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/vignettes premade (closes #1004) #1005

Merged
merged 9 commits into from Oct 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .Rbuildignore
Expand Up @@ -24,4 +24,5 @@ docker
^GRTAGS
^GTAGS
^local
vignettes/Makefile
vignettes/Makefile
vignettes/rmd
20 changes: 20 additions & 0 deletions ChangeLog
@@ -1,3 +1,23 @@
2019-10-26 Dirk Eddelbuettel <edd@debian.org>

* vignettes/Rcpp-package.Rnw: Another wrapper
* vignettes/Rcpp-jss-2011.Rnw: Idem

* vignettes/Makefile: Refinements
* vignettes/rmd/Makefile: Idem

* cleanup: Removed bashism, added invocation of make clean

2019-10-23 Dirk Eddelbuettel <edd@debian.org>

* vignettes/Rcpp-*.Rnw: Wrappers around pdf/*pdf
* vignettes/Makefile: Added

2019-10-21 Dirk Eddelbuettel <edd@debian.org>

* vignettes/rmd/*: Moved from parent directory
* vignettes/pdf/*: New target directory

2019-10-20 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Roll minor version
Expand Down
7 changes: 5 additions & 2 deletions cleanup
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

#cd inst/doc && rm -f index.html *.tex *.bbl *.blg *.aux *.out *.log && cd -

Expand Down Expand Up @@ -30,7 +30,10 @@ rm -f confdefs.h config.log config.status \
vignettes/*.toc vignettes/*.tpt vignettes/*.xwm

rm -rf autom4te.cache inst/lib/ inst/doc/man/ inst/doc/html/ inst/doc/latex/ \
inst/doc/auto inst/bib/auto inst/doc/Rcpp-*/auto/ src-* vignettes/auto
inst/doc/auto inst/bib/auto inst/doc/Rcpp-*/auto/ src-* vignettes/auto

find . -name \*~ -exec rm {} \;
find . -name \*.flc -exec rm {} \;

(cd vignettes/ && make clean && cd -) >/dev/null
(cd vignettes/rmd/ && make clean && cd -) >/dev/null
2 changes: 1 addition & 1 deletion inst/NEWS.Rd
Expand Up @@ -12,7 +12,7 @@
\item Compilation can be sped up by toggling \code{RCPP_NO_RTTI} which
implies \code{RCPP_NO_MODULES} (Dirk in \ghpr{998} fixing \ghit{998}).
\item \code{XPtr} tags are now preserved in \code{as<>} (Stephen Wade
in \phpr{1003} fixing \ghpr{986})
in \ghpr{1003} fixing \ghit{986})
}
\item Changes in Rcpp Modules:
\itemize{
Expand Down
1 change: 1 addition & 0 deletions vignettes/.gitignore
Expand Up @@ -7,3 +7,4 @@ Rcpp-*.log
Rcpp-*.tex
Rcpp-*.pdf
unitTests-results/
rmd/figures/bootstrap.pdf
40 changes: 33 additions & 7 deletions vignettes/Makefile
@@ -1,14 +1,40 @@

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

rmdsources := $(wildcard *.Rmd)
rmdvignettes := $(rmdsources:.Rmd=.pdf)
##rnwsources : = $ ( wildcard *.Rnw )
##rnwvignettes : = $ ( rnwsources:.Rnw=.pdf )

%.pdf: %.Rmd
Rscript -e 'rmarkdown::render("$<")'
Rscript -e 'tools::compactPDF("$@", gs_quality="ebook")'
rnwsources = Rcpp-attributes.Rnw \
Rcpp-extending.Rnw \
Rcpp-FAQ.Rnw \
Rcpp-introduction.Rnw \
Rcpp-jss-2011.Rnw \
Rcpp-modules.Rnw \
Rcpp-package.Rnw \
Rcpp-quickref.Rnw \
Rcpp-sugar.Rnw

all: ${rmdvignettes} Rcpp-jss-2011.pdf
rnwvignettes = Rcpp-attributes.pdf \
Rcpp-extending.pdf \
Rcpp-FAQ.pdf \
Rcpp-introduction.pdf \
Rcpp-jss-2011.pdf \
Rcpp-modules.pdf \
Rcpp-package.pdf \
Rcpp-quickref.pdf \
Rcpp-sugar.pdf

Rcpp-jss-2011.pdf: Rcpp-jss-2011.Rnw
%.tex: %.Rnw
Rscript -e 'Sweave("$<")'

%.pdf: %.tex
Rscript -e 'tools::texi2pdf("$<", texi2dvi="pdflatex")'
Rscript -e 'tools::texi2pdf("$<", texi2dvi="pdflatex")'
Rscript -e 'tools::compactPDF("$@", gs_quality="ebook")'

all: ${rnwvignettes}
@rm -f *.aux *.log *.tex

clean:
@rm -f *.aux *.log *.tex
10 changes: 10 additions & 0 deletions vignettes/Rcpp-FAQ.Rnw
@@ -0,0 +1,10 @@
\documentclass{article}
\usepackage{pdfpages}
%\VignetteIndexEntry{Rcpp-FAQ}
%\VignetteKeywords{Rcpp, FAQ, R, Cpp}
%\VignettePackage{Rcpp}
%\VignetteEncoding{UTF-8}

\begin{document}
\includepdf[pages=-, fitpaper=true]{pdf/Rcpp-FAQ.pdf}
\end{document}
10 changes: 10 additions & 0 deletions vignettes/Rcpp-attributes.Rnw
@@ -0,0 +1,10 @@
\documentclass{article}
\usepackage{pdfpages}
%\VignetteIndexEntry{Rcpp-attributes}
%\VignetteKeywords{Rcpp, attributes, R, Cpp}
%\VignettePackage{Rcpp}
%\VignetteEncoding{UTF-8}

\begin{document}
\includepdf[pages=-, fitpaper=true]{pdf/Rcpp-attributes.pdf}
\end{document}
10 changes: 10 additions & 0 deletions vignettes/Rcpp-extending.Rnw
@@ -0,0 +1,10 @@
\documentclass{article}
\usepackage{pdfpages}
%\VignetteIndexEntry{Rcpp-extending}
%\VignetteKeywords{Rcpp, extending, R, Cpp}
%\VignettePackage{Rcpp}
%\VignetteEncoding{UTF-8}

\begin{document}
\includepdf[pages=-, fitpaper=true]{pdf/Rcpp-extending.pdf}
\end{document}
11 changes: 11 additions & 0 deletions vignettes/Rcpp-introduction.Rnw
@@ -0,0 +1,11 @@
\documentclass{article}
\usepackage{pdfpages}
%\VignetteIndexEntry{Rcpp-introduction}
%\VignetteKeywords{Rcpp, R, Cpp}
%\VignettePackage{Rcpp}
%\VignetteEncoding{UTF-8}

\begin{document}
\includepdf[pages=-, fitpaper=true]{pdf/Rcpp-introduction.pdf}
\end{document}