![](https://csdnimg.cn/release/download_crawler_static/88715660/bgc.jpg)
Chapter 2: Installing R under Unix-alikes 7
make prefix=/path/to/here install
at least with GNU make (and current Solaris and FreeBSD make, but not some older Unix
makes).
More precise control is available at configure time via options: see configure --help
for details. (However, most of the ‘Fine tuning of the installation directories’ options are
not used by R.)
Configure options ‘--bindir’ and ‘--mandir’ are supported and govern where a copy of
the R script and the man page are installed.
The configure option ‘--libdir’ controls where the main R files are installed: the default
is ‘eprefix /LIBnn ’, where eprefix is the prefix used for installing architecture-dependent
files, defaults to prefix, and can be set via the configure option ‘--exec-prefix’.
Each of bindir, mandir and libdir can also be specified on the make install command
line (at least for GNU make).
The configure or make variables rdocdir and rsharedir can be used to install
the system-independent ‘doc’ and ‘share’ directories to somewhere other than libdir.
The C header files can be installed to the value of rincludedir: note that as the
headers are not installed into a subdirectory you probably want something like
rincludedir=/usr/local/include/R-2.15.1.
If you want the R home to be something other than ‘libdir /R’, use ‘rhome’: for example
make install rhome=/usr/local/lib64/R-2.15.0
will use a version-specific R home on a Linux 64-bit system.
If you have made R as a shared/dynamic library you can install it in your system’s
library directory by
make prefix=/path/to/here install-libR
where prefix is optional, and libdir will give more precise control.
make install-strip
will install stripped executables, and on platforms where this is supported, stripped libraries
in directories ‘lib’ and ‘modules’ and in the standard packages.
Note that installing R into a directory whose path contains spaces is not supported, and
at least some aspects (such as installing source packages) will not work.
To install info and PDF versions of the manuals, use one or more of
make install-info
make install-pdf
Once again, it is optional to specify prefix, libdir or rhome (the PDF manuals are in-
stalled under the R home directory). (make install-info needs Perl installed if there is
no command install-info on the system.)
More precise control is possible. For info, the setting used is that of infodir (default
‘prefix /info’, set by configure option ‘--infodir’). The PDF files are installed into the
R ‘doc’ tree, set by the make variable rdocdir.
A staged installation is possible, that it is installing R into a temporary directory in
order to move the installed tree to its final destination. In this case prefix (and so on)
should reflect the final destination, and DESTDIR should be used: see http://www.gnu.org/
prep/standards/html_node/DESTDIR.html.