From ggrothendieck at myway.com  Thu Nov 18 21:10:53 2004
From: ggrothendieck at myway.com (Gabor Grothendieck)
Date: Thu Nov 18 21:11:17 2004
Subject: [Rd] Building Packages on Windows using .Rbuildignore (PR#7379)
Message-ID: <20041118201053.A906F39FA@mprdmxin.myway.com>



 <murdoch <at> stats.uwo.ca> writes:

: 
: On Thu, 18 Nov 2004 00:38:47 +0000 (UTC), Gabor Grothendieck
: <ggrothendieck <at> myway.com> wrote :
: 
: >DIFFERENCE BETWEEN USING .RBUILDIGNORE AND NOT
: >
: >The reason that the processing is different according to whether one
: >uses .Rbuildignore or not is that 
: >  R CMD build 
: >takes the .Rbuildignore file into account but 
: >  R CMD install
: >  R CMD check
: >  R CMD build --binary 
: >do not take .Rbuildignore into account.  
: 
: Okay, now I understand.  I think I'd call the last of those a bug, and
: it would seem to me that the install and check scripts should also
: respect this directive.   I've now copied this to the r-bugs list.
: (This was reported for Windows; I don't know if it applies to other
: platforms as well.)
: 
: Just for clarification:  I can see you would use this when you have
: S-PLUS code in the same directory as R code, and you don't want to
: include that in an R build.  Are there other files that must be
: excluded?

My primary directory is mirrored by svn and I put everything
in there that I want other developers to be able to see,
even if its not ready or not intended for inclusion in the
build.  

The .Rbuildignore is important to distinguish what is to be
built and what is just there to be shared.

Some instances where this useful are:
- have abc.R but don't want it in build until abc.Rd is available
- have abc.Rd but don't want it in build until abc.R is written
- abc.R is available but too buggy yet it needs to be shared with
  others so they know about it
- interface code which interfaces with package X and will 
  ultimately go into package X, not this one, but needs to be
  around in the meantime
- code which depends on a package that we don't want to invoke
  for now and will probably be replaced anyways
- certain notes to be shared among the developers

Also it would really be nice to be able to turn the
.Rbuildignore on and off using a command line switch on 
R CMD ... as someone on the thread has already suggested.  It
can be useful to check and install the ignored stuff to
ensure its ready before actually removing it from
.Rbuildignore.  It might even be nice to be able to specify
alternate .Rbuildignore files although I am not sure whether
that is going too far or not.

What I am doing in the meantime is that I have a Windows
batch script that can be used like this:

   myscript install mypkg
   myscript check mypkg
   myscript binary mypkg

where each of these first does a build creating a .tar.gz
file and then detars it into another directory and invokes
install, check or build --binary on the built copy of the
source in that directory.

If I want to do an install, check or build --binary without
respecting the .Rbuildignore then I just use the original
R CMD ... commands instead of my script.


[Rd] Building Packages on Windows using .Rbuildignore (PR#7379)
Gabor Grothendieck