Skip to content

Commit

Permalink
build: if pdflatex not present, don't build vignettes. Fixes #173
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Dec 16, 2012
1 parent bd5f803 commit 48eb7b9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions R/build.r
Expand Up @@ -22,8 +22,15 @@ build <- function(pkg = ".", path = NULL, binary = FALSE) {
cmd <- paste("CMD INSTALL ", shQuote(pkg$path), " --build", sep = "")
ext <- if (.Platform$OS.type == "windows") "zip" else "tgz"
} else {
cmd <- paste("CMD build ", shQuote(pkg$path),
" --no-manual --no-resave-data", sep = "")
args <- " --no-manual --no-resave-data"

if (!nzchar(Sys.which("pdflatex"))) {
message("pdflatex not found. Not building PDF vignettes.")
args <- paste(args, "--no-vignettes")
}

cmd <- paste("CMD build ", shQuote(pkg$path), args, sep = "")

ext <- "tar.gz"
}
R(cmd, path)
Expand Down

0 comments on commit 48eb7b9

Please sign in to comment.