[Rd] R_SHARE_DIR not defined for use in tests/Makefile running under Windows

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Apr 11 16:40:23 CEST 2008


You seem to be confusing environment and make variables.  I think 
'$(R_SHARE_DIR)' is never set by R makefiles (except when building R), but 
may be set by make from an environment variable.

On all (recentish) systems where the share dir is not ${R_HOME}/share, 
${R_SHARE_DIR} is set by the 'R' shell script.  There are such systems -- 
but not under Windows.

So ${R_SHARE_DIR-${R_HOME}/share} is the environment variable you want to 
look at.


On Mon, 7 Apr 2008, Tony Plate wrote:

> The make variable $(R_SHARE_DIR) seems to be available for use in
> tests/Makefile when running under Linux, but not Windows (R-2.6.2, R-2.6.1,
> R-2.7.0 alpha 2008-04-06, under Windows XP 64 bit, built locally for 32 bit).
>
> Is this intentional, or an oversight?  Is it OK to use $(R_HOME)/share
> instead (seems to work OK)?
>
> I notice the following in /src/gnuwin32/front-ends/rcmdfn.c (from R-alpha
> 2008-04-06), which would suggest that the intention was that R_SHARE_DIR
> should be defined... (and I assume it would propagate to to be available in
> a Makefile.)
>
> int rcmdfn (int cmdarg, int argc, char **argv)
> {
>     /* tasks:
>        find R_HOME, set as env variable
>        set R_SHARE_DIR as env variable
>        set PATH to include R_HOME\bin
>        set PERL5LIB to %R_SHARE_DIR%/perl;%Perl5LIB%
>        set TEXINPUTS to %R_SHARE_DIR%/texmf;%TEXINPUTS%
>        set HOME if unset
>        launch %R_HOME%\bin\$*
>      */
>
> -- Tony Plate
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list