-----Original Message-----
From: Duncan Murdoch <murdoch.dun...@gmail.com> 
Sent: Tuesday, May 28, 2024 3:30 PM
To: Boylan, Ross <ross.boy...@ucsf.edu>; r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] different build tools

On 2024-05-28 6:20 p.m., Boylan, Ross via R-package-devel wrote:
> There are at  least 4 ways to build a package:
> 
>    1.  R CMD build
>    2.  pkgbuild::build(), which I  believe calls 1.
>    3.  devtools::build(), which calls 2.
>    4.  RStudio GUI, which calls 3.
> 
> I recently discovered these don't all behave the same.  Invoking 
> bootstrap.R at  the start requires 2 or greater.

What is bootstrap.R?


Duncan Murdoch
----------------------------------

Response:

It's a script one can enable to run at the start of the build.  There is no  
standard script; it is up to the author(s) to provide it.

The devtools::build help says there is a configuration option in DESCRIPTION:

Config/build/bootstrap can be set to TRUE to run ⁠Rscript bootstrap.R⁠ in the 
source directory prior to running subsequent build steps.

I'm using it to build some custom documentation.  Furthermore, I put boostrap.R 
in .Rbuildignore so that package consumers won't try to run software that they 
may not have.

In other words, I'm using it to do some special master-copy-only processing, 
though I doubt that was the intent of the feature.

Ross

P.S. Another difference between the RStudio build and R CMD build is that 
RStudio adds directories to PATH with the additional software it supplies, like 
pango, which builds require.  Plain R CMD build did not have access to them and 
failed for that reason until I added them to PATH.  Alternately I could have 
done a separate installation of the necessary tools, but that seemed a wasteful 
complication.

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to