summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/ant/templates/tool-unix.tmpl8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
index 0891ef8316..4227e19a50 100644
--- a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
+++ b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
@@ -82,7 +82,6 @@ fi
# -D options will be available as system properties.
declare -a java_args
declare -a scala_args
-CPSWITCH="-cp $TOOL_CLASSPATH"
while [ $# -gt 0 ]; do
case "$1" in
@@ -90,6 +89,10 @@ while [ $# -gt 0 ]; do
java_args=("${java_args[@@]}" "$1")
shift
;;
+ -toolcp)
+ TOOL_CLASSPATH="$TOOL_CLASSPATH:$2"
+ shift
+ ;;
-J*)
java_args=("${java_args[@@]}" "${1:2}")
shift
@@ -104,6 +107,9 @@ while [ $# -gt 0 ]; do
;;
esac
done
+
+: ${CPSWITCH:="-cp $TOOL_CLASSPATH"}
+
# reset "$@@" to the remaining args
set -- "${scala_args[@@]}"