summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2008-04-09 13:16:56 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2008-04-09 13:16:56 +0000
commit07b35f671e36a681583548c6abc209913c07fec5 (patch)
treeaf59598c45e9c7a6cfd24ef10097921ca18670f8 /src/compiler/scala/tools/ant/templates/tool-unix.tmpl
parented01acd9713e834142e17b68e4ab05fc2bcd347c (diff)
downloadscala-07b35f671e36a681583548c6abc209913c07fec5.tar.gz
scala-07b35f671e36a681583548c6abc209913c07fec5.tar.bz2
scala-07b35f671e36a681583548c6abc209913c07fec5.zip
Refactored SuperSabbus' targets to be finer gra...
Refactored SuperSabbus' targets to be finer grained and permit better dependency management (with JVM 1.4 and MSIL support in mind). First effort of refactoring the classpath handling: tools are run with the scala library on the classpath, not on the bootclasspath.
Diffstat (limited to 'src/compiler/scala/tools/ant/templates/tool-unix.tmpl')
-rw-r--r--src/compiler/scala/tools/ant/templates/tool-unix.tmpl31
1 files changed, 8 insertions, 23 deletions
diff --git a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
index d963d18873..0f7cfa7447 100644
--- a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
+++ b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
@@ -1,9 +1,7 @@
#!/bin/sh
##############################################################################
-# @name@ @version@
-##############################################################################
-# @copyright@
+# Copyright 2002-2008, LAMP/EPFL
#
# This is free software; see the distribution for copying conditions.
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
@@ -11,10 +9,8 @@
##############################################################################
cygwin=false;
-darwin=false;
case "`uname`" in
CYGWIN*) cygwin=true ;;
- Darwin*) darwin=true ;;
esac
# Finding the root folder for this Scala distribution
@@ -38,27 +34,17 @@ if $cygwin; then
fi
# Constructing the extension classpath
-EXTENSION_CLASSPATH="@extclasspath@"
-if [ -z "$EXTENSION_CLASSPATH" ] ; then
+TOOL_CLASSPATH="@classpath@"
+if [ -z "$TOOL_CLASSPATH" ] ; then
for ext in `ls -d "$SCALA_HOME"/lib/*` ; do
- if [ -z "$EXTENSION_CLASSPATH" ] ; then
- EXTENSION_CLASSPATH="$ext"
+ if [ -z "$TOOL_CLASSPATH" ] ; then
+ TOOL_CLASSPATH="$ext"
else
- EXTENSION_CLASSPATH="$EXTENSION_CLASSPATH:$ext"
+ TOOL_CLASSPATH="$TOOL_CLASSPATH:$ext"
fi
done
fi
-# Setting the boot class-path to be the standard library (either as a JAR or a folder)
-BOOT_CLASSPATH="@bootclasspath@"
-if [ -z "$BOOT_CLASSPATH" ] ; then
- if [ -f "$SCALA_HOME/lib/scala-library.jar" ] ; then
- BOOT_CLASSPATH="$SCALA_HOME/lib/scala-library.jar"
- elif [ -d "$SCALA_HOME/lib/library" ] ; then
- BOOT_CLASSPATH="$SCALA_HOME/lib/library"
- fi
-fi
-
if $cygwin; then
if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
format=mixed
@@ -66,11 +52,10 @@ if $cygwin; then
format=windows
fi
SCALA_HOME=`cygpath --$format "$SCALA_HOME"`
- EXTENSION_CLASSPATH=`cygpath --path --$format "$EXTENSION_CLASSPATH"`
- BOOT_CLASSPATH=`cygpath --path --$format "$BOOT_CLASSPATH"`
+ TOOL_CLASSPATH=`cygpath --path --$format "$TOOL_CLASSPATH"`
fi
# Reminder: substitution ${JAVA_OPTS:=-Xmx256M -Xms16M} DO NOT work on Solaris
[ -n "$JAVA_OPTS" ] || JAVA_OPTS="@javaflags@"
-${JAVACMD:=java} $JAVA_OPTS -Xbootclasspath/a:"$BOOT_CLASSPATH" -cp "$EXTENSION_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.classpath="$CLASSPATH" -Denv.emacs="$EMACS" @properties@ @class@ @toolflags@ "$@@"
+${JAVACMD:=java} $JAVA_OPTS -cp "$TOOL_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.classpath="$CLASSPATH" -Denv.emacs="$EMACS" @properties@ @class@ @toolflags@ "$@@"