@@ -871,12 +871,14 @@ function(dir, outDir, encoding = "unknown")
871871 }
872872 pathsFile <- file.path(manOutDir , " paths.rds" )
873873 # # Avoid (costly) rebuilding if not needed.
874- # # 'make Rdobjects' now takes 13s compared to 0.5s if remaking skips the below.
875- # # This tests if the Rd DB from a previous 'make' can be fully kept or needs
876- # # updating, but ignores that a dynamic help page may need reprocessing even
877- # # without modifying the source Rd file. With the advent of \bibshow, many
878- # # help pages have become dynamic and always rebuilding these is tedious ...
879- # # So for now only do a full rebuild when the system macros were touched.
874+ # # 'make Rdobjects' now takes 13s compared to 0.5s if remaking skips
875+ # # the below. This tests if the Rd DB from a previous 'make' can be
876+ # # fully kept or needs updating, but ignores that a dynamic help
877+ # # page may need reprocessing even without modifying the source Rd
878+ # # file. With the advent of \bibshow, many help pages have become
879+ # # dynamic and always rebuilding these is tedious ...
880+ # # So for now only do a full rebuild when the system macros were
881+ # # touched.
880882 system_file <- file.path(R.home(" share" ), " Rd" , " macros" , " system.Rd" )
881883 if (! file.exists(db_file ) || # first build, including from .install_packages
882884 file_test(" -nt" , system_file , db_file )) {
@@ -891,9 +893,13 @@ function(dir, outDir, encoding = "unknown")
891893 db <- .build_Rd_db(dir , manfiles , db_file = db_file ,
892894 encoding = encoding , built_file = built_file )
893895 nm <- as.character(names(db )) # Might be NULL
894- saveRDS(structure(nm ,
895- first = nchar(file.path(mandir )) + 2L ),
896- pathsFile )
896+ at <- c(list (first = nchar(file.path(mandir )) + 2L ),
897+ if (basename(dir ) == " tools" ) {
898+ # # We could use 3 dirname() calls, but perhaps more
899+ # # easily:
900+ list (top = substr(dir , 1L , nchar(dir ) - 18L ))
901+ })
902+ saveRDS(`attributes<-`(nm , at ), pathsFile )
897903 names(db ) <- sub(" \\ .[Rr]d$" , " " , basename(nm ))
898904 makeLazyLoadDB(db , file.path(manOutDir , packageName ))
899905 }
0 commit comments