Skip to content

Commit 7f428be

Browse files
author
hornik
committed
Provide (abs) top srcdir directly (and not via Rd).
git-svn-id: https://svn.r-project.org/R/trunk@89133 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 5b45dea commit 7f428be

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/library/tools/Makefile.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ all: Makefile DESCRIPTION
3434
@$(ECHO) "building package '$(pkg)'"
3535
@$(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)
3636
@$(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)/misc
37+
@$(ECHO) $(abs_top_srcdir) \
38+
> $(top_builddir)/library/$(pkg)/misc/top.txt
3739
@$(MAKE) mkR1 mkdesc2 $(WRE_DATA)
3840
@$(MAKE) mksrc
3941
@if ! test -f $(top_builddir)/library/$(pkg)/R/$(pkg); then \

src/library/tools/R/zzz.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,10 @@ rm(C_parseLatex)
6161
toset <- !(names(op.tools) %in% names(.Options))
6262
if(any(toset)) options(op.tools[toset])
6363
}
64+
65+
.R_top_srcdir_file_path <-
66+
system.file("misc", "top.txt", package = "tools")
67+
.R_top_srcdir <- if(nzchar(.R_top_srcdir_file_path)) {
68+
readLines(.R_top_srcdir_file_path)
69+
} else ""
70+
rm(.R_top_srcdir_file_path)

0 commit comments

Comments
 (0)