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. Kevin On Wed, May 13, 2015 at 9:08 AM, G?bor Cs?rdi <csardi.gabor at gmail.com> wrote:> On Wed, May 13, 2015 at 12:05 PM, Jan van der Laan <rhelp at eoos.dds.nl> > wrote: > [...] > >> Too bad. Since it is only a handful of files, I will probably move them >> directly into the src directory and prefix them. It would have been nice to >> have been able to keep them separate. >> > > If it is a couple of files, then you can also just list them in SOURCES (or > even just OBJECTS, with a .o suffix), and leave them where they are. > > Gabor > > [...] > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
Dirk Eddelbuettel
2015-May-13 17:45 UTC
[Rd] Alternative for wildcard gnu extension in Makevars
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
Henrik Bengtsson
2015-May-13 18:28 UTC
[Rd] Alternative for wildcard gnu extension in Makevars
While at it: 'Makevars' is an R invention (i.e. documentation of it is only available through the R docs), correct? /Henrik On Wed, May 13, 2015 at 10:10 AM, Kevin Ushey <kevinushey at gmail.com> 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. > > Kevin > > On Wed, May 13, 2015 at 9:08 AM, G?bor Cs?rdi <csardi.gabor at gmail.com> wrote: >> On Wed, May 13, 2015 at 12:05 PM, Jan van der Laan <rhelp at eoos.dds.nl> >> wrote: >> [...] >> >>> Too bad. Since it is only a handful of files, I will probably move them >>> directly into the src directory and prefix them. It would have been nice to >>> have been able to keep them separate. >>> >> >> If it is a couple of files, then you can also just list them in SOURCES (or >> even just OBJECTS, with a .o suffix), and leave them where they are. >> >> Gabor >> >> [...] >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
Simon Urbanek
2015-May-15 15:01 UTC
[Rd] Alternative for wildcard gnu extension in Makevars
On May 13, 2015, at 2:28 PM, Henrik Bengtsson <henrik.bengtsson at ucsf.edu> wrote:> While at it: 'Makevars' is an R invention (i.e. documentation of it > is only available through the R docs), correct? /Henrik >Well, it's just a Makefile fragment that gets included along with the rest of the Makefiles, so for all practical purposes it's just a Makefile which implicitly includes R's makefile on top so you don't have to do that by hand. Cheers, Simon> On Wed, May 13, 2015 at 10:10 AM, Kevin Ushey <kevinushey at gmail.com> 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. >> >> Kevin >> >> On Wed, May 13, 2015 at 9:08 AM, G?bor Cs?rdi <csardi.gabor at gmail.com> wrote: >>> On Wed, May 13, 2015 at 12:05 PM, Jan van der Laan <rhelp at eoos.dds.nl> >>> wrote: >>> [...] >>> >>>> Too bad. Since it is only a handful of files, I will probably move them >>>> directly into the src directory and prefix them. It would have been nice to >>>> have been able to keep them separate. >>>> >>> >>> If it is a couple of files, then you can also just list them in SOURCES (or >>> even just OBJECTS, with a .o suffix), and leave them where they are. >>> >>> Gabor >>> >>> [...] >>> >>> [[alternative HTML version deleted]] >>> >>> ______________________________________________ >>> R-devel at r-project.org mailing list >>> https://stat.ethz.ch/mailman/listinfo/r-devel >> >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
Jan van der Laan
2015-May-20 06:13 UTC
[Rd] Alternative for wildcard gnu extension in Makevars
On 13-05-15 19:45, Dirk Eddelbuettel wrote:> 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. ] >Kevin, Dirk, I finally opted for this solution. Thanks! Jan