Skip to content
Snippets Groups Projects
Commit 61cbe867 authored by Mick Jordan's avatar Mick Jordan
Browse files

refactoring Rscript into two pieces

parent df968efe
No related branches found
No related tags found
No related merge requests found
...@@ -96,6 +96,7 @@ com.oracle.truffle.r.native/library/*/lib/* ...@@ -96,6 +96,7 @@ com.oracle.truffle.r.native/library/*/lib/*
com.oracle.truffle.r.native/library/stats/src/fft.c com.oracle.truffle.r.native/library/stats/src/fft.c
com.oracle.truffle.r.native/platform.mk com.oracle.truffle.r.native/platform.mk
com.oracle.truffle.r.native/gnur/Makeconf.done com.oracle.truffle.r.native/gnur/Makeconf.done
com.oracle.truffle.r.native/run/Makeconf.etc
com.oracle.truffle.r.native/include/jni/include com.oracle.truffle.r.native/include/jni/include
com.oracle.truffle.r.native/include/jni/linked com.oracle.truffle.r.native/include/jni/linked
com.oracle.truffle.r.test.native/packages/*/lib/* com.oracle.truffle.r.test.native/packages/*/lib/*
......
...@@ -33,7 +33,7 @@ all: $(TOPDIR)/platform.mk ...@@ -33,7 +33,7 @@ all: $(TOPDIR)/platform.mk
$(TOPDIR)/platform.mk: sedMakeconf $(GNUR_HOME)/Makeconf $(TOPDIR)/platform.mk: sedMakeconf $(GNUR_HOME)/Makeconf
sed -f sedMakeconf $(GNUR_HOME)/Makeconf > /dev/null 2>&1 sed -f sedMakeconf $(GNUR_HOME)/Makeconf > /dev/null 2>&1
cp platform.mk.temp $(TOPDIR)/run/Makeconf cp platform.mk.temp $(TOPDIR)/run/Makeconf.etc
echo OS_NAME = $(OS_NAME) >> platform.mk.temp echo OS_NAME = $(OS_NAME) >> platform.mk.temp
echo OS_DIR = $(OS_DIR) >> platform.mk.temp echo OS_DIR = $(OS_DIR) >> platform.mk.temp
mv platform.mk.temp $(TOPDIR)/platform.mk mv platform.mk.temp $(TOPDIR)/platform.mk
......
...@@ -50,15 +50,17 @@ rundirs: ...@@ -50,15 +50,17 @@ rundirs:
rcmds: $(FASTR_BINDIR)/R rcmds: $(FASTR_BINDIR)/R
$(FASTR_BINDIR)/R: Makefile R.sh Rscript.sh $(FASTR_BINDIR)/R: Makefile R.sh Rscript.sh Rscript_exec.sh
cp R.sh $(FASTR_BINDIR)/exec/R cp R.sh $(FASTR_BINDIR)/exec/R
chmod +x $(FASTR_BINDIR)/exec/R cp Rscript_exec.sh $(FASTR_BINDIR)/exec/Rscript
cp Rscript.sh $(FASTR_BINDIR)/Rscript cp Rscript.sh $(FASTR_BINDIR)/Rscript
chmod +x $(FASTR_BINDIR)/exec/R $(FASTR_BINDIR)/exec/Rscript $(FASTR_BINDIR)/Rscript
cp $(SUPPORT_SCRIPTS) $(FASTR_BINDIR) cp $(SUPPORT_SCRIPTS) $(FASTR_BINDIR)
sed -e 's!\(^R_HOME_DIR=\)\(.*\)!\1"$(FASTR_R_HOME)"!' < $(R_SCRIPT) > $(FASTR_BINDIR)/R sed -e 's!\(^R_HOME_DIR=\)\(.*\)!\1"$(FASTR_R_HOME)"!' < $(R_SCRIPT) > $(FASTR_BINDIR)/R
touch $(FASTR_ETCDIR)/ldpaths touch $(FASTR_ETCDIR)/ldpaths
cp $(GNUR_HOME)/etc/Renviron $(FASTR_ETCDIR) cp $(GNUR_HOME)/etc/Renviron $(FASTR_ETCDIR)
cp Makeconf $(FASTR_ETCDIR)/Makeconf cp Makeconf.etc $(FASTR_ETCDIR)/Makeconf
clean: clean:
rm -rf $(FASTR_BINDIR) rm -rf $(FASTR_BINDIR)
rm -f Makeconf.etc
#!/bin/bash #!/bin/bash
# #
# This material is distributed under the GNU General Public License # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
# Version 2. You may review the terms of this license at # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# http://www.gnu.org/licenses/gpl-2.0.html
# #
# Copyright (c) 1995-2015, The R Core Team # This code is free software; you can redistribute it and/or modify it
# Copyright (c) 2003, The R Foundation # under the terms of the GNU General Public License version 2 only, as
# Copyright (c) 2015, Oracle and/or its affiliates # published by the Free Software Foundation.
# #
# All rights reserved. # 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.
# #
# Startup FastR using the mx tool (development) # Startup FastR (R) using the mx tool (development)
# This is exec'ed by the (generic) R script in the parent directory. # This is exec'ed by the (generic) R script in the parent directory.
# #
......
#!/bin/bash #!/bin/bash
# #
# This material is distributed under the GNU General Public License # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
# Version 2. You may review the terms of this license at # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# http://www.gnu.org/licenses/gpl-2.0.html
# #
# Copyright (c) 1995-2015, The R Core Team # This code is free software; you can redistribute it and/or modify it
# Copyright (c) 2003, The R Foundation # under the terms of the GNU General Public License version 2 only, as
# Copyright (c) 2015, Oracle and/or its affiliates # published by the Free Software Foundation.
# #
# All rights reserved. # 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.
# #
# Fledgling Rscript command to startup FastR # In GnuR Rscript is an executable in the bin directory.
# In FastR Rscript and R are combined in the same image. For consistency
# Rscript is a script in the bin directory that simply invokes bin/exec/Rscript
source="${BASH_SOURCE[0]}" source="${BASH_SOURCE[0]}"
while [ -h "$source" ] ; do source="$(readlink "$source")"; done while [ -h "$source" ] ; do source="$(readlink "$source")"; done
PRIMARY_PATH="$( cd -P "$( dirname "$source" )" && pwd )"/.. here="$( cd -P "$( dirname "$source" )" && pwd )"
mx --primary-suite-path $PRIMARY_PATH Rscript "$@" exec $here/exec/Rscript "$@"
#!/bin/bash
#
# 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.
#
# Startup FastR (Rscript) using the mx tool (development)
# This is exec'ed by the (generic) Rscript script in the parent directory.
source="${BASH_SOURCE[0]}"
while [ -h "$source" ] ; do source="$(readlink "$source")"; done
PRIMARY_PATH="$( cd -P "$( dirname "$source" )" && pwd )"/../..
mx $MX_R_GLOBAL_ARGS --primary-suite-path $PRIMARY_PATH Rscript $MX_R_CMD_ARGS "$@"
...@@ -22,8 +22,6 @@ com.oracle.truffle.r.native/library/tools/src/tools.h,no.copyright ...@@ -22,8 +22,6 @@ com.oracle.truffle.r.native/library/tools/src/tools.h,no.copyright
com.oracle.truffle.r.native/library/tools/src/init.c,no.copyright com.oracle.truffle.r.native/library/tools/src/init.c,no.copyright
com.oracle.truffle.r.native/library/utils/src/utils.h,no.copyright com.oracle.truffle.r.native/library/utils/src/utils.h,no.copyright
com.oracle.truffle.r.native/library/utils/src/init.c,no.copyright com.oracle.truffle.r.native/library/utils/src/init.c,no.copyright
com.oracle.truffle.r.native/run/R.sh,gnu_r_bash.copyright
com.oracle.truffle.r.native/run/Rscript.sh,gnu_r_bash.copyright
com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/CallMatcherNode.java,purdue.copyright com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/CallMatcherNode.java,purdue.copyright
com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/GroupDispatchNode.java,purdue.copyright com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/GroupDispatchNode.java,purdue.copyright
com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/S3FunctionLookupNode.java,purdue.copyright com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/function/S3FunctionLookupNode.java,purdue.copyright
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment