[Rd] Using src/ to create executable - how to not build shared objects?

Simon Urbanek simon.urbanek at r-project.org
Mon Feb 21 16:18:03 CET 2011


On Feb 21, 2011, at 3:14 AM, Henrik Bengtsson wrote:

> Hi.
> 
> I can use the src/ directory to create executable, cf. Section
> 'Package subdirectories' in 'Writing R Extensions":
> 
> "A few packages use the src directory for purposes other than making a
> shared object (e.g. to create executables). Such packages should have
> files src/Makefile and src/Makefile.win (unless intended for only
> Unix-alikes or only Windows)."
> 
> When doing this, how can I turn off the building of the shared objects
> that are created under libs/<arch>/?  Currently they end up in the
> built package binaries, e.g. *.zip and *.tgz.
> 

If you build an executable then it won't be copied anyway. If you are building something that looks like a shared object then I'm a bit puzzled why you would not want to install it as that is the only way you can install it in multi-arch build (since you can't use inst in that case). That said, you can simply build your "executable" in a subdirectory which is I'd recommend for anything other than contents that you want R to deal with -- but, again, beware of multi-arch settings as it's get really tricky.

Cheers,
Simon



More information about the R-devel mailing list