Browse code

Don't depend on R's presence on search path during install

- use "${R_HOME}/bin${R_ARCH_BIN}/R" & friends in Makevars files


git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/msa@111425 bc3139a8-67e5-0310-9ffc-ced21a209358

Martin Morgan authored on 11/12/2015 22:59:15
Showing6 changed files

... ...
@@ -1,7 +1,7 @@
1 1
 Package: msa
2 2
 Type: Package
3 3
 Title: Multiple Sequence Alignment
4
-Version: 1.3.0
4
+Version: 1.3.1
5 5
 Date: 2015-10-13
6 6
 Author: Enrico Bonatesta, Christoph Horejs-Kainrath, Ulrich Bodenhofer
7 7
 Maintainer: Ulrich Bodenhofer <bodenhofer@bioinf.jku.at>
... ...
@@ -1,5 +1,5 @@
1 1
 ## Variant 1: deactivate OpenMP on Mac Platforms
2
-CONFIGURE_FLAGS=`Rscript -e "if (Sys.info()['sysname'] == 'Darwin') cat('--without-openmp')"`
2
+CONFIGURE_FLAGS=`"${R_HOME}/bin${R_ARCH_BIN}/Rscript" -e "if (Sys.info()['sysname'] == 'Darwin') cat('--without-openmp')"`
3 3
 ## Variant 2: deactivate OpenMP generally
4 4
 #CONFIGURE_FLAGS=--without-openmp 
5 5
 ## Variant 3: let the configure script determine whether OpenMP is available
... ...
@@ -44,9 +44,9 @@ all: clustalomega
44 44
 clustalomega:
45 45
 	./configure $(CONFIGURE_FLAGS); \
46 46
 	export PKG_LIBS="$(PKG_LIBS) $(SHLIB_OPENMP_CFLAGS)"; \
47
-	export PKG_CXXFLAGS="$(PKG_CXXFLAGS) $(SHLIB_OPENMP_CXXFLAGS) -fPIC -DHAVE_CONFIG_H -I. -DCLUSTALO -DCLUSTALO_NOFILE -DDEFAULT_FILTER=90 -I"../../gc-7.2/include" `Rscript -e "Rcpp:::CxxFlags()"`"; \
48
-	export PKG_CFLAGS="$(PKG_CFLAGS) $(SHLIB_OPENMP_CFLAGS) -fPIC -DHAVE_CONFIG_H -I. -DCLUSTALO -DCLUSTALO_NOFILE -DDEFAULT_FILTER=90 -I"../../gc-7.2/include" `Rscript -e "Rcpp:::CxxFlags()"`"; \
47
+	export PKG_CXXFLAGS="$(PKG_CXXFLAGS) $(SHLIB_OPENMP_CXXFLAGS) -fPIC -DHAVE_CONFIG_H -I. -DCLUSTALO -DCLUSTALO_NOFILE -DDEFAULT_FILTER=90 -I"../../gc-7.2/include" `"${R_HOME}/bin${R_ARCH_BIN}/Rscript" -e "Rcpp:::CxxFlags()"`"; \
48
+	export PKG_CFLAGS="$(PKG_CFLAGS) $(SHLIB_OPENMP_CFLAGS) -fPIC -DHAVE_CONFIG_H -I. -DCLUSTALO -DCLUSTALO_NOFILE -DDEFAULT_FILTER=90 -I"../../gc-7.2/include" `"${R_HOME}/bin${R_ARCH_BIN}/Rscript" -e "Rcpp:::CxxFlags()"`"; \
49 49
 	cd src; \
50
-	R CMD SHLIB -o libClustalOmega.so $(CPPNames) && \
50
+	"${R_HOME}/bin${R_ARCH_BIN}/R" CMD SHLIB -o libClustalOmega.so $(CPPNames) && \
51 51
 	ar rcs libClustalOmega.a $(OBJNames) && \
52 52
 	cp libClustalOmega.a ../../
... ...
@@ -7,7 +7,7 @@ all: clustalw
7 7
 clustalw:
8 8
 	./configure; \
9 9
 	cd src; \
