Re: [Rd] Makevars or

From: Prof Brian Ripley <>
Date: Tue, 10 Nov 2009 16:32:31 +0000 (GMT)

On Tue, 10 Nov 2009, Paul Gilbert wrote:

> I am just trying to adjust one of my packages so the C code builds in
> Windows. This is code that has been around for a long time, and I'm am only
> a casual reader of C, so it has had the "if it is not broken don't touch it"
> approach for many years. The section 1.2.1 "Using Makevars" of "Writing R
> extensions" starts:
> "Sometimes writing your own configure script can be avoided by supplying a
> file Makevars: also one of the most common uses of a configure script is to
> make Makevars from" ...
> I am still a bit confused about whether packages src/ should have, in
> addition to, a file Makevars or a file The rest of
> the section seems to imply that the file should be Makevars, but the first
> four examples I pulled of CRAN all have My confusion is about
> whether R scripts will automatically turn into Makevars or would
> I need my own configure script to do this (and I am hoping not to need a
> configure script).
> Which is preferred? (And could the first paragraph of the section be made
> more explicit?)

I think you need to read the earlier mentions of Makevars in that manual: your confusion seems to be that you have jumped in to a later section. The only use of src/ is that it is a conventional name for a template file for configure to turn into src/Makevars. As the manual says

   The default rules can be tweaked by setting macros in a file    @file{src/Makevars} ... There are platform-specific file names on    Windows: @file{src/} takes precedence over    @file{src/Makevars}.

So to tweak the make rules you need src/Makevars: if you need a platform-specific version you need src/Makevars and src/ You may choose to use configure (or to make these, but you do not need to (and packages using e.g. LAPACK or BLAS do not do so).

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
Received on Tue 10 Nov 2009 - 16:37:49 GMT

This archive was generated by hypermail 2.2.0 : Tue 10 Nov 2009 - 17:30:22 GMT