[Rcpp-commits] r682 - pkg/inst/skeleton
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Feb 15 15:50:03 CET 2010
Author: edd
Date: 2010-02-15 15:50:03 +0100 (Mon, 15 Feb 2010)
New Revision: 682
Modified:
pkg/inst/skeleton/Makevars
Log:
added a lot more comment to Makevars ... instead of adding configure and cleanup directly
Modified: pkg/inst/skeleton/Makevars
===================================================================
--- pkg/inst/skeleton/Makevars 2010-02-14 22:10:34 UTC (rev 681)
+++ pkg/inst/skeleton/Makevars 2010-02-15 14:50:03 UTC (rev 682)
@@ -4,3 +4,30 @@
## Uncomment this if you want to use C++0x features -- which are not currently portable
## CLINK_CPPFLAGS=$(shell Rscript -e "Rcpp:::Cxx0xFlags()" )
+## As an alternative, one can also add this code in a file 'configure'
+##
+## PKG_CPPFLAGS=`${R_HOME}/bin/Rscript -e "Rcpp:::CxxFlags()"`
+## PKG_LIBS=`${R_HOME}/bin/Rscript -e "Rcpp:::LdFlags()"`
+##
+## sed -e "s|@PKG_LIBS@|${PKG_LIBS}|" \
+## -e "s|@PKG_CPPFLAGS@|${PKG_CPPFLAGS}|" \
+## src/Makevars.in > src/Makevars
+##
+## which together with the following file 'src/Makevars.in'
+##
+## PKG_LIBS = @PKG_LIBS@
+## PKG_CPPFLAGS = @PKG_CPPFLAGS@
+##
+## can be used to create src/Makevars dynamically. This scheme is more
+## powerful and can be expanded to also check for and link with other
+## libraries. It should be complemented by a file 'cleanup'
+##
+## rm src/Makevars
+##
+## which removes the autogenerated file src/Makevars.
+##
+## Of course, autoconf can also be used to write configure files. This is
+## done by a number of packages, but recommended onlu for more advanced users
+## comfortable with autoconf and its related tools.
+
+
More information about the Rcpp-commits
mailing list