10
-	export PKG_CXXFLAGS="-DHAVE_CONFIG_H -I. $(PKG_CXXFLAGS) `Rscript -e "Rcpp:::CxxFlags()"`"; \
11
-	R CMD SHLIB -o libClustalW.so $(CPPNames) && \
10
+	export PKG_CXXFLAGS="-DHAVE_CONFIG_H -I. $(PKG_CXXFLAGS) `"${R_HOME}/bin${R_ARCH_BIN}/Rscript" -e "Rcpp:::CxxFlags()"`"; \
11
+	"${R_HOME}/bin${R_ARCH_BIN}/R" CMD SHLIB -o libClustalW.so $(CPPNames) && \
12 12
 	ar rcs libClustalW.a $(OBJNames) && \
13 13
 	cp libClustalW.a ../../
... ...
@@ -1,5 +1,5 @@
1
-PKG_LIBS=`Rscript -e "if (Sys.info()['sysname'] == 'Darwin') cat('-Wl,-all_load ./libgc.a ./libClustalW.a ./libClustalOmega.a ./libMuscle.a') else cat('-Wl,--whole-archive ./libgc.a ./libClustalW.a ./libClustalOmega.a ./libMuscle.a  -Wl,--no-whole-archive')"`
2
-PKG_CXXFLAGS=-I"./gc-7.2/include" -I"./Muscle/" -I"./ClustalW/src" -I"./ClustalOmega/src" `Rscript -e "Rcpp:::CxxFlags()"`
1
+PKG_LIBS=`"${R_HOME}/bin${R_ARCH_BIN}/Rscript" -e "if (Sys.info()['sysname'] == 'Darwin') cat('-Wl,-all_load ./libgc.a ./libClustalW.a ./libClustalOmega.a ./libMuscle.a') else cat('-Wl,--whole-archive ./libgc.a ./libClustalW.a ./libClustalOmega.a ./libMuscle.a  -Wl,--no-whole-archive')"`
2
+PKG_CXXFLAGS=-I"./gc-7.2/include" -I"./Muscle/" -I"./ClustalW/src" -I"./ClustalOmega/src" `"${R_HOME}/bin${R_ARCH_BIN}/Rscript" -e "Rcpp:::CxxFlags()"`
3 3
 
4 4
 .PHONY: all mylibs
5 5
 
... ...
@@ -6,6 +6,6 @@ all: muscle
6 6
 
7 7
 muscle:
8 8
 	export PKG_CXXFLAGS="$(PKG_CXXFLAGS) -I"../gc-7.2/include" `Rscript -e "Rcpp:::CxxFlags()"`"
9
-	R CMD SHLIB -o libMuscle.so $(CPPNames)
9
+	"${R_HOME}/bin/R" CMD SHLIB -o libMuscle.so $(CPPNames)
10 10
 	ar rcs libMuscle.a $(OBJNames)
11 11
 	cp libMuscle.a ../
... ...
@@ -6,7 +6,7 @@ all: muscle
6 6
 
7 7
 muscle:
8 8
 	export PKG_LIBS="$(PKG_LIBS) -L"../gc-7.2/" -lgc72 -lgccpp72"
9
-	export PKG_CXXFLAGS="-c -O3 -msse2 -mfpmath=sse -D_FILE_OFFSET_BITS=64 -DNDEBUG=1 $(PKG_CXXFLAGS) -I"../gc-7.2/include/" `${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe -e "Rcpp:::CxxFlags()"`"
10
-	${R_HOME}/bin${R_ARCH_BIN}/R.exe CMD SHLIB -o Muscle.dll $(CPPNames)
9
+	export PKG_CXXFLAGS="-c -O3 -msse2 -mfpmath=sse -D_FILE_OFFSET_BITS=64 -DNDEBUG=1 $(PKG_CXXFLAGS) -I"../gc-7.2/include/" `"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "Rcpp:::CxxFlags()"`"
10
+	"${R_HOME}/bin${R_ARCH_BIN}/R.exe" CMD SHLIB -o Muscle.dll $(CPPNames)
11 11
 	$(AR) rcs libMuscle.a $(OBJNames)
12 12
 	cp libMuscle.a ../