diff --git a/com.oracle.truffle.r.native/Makefile b/com.oracle.truffle.r.native/Makefile index f75b70716969590364337b888a2405ab5c37a0dc..68ffc952e28a29a7dacfe3568b2158b96ff3282a 100644 --- a/com.oracle.truffle.r.native/Makefile +++ b/com.oracle.truffle.r.native/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,8 +29,11 @@ all: $(MAKE) -C builtinlibs $(MAKE) -C fficall $(MAKE) -C library + $(MAKE) -C run clean: $(MAKE) -C builtinlibs clean $(MAKE) -C fficall clean $(MAKE) -C library clean + $(MAKE) -C run clean + \ No newline at end of file diff --git a/com.oracle.truffle.r.native/run/Makefile b/com.oracle.truffle.r.native/run/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..150dd89423c60e859a9c2c4ddbb22e2af854b447 --- /dev/null +++ b/com.oracle.truffle.r.native/run/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +.PHONY: bindir all rcmd + +FASTR_BINDIR = $(TOPDIR)/../bin + +all: bindir rcmd + +bindir: + mkdir -p $(FASTR_BINDIR) + +rcmd: $(FASTR_BINDIR)/R + +$(FASTR_BINDIR)/R: R.sh Rscript.sh + cp R.sh $(FASTR_BINDIR)/R + cp Rscript.sh $(FASTR_BINDIR)/Rscript + chmod +x $(FASTR_BINDIR)/R + touch $(FASTR_BINDIR)/INSTALL + +clean: diff --git a/com.oracle.truffle.r.native/run/R.sh b/com.oracle.truffle.r.native/run/R.sh new file mode 100644 index 0000000000000000000000000000000000000000..330eb49b3a613433c75a6f316e4aeca446aa86fa --- /dev/null +++ b/com.oracle.truffle.r.native/run/R.sh @@ -0,0 +1,23 @@ +# +# This material is distributed under the GNU General Public License +# Version 2. You may review the terms of this license at +# http://www.gnu.org/licenses/gpl-2.0.html +# +# Copyright (c) 1995-2012, The R Core Team +# Copyright (c) 2003, The R Foundation +# Copyright (c) 2015, Oracle and/or its affiliates +# +# All rights reserved. +# + +# Fledgling R command to startup FastR +# Currently all R CMD calls are forwarded to GnuR +# +GNUR=`which R` + +case ${1} in + CMD) + exec $GNUR "$@";; + *) + exec mx R "$@";; + esac diff --git a/com.oracle.truffle.r.native/run/Rscript.sh b/com.oracle.truffle.r.native/run/Rscript.sh new file mode 100755 index 0000000000000000000000000000000000000000..75da099b8123b7a4a74bbc6516de8967dd8853cb --- /dev/null +++ b/com.oracle.truffle.r.native/run/Rscript.sh @@ -0,0 +1,15 @@ +# +# This material is distributed under the GNU General Public License +# Version 2. You may review the terms of this license at +# http://www.gnu.org/licenses/gpl-2.0.html +# +# Copyright (c) 1995-2012, The R Core Team +# Copyright (c) 2003, The R Foundation +# Copyright (c) 2015, Oracle and/or its affiliates +# +# All rights reserved. +# + +# Fledgling Rscript command to startup FastR + +mx Rscript "$@"