[Rd] Makefiles and other customization

Ross Boylan ross at biostat.ucsf.edu
Thu Nov 24 01:05:10 CET 2005


On Wed, 2005-11-23 at 15:47 -0800, Kasper Daniel Hansen wrote:
> Well you can have a look at etc/Makeconf. I have had some troubles  
> understanding the make process myself (which probably reveals I am  
> not a make guru), but it really depends on what you want to  
> accomplish - and from a certain perspective it is all documented in  
> the sources.

Makeconf sets environment variables and general rules for building
different types of files, but it doesn't have any regular targets.
While the answer is in the source, the full answer doesn't seem to be in
that particular piece.

> 
> I think you need to describe what exactly you want to do, perhaps  
> even post a copy of your Makefie.
My build system is a bit baroque; my first question is what a Makefile
should look like that simply duplicates the existing functionality.  In
other words, without a Makefile R can compile my code, check the
package, and build something for distribution.  If I want to add a
Makefile that preserves all this behavior, what needs to be in it?

I need something extra for two main reasons.  First, I'm using the fweb
literate programming system, so I maintain a .web file which must be
processed to get program sources and documentation.  Second, I have a
lot of unit tests of my code, and I want to exercise them apart from
simply building and testing the package as a whole.  All of this
requires assistance from the GNU autotools.

> 
> In case you include code which needs to be compiled and distributed  
> to various platforms you definitely want R to do the compilation.
> 
Since R does a lot, it would be better to try to build on that.  But if
it's too much of a fight, I might want to roll my own.  Creating a
source distribution, for example, looked like something I might be able
to do in my own makefile.

Ross



More information about the R-devel mailing list