Skip to content

Commit

Permalink
Have R CMD Rd2pdf optionally use stage23 partial Rd db.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@84751 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
hornik committed Jul 26, 2023
1 parent 56ef473 commit 6b34a60
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/library/tools/R/Rd2pdf.R
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,19 @@
files <- as.list(files)
files[pos] <- db[pos > 0L]
}
## Use a stage23 Rd db if there is one and we were asked to
## use it.
built_file <- file.path(pkgdir, "build", "stage23.rdb")
if(file_test("-f", built_file)) {
use <- Sys.getenv("_RD2PDF_USE_BUILT_STAGE23_RD_DB_IF_AVAILABLE_",
"FALSE")
if(isTRUE(config_val_to_logical(use))) {
db <- readRDS(built_file)
pos <- match(names(db), basename(paths), nomatch = 0L)
files <- as.list(files)
files[pos] <- db[pos > 0L]
}
}
latexdir <- tempfile("ltx")
dir.create(latexdir)
if (!silent) message("Converting Rd files to LaTeX ",
Expand Down

0 comments on commit 6b34a60

Please sign in to comment.