From hin-tak.leung at cimr.cam.ac.uk  Mon Feb 27 12:06:16 2006
From: hin-tak.leung at cimr.cam.ac.uk (Hin-Tak Leung)
Date: Mon, 27 Feb 2006 11:06:16 +0000
Subject: [Rd] R-Project build system: DESTDIR support
In-Reply-To: <17408.45912.247893.86191@basebud.nulle.part>
References: <20060225081126.GB14754@fencepost>
	<17408.45912.247893.86191@basebud.nulle.part>
Message-ID: <4402DD28.3030305@cimr.cam.ac.uk>

Dirk Eddelbuettel wrote:
> Hi Claudio,
> 
> On 25 February 2006 at 03:11, Claudio Fontana wrote:
<snipped>
> | Currently, your project does not support the DESTDIR variable in
> | generated Makefiles (marked as optional in the GNU coding policies, make and
> | automake manual).
<snipped>
> I'm confused. We've been maintaining R in Debian quite merrily even with the
> exisiting standards. To the best of my knowledge things seem to work without
> DESTDIR. 
<snipped>

You are both right - R currently does not use DESDIR, and also R seems 
to work without it. What happens is that R is *almost* completely 
re-locatable based on one environment variable R_HOME . There is one
wrapper script (/usr/bin/R) which contains the location of R_HOME,
and it is "massaged" with the intended R_HOME location just before
"make install". The "make install" process essentially just copy
all the files into the intended R_HOME, edit the wrapper script
with the location of R_HOME and copy it also.

Change to DESTDIR should be quite simple. I think it is mostly one
line change in R/Makeconf.in,
where
        rhome = ${libdir}/R
to
        rhome = ${DESTDIR}/${libdir}/R
and maybe one or two other places, concerning that wrapper script.
(some volunteers?)

HTL



[Rd] R-Project build system: DESTDIR support
Hin-Tak Leung