From edd at debian.org  Sat Sep 21 21:00:12 2013
From: edd at debian.org (Dirk Eddelbuettel)
Date: Sat, 21 Sep 2013 14:00:12 -0500
Subject: [Rd] regenerate Rscript after moving R installation
In-Reply-To: <145722967.1797.1379789012433.JavaMail.zimbra@openanalytics.eu>
References: <847693355.1777.1379787265680.JavaMail.zimbra@openanalytics.eu>
	<145722967.1797.1379789012433.JavaMail.zimbra@openanalytics.eu>
Message-ID: <21053.60604.509740.183222@max.nulle.part>


On 21 September 2013 at 20:43, Tobias Verbeke wrote:
| P.S. The background to this question is the usage of Rscript
| calls in the Makevars files of some R packages on CRAN, so
| the 'broken' Rscript prevents installation of certain R packages.

More details, please. 

AFAICT there is no 'broken' Rscript per se.  Eg for Rcpp, and per hints from
Kurt el al over the years, we have been doing this for a few years

  PKG_CXXFLAGS=-I../inst/include
  PKG_LIBS=`$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

where a key part is the `$(R_HOME)/bin` which permits you to transparently
switch between R-release, R-devel, R-beforeMove, R-afterMove, R-whatevr, ...
simply by adjusting your shell's $PATH variable, or the R wrapper you for R
CMD, or ...

It. Just. Works.

So if you borked your Rscript somewhere, just use another and quickly rebuild
R for the new location. It is after all a cheap build (and cheaper still if
you use tricks like ccache which I am a huge fan of, or 'make -j8', or ...)

Dirk

PS  ccache is at http://ccache.samba.org/ and should be in any sane Linux distro

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com



[Rd] regenerate Rscript after moving R installation
Dirk Eddelbuettel