From edd at debian.org  Wed May 13 19:45:51 2015
From: edd at debian.org (Dirk Eddelbuettel)
Date: Wed, 13 May 2015 12:45:51 -0500
Subject: [Rd] Alternative for wildcard gnu extension in Makevars
In-Reply-To: <CAJXgQP1NnY1WXgnGj87qcxPkamMYasLOUnFZ9VkRC2uK5Ec9nQ@mail.gmail.com>
References: <20150513172750.Horde.XmEuGWEwhY5VU212D36XCEA@webmailnew.dds.nl>
	<21843.29537.86236.300996@max.nulle.part>
	<20150513180509.Horde.AU5NdWEwhY5VU3Y1ROC1FeA@webmailnew.dds.nl>
	<CABtg=KkyH5qj2wC_oeinru10+vVqfhD+rriDAj5TdeZnSkhekQ@mail.gmail.com>
	<CAJXgQP1NnY1WXgnGj87qcxPkamMYasLOUnFZ9VkRC2uK5Ec9nQ@mail.gmail.com>
Message-ID: <21843.36303.612911.855609@max.nulle.part>


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. ]

Dirk

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



[Rd] Alternative for wildcard gnu extension in Makevars
Dirk Eddelbuettel