[Rd] Makevars that distinguish between OSX and *NIX
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Nov 28 15:47:10 CET 2012
On 28/11/2012 14:36, sgerber wrote:
> Hi
>
> Is there a similar way to create a specific Makevars for OSX versus *NIX
> systems as for Windows, e.g. a Makervars.osx ?
> If not what is there another lean solution to create system specific
> Makevars? I need to link differently depending on whether I am on *NIX
> or OSX (specifically link to OpenGL).
>
Well, OS X (sic) is a certified UNIX!
This is what a 'configure' script is used for (e.g. by package rgl).
But you can write conditional code in commands in the Makevars, e.g. by
if test `uname` = "Darwin" ; then
else
fi
Please do not use GNU make misfeatures to do this if you want it to be
portable (see 'Writing R Extensions').
--
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