Permalink
Browse files

build: if pdflatex not present, don't build vignettes. Fixes #173

  • Loading branch information...
1 parent bd5f803 commit 48eb7b96967a9f02b3279ecee6a0c85fec9b1c67 @wch wch committed Dec 15, 2012
Showing with 9 additions and 2 deletions.
  1. +9 −2 R/build.r
View
@@ -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)

0 comments on commit 48eb7b9

Please sign in to comment.