Created
July 16, 2020 17:53
-
-
Save jimhester/6475b6cc108b7d55e69dfe1b300e89cd to your computer and use it in GitHub Desktop.
script to compile R on macOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# R recommends setting this to avoid issues with programs like sed: | |
export LANG=C | |
# Get version in major.minor format: | |
VERSION=`sed 's/\([0-9]*.[0-9]*\).[0-9]*.*/\1/' VERSION` | |
# Use version-dev as default folder target: | |
TARGET=${1:-$VERSION-dev} | |
# Download recommended packages | |
tools/rsync-recommended | |
./configure \ | |
--with-x=no \ | |
--enable-R-framework FW_VERSION=${TARGET} \ | |
CC=clang \ | |
CXX=clang++ \ | |
F77=gfortran-4.8 \ | |
FC=$F77 \ | |
OBJC=clang \ | |
CFLAGS='-Wall -mtune=core2 -g -O2' \ | |
CXXFLAGS='-Wall -mtune=core2 -g -O2' \ | |
OBJCFLAGS='-Wall -mtune=core2 -g -O2' \ | |
F77FLAGS='-Wall -g -O2' \ | |
FCFLAGS=$F77FLAGS | |
make R docs | |
sudo make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment