From f1963f9264331b8dbcaab34e419717f20d93b9da Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Thu, 10 Oct 2024 16:24:42 -0500 Subject: [PATCH] maybe fix --- tools/build_absl.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/build_absl.sh b/tools/build_absl.sh index 8270683f..86f24d25 100755 --- a/tools/build_absl.sh +++ b/tools/build_absl.sh @@ -1,9 +1,15 @@ # https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Using-cmake +: ${R_HOME=`R RHOME`} +if test -z "${R_HOME}"; then + echo "could not determine R_HOME" + exit 1 +fi + # Do our best to pass on the user MAKEFLAGS. This can result in much faster # compilation of the vendored library. -MAKEFLAGS=`Rscript -e 'readRenviron("~/.R/Makevars"); cat(Sys.getenv("MAKEFLAGS"))'` +MAKEFLAGS=`${R_HOME}/bin/Rscript -e 'readRenviron("~/.R/Makevars"); cat(Sys.getenv("MAKEFLAGS"))'` if test -z "$MAKE"; then MAKE="`which make`"; fi if ${MAKE} --version ; then @@ -23,12 +29,6 @@ else exit 1 fi -: ${R_HOME=`R RHOME`} -if test -z "${R_HOME}"; then - echo "could not determine R_HOME" - exit 1 -fi - CC=`"${R_HOME}/bin/R" CMD config CC` CXX="`${R_HOME}/bin/R CMD config CXX17` `${R_HOME}/bin/R CMD config CXX17STD`" CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS`