[R-SIG-Mac] help building a package on mac

Romain Francois romain.francois at dbmail.com
Mon Sep 7 08:14:42 CEST 2009


On 09/06/2009 10:57 PM, Simon Urbanek wrote:
>
>
> On Sep 6, 2009, at 11:15 AM, Romain Francois wrote:
>
>> On 09/06/2009 04:24 PM, Simon Urbanek wrote:
>>>
>>>
>>> On Sep 6, 2009, at 8:03 AM, Romain Francois wrote:
>>>
>>>> Hello,
>>>>
>>>> I am developping an R aware version of apache ant, so that you can run
>>>> R code within an ant build script. This will make the compilation of
>>>> java source from one package that depends on java code from another
>>>> package easier, etc ...
>>>>
>>>> But I can not build it on the mac platform.
>>>
>>> If I see it correctly, you don't need native compilation for each
>>> architecture, because the resulting code should be platform-indemendent
>>> (Java-classes).
>>
>> correct
>>
>>> Also you're not really building any dynamic library to
>>> load in R.
>>
>> Embarrassingly correct
>>
>>> If both are correct, you can for example use configure
>>> instead of src/Makevars to build your Java code since this a) guarantees
>>> that it is run only once b) doesn't trigger the SHLIB building so you
>>> do't need a fake .so.
>>
>> Thanks. This is much better than the Makevars trick, too bad this
>> cannot be a configure.R script that gets executed by Rscript as R is
>> more likely installed than bash.
>>
>> Am I right in assuming that the bash script can use ${R_HOME}
>>
>
> It doesn't have to be bash, but yes, it can use anything that is set by
> R CMD (including ${R_HOME}).
> (Note that you'll also probably need configure.win - likely it'll have
> to be a bit different, but ${R_HOME} is accessible as well.)
>
> Cheers,
> Simon

Thanks. The script is pretty simple, so I guess it should work.

#!/bin/sh

cd inst/java_src
"${R_HOME}/bin/Rscript" ../../exec/ant.R --installer

Romain

-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/xMdt : update on the ant package
|- http://tr.im/xHLs : R capable version of ant
`- http://tr.im/xHiZ : Tip: get java home from R with rJava



More information about the R-SIG-Mac mailing list