search for: makevars

Displaying 20 results from an estimated 633 matches for "makevars".

2009 Nov 10
1
Makevars or Makevars.in
...am just trying to adjust one of my packages so the C code builds in Windows. This is code that has been around for a long time, and I'm am only a casual reader of C, so it has had the "if it is not broken don't touch it" approach for many years. The section 1.2.1 "Using Makevars" of "Writing R extensions" starts: "Sometimes writing your own configure script can be avoided by supplying a file Makevars: also one of the most common uses of a configure script is to make Makevars from Makevars.in." ... I am still a bit confused about whether packa...
2016 Sep 27
4
src/Makevars ignored ?
...g to install a Rpackage that holds some C//C++ code > | > | as far as I understood the R library generic compilation mechanism, > | compilation of C//C++ sources is controled > | > | 1) at system level by the ocntentos RHOME/etc/Makeconf > | 2) at user level by the content of ~/.R/Makevars > | 3) at package level by the content of src/Makevars > | > | Problem I have is that src/Makevars is ignored > | > | > | see following example: > | > | R is compiled and use the following CC and CFLAGS definition > | > | bigmess:epactsR/src > R CMD config CC > |...
2016 Sep 27
2
src/Makevars ignored ?
Hello, I'm tring to install a Rpackage that holds some C//C++ code as far as I understood the R library generic compilation mechanism, compilation of C//C++ sources is controled 1) at system level by the ocntentos RHOME/etc/Makeconf 2) at user level by the content of ~/.R/Makevars 3) at package level by the content of src/Makevars Problem I have is that src/Makevars is ignored see following example: R is compiled and use the following CC and CFLAGS definition bigmess:epactsR/src > R CMD config CC gcc -std=gnu99 bigmess:epactsR/src > R CMD config CFLAGS -Wall -g s...
2016 Sep 27
0
src/Makevars ignored ?
...which is why it is also impossible). You have no idea what system it is being deployed on, I mean, you don't even know if the compiler is gcc. If a user wants (say) heavy optimization they will compile R with optimization. (For this reason I also don't think users should modify their ~/.R/Makevars, unless for testing purposes). The exception is (in my opinion) if you need to decrease the level of optimization because you know or suspect the compiler to generate wrong code. What you should do, is use PKG_CFLAGS as documented in R-exts, 1.2.1 under "Using Makevars". Best, Kasper...
2015 May 13
4
Alternative for wildcard gnu extension in Makevars
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...
2016 Sep 27
0
src/Makevars ignored ?
...Hello, | | I'm tring to install a Rpackage that holds some C//C++ code | | as far as I understood the R library generic compilation mechanism, | compilation of C//C++ sources is controled | | 1) at system level by the ocntentos RHOME/etc/Makeconf | 2) at user level by the content of ~/.R/Makevars | 3) at package level by the content of src/Makevars | | Problem I have is that src/Makevars is ignored | | | see following example: | | R is compiled and use the following CC and CFLAGS definition | | bigmess:epactsR/src > R CMD config CC | gcc -std=gnu99 | bigmess:epactsR/src > R CMD c...
2013 Aug 23
1
Makevars and Makeconf sequencing
http://cran.r-project.org/doc/manuals/R-exts.html#Configure-and-cleanup near the start of 1.2.1 Using Makevars says > There are some macros which are set whilst configuring the building of > R itself and are stored in R_HOME/etcR_ARCH/Makeconf. That makefile is > included as a Makefile after Makevars[.win], and the macros it defines > can be used in macro assignments and make command lines in t...
2015 May 15
1
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...
2016 Sep 27
2
src/Makevars ignored ?
...est succeded) to build the Rpackage requested by a specific software. > I mean, you don't even know if the > compiler is gcc.If a user wants (say) heavy optimization they will > compile R with optimization. (For this reason I also don't think users > should modify their ~/.R/Makevars, unless for testing purposes). my question was not in a R package developer context, but in the R user that grabs some piece of code and is not abble to compile it because of 1) a developper that mixed C and C++ code which is legit. 2) a silly interaction beetween C and C++ symbol generation beca...
2004 Dec 29
2
Makefile vs Makevars vs configure
Apologies in advance for the long post. I'm currently using a Makefile to build my shared library. Pursuant to the R-exts manual, I'd like to switch to a Makevars file or a configure file if necessary. Having never used these types of make utilities before, I'm a bit lost. My package is quite simple. It only has one source file and one header: excelpoi.cpp excelpoi.h The reason I need help with Makevars is because it needs jni.h from the user's J...
2008 Jun 06
1
Makevars or congiure for multi platforms
Dear all, As previously submitted, I wrote an extending pdf device to embed pop up text and web links. (Patches are available at http://pdf2.r-forge.r-project.org/patches) Now, I'm making a library version of the pdf device. However, with my skill, I'm not sure about writing Makevars or configure file for multi platforms. A following line in Makevars works on my mac, ----- PKG_CFLAGS=-I/Library/Frameworks/R.framework/PrivateHeaders -DHAVE_CONFIG_H ----- (Note that the PrivateHeaders directory contains Fileio.h and Defn.h) My question is, How do I write Makevars or congiure for...
2015 May 13
0
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 packag...
2009 Jan 11
1
Makevars
Hi I have sent a previous email "Error in dyn.load()" for which, shame on me, I later found a partial answer. I have been trying to look into what I exactly need to include into Makevars and where it needs to be located and have not found a satisfying answer yet. Maybe the following questions are helpful for other people as well. Again, I am trying to include a C function tools.c into a main.c file which needs to be run via R. I include the header file via #include tools.h . What...
2015 May 13
3
Alternative for wildcard gnu extension in Makevars
Dirk Eddelbuettel <edd at debian.org> schreef: > On 13 May 2015 at 17:27, Jan van der Laan wrote: > | > | I have some cpp-files from another library (boost) in a subdirectory > | in my src directory (src/boost_src). I include these using the > | following two lines in my Makevars: > | > | SOURCES = $(wildcard *.cpp boost_src/*.cpp) > | OBJECTS = $(SOURCES:.cpp=.o) > | > | However, R CMD check complains about my use of 'wildcard'. How do I > | handle this without any gnu extensions? > > I looked into this a few weeks (months?) ago, and it woul...
2016 Sep 27
0
src/Makevars ignored ?
..., ie. I disagree with your statement "anyway I still convinced that if R provides a mechanisn hierachical way of variable overwrite pkg / user/ system it _SHOULD_ be consistent at all levels". The mechanism for achieving what you want - overriding CC on a local machine - is using a ~/.R/Makevars file. I am not sure that this can be done in a package specific manner (I don;t do this very often), but you could create this file ('this file" being ~/.R/Makevars), install the package and then remove it. Remember, this is an install-time setting, so you don't need the users of you...
2020 Sep 28
3
Specifying C Standard in Package's Makevars File
Hi, what is the correct way to specify a C standard in a package's Makevars file? Building a package with e.g. PKG_CFLAGS = -std=gnu11 does work but R CMD check issues a warning: * checking compilation flags in Makevars ... WARNING Non-portable flags in variable 'PKG_CFLAGS': -std=gnu11 (Same for -std=c11.) Thanks! Regards, Andreas Kersting
2001 May 02
1
subdirs in package src dir
...ot;mypackage/src", especially to distinguish between my own files and e.g. lapack or blas sources. To get this working I would need a Makefile in my package which contains the appropriate dependencies to these sources in subdirs. But I don't want to add a complete Makefile, I want only a Makevars file containing e.g. "OBJS=myfunc.o lapack/somefunc.o ...", currently this would not work, because nobody looks into Makevars for an OBJS variable. The following patch adds this functionality to the INSTALL script, allowing to add an OBJS (or SRCS) variable to Makeconf. I tested it with R...
2009 Oct 29
2
Makevars, cc files in multiple directories
Hello, In the src folder of my R package I have a.cc b.cc f/g/x.cc my Makevars.in has all: $(SHLIB) upon installing only, a.o and b.o is build and the final dll is comprised of a.o and b.o How can I instruct $(SHLIB) to pick up its source files from all subdirectories (or maybe a subset, though here it will be all) in src ? Much thanks Saptarshi
2005 Oct 05
1
Problems with autoconf example from r-ext.
...R_HOME" exit 1 fi CC=`"${R_HOME}/bin/R" CMD config CC` CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS` dnl substitute CPPFLAGS and LIBS AC_SUBST(CPPFLAGS) AC_SUBST(LIBS) dnl and do subsitution in the src/Makevars.in AC_OUTPUT(src/Makevars) [end autoconf.ac] I rund autoconf.. [Makevars.in] PKG_CFLAGS=@CPPFLAGS@ PKG_LIBS=@LIBS@ [end-Makevars.in] I rund R CMD with R CMD INSTALL --configure-args='--with-sbmlode-lib=/data/opt/sbmlodesolve/include \ --with-sbmlode-include=/data/opt/sbmlodesolv...
2013 May 24
0
Rcpp with OpenMP - Need example Makevars
...eads = NumericVector( nThreads ); omp_set_num_threads( numberThreads(0) ); #pragma omp parallel { // Code inside this region runs in parallel. printf("Hello!\n"); } END_RCPP } As I am an absolute newbie with writing C++ extensions and have not much understanding of the Makevars file, I am unsure what to write into it. Currently I have: ## Use the R_HOME indirection to support installations of multiple R version PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` KG_CFLAGS = $(SHLIB_OPENMP_CXXFLAGS) PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) ## -- compiling for Op...