[Rd] Make scripts during package installation?

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Dec 8 06:03:36 CET 2012

Your subject makes no sense: there is no such thing as a 'make script'.

On 07/12/2012 22:51, Henrik Bengtsson wrote:
> During installation of a package, Makevars/Makefile in src/ is
> processed.  I've always considered the purpose of this for compiling
> native code.  Is that it's solely purpose, or is it alright to use it
> also for non-code compilation purposes, e.g. building inst/
> subdirectories on the fly?  If not, are there other means to create
> non-static inst/ subdirectories during installation?

This is what the configure[.win] script is for.  See package nloptr for 
one such use in Makevars, though (in connection with compiled code).

> The immediate need I have right now is that untar an archive to
> inst/testScripts/.  The reason why I need this is that a package can
> only contain pathnames of length <= 100 characters (restriction in the
> tar file format), and mine are longer than that, e.g.
> aroma.affymetrix/inst/testScripts/system/chipTypes/Mapping50K_Hind240,Xba240/test20080730,100K,BPN,alleleSpecific.R
> [115 chars].  See also
> http://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora/aroma.affymetrix-00check.html
> . One strategy is to create a local tar file referring to files
> system/chipTypes/Mapping50K_Hind240,Xba240/test20080730,100K,BPN,alleleSpecific.R
> and then untar it to aroma.affymetrix/inst/testScripts/ during
> installation.  I want to this under the assumption that after the
> package installation is completed, the package directory is read-only
> so nothing can be updated after that step.  Note that this cannot be
> done during package built, only installation.
> /Henrik

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