Closed lgatto closed 9 years ago
Actually, the following seems to work
make install PKG=foo R_HOME=/opt/Rpatched
but generates the following warning
WARNING: ignoring environment value of R_HOME
The problem is that R_HOME
is used in the variables R
and RSCRIPT
(L8-L9) and .makerrc
is read in L39-L41. Because we use :=
the variable R_HOME
is expanded at the time of the declaration of R
/RSCRIPT
when R_HOME
is R RHOME
(or the commandline variable). I will change the assignment operator to =
. That will result in an expanding of R_HOME
at the first use of R
/RSCRIPT
. See make manual (or the easier and shorter stackoverflow answer) for details.
A nice addon to your .makerrc
would be something like:
ifeq (${DEV},1)
R_HOME := /opt/Rpatched
endif
make PKG=foo check
will use R stable and make PKG=foo DEV=1 check
will use Rpatched (maybe you have to call make PKG=foo clean
before but I assume an R CMD build
will result in the same .tar.gz
whatever R version is used).
Thanks!
It would be useful to be able to set
R_HOME
in.makerrc
or as a variable in the terminal to use different installations of R. I tried settingR_HOME=/opt/Rpatched
in the rc file or in the shell, but it does not work. Any hints/idea?