[Rd] Alternative for wildcard gnu extension in Makevars

Dirk Eddelbuettel edd at debian.org
Wed May 13 19:45:51 CEST 2015

On 13 May 2015 at 10:10, Kevin Ushey wrote:
| One other solution that's only a little crazy: you could have a R
| function within your package that generates the appropriate (portable)
| Makevars, and within the package `configure` script call that
| function. For example"
|     R --vanilla --slave -e "source('R/makevars.R'); makevars()"
| And that 'makevars()' function could generate portable
| 'Makevars(.win)' files for your package.

Seconded.  I do exactly that in another recent package where I needed another
"verboten" idiom available only in the widespread and feature-rich GNU make
but not the so-much-more constrained basic make: if statements.

See https://github.com/eddelbuettel/Rblpapi/blob/master/configure where I
need to encode 32 or 64 in the name of shared library.  By relying on Rscript
I code around the constraint of not having GNU make.   [ That is still a
non-CRAN package but for an unrelated, different reason. ]


http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org

More information about the R-devel mailing list