summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2006-01-30 13:04:56 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2006-01-30 13:04:56 +0000
commit38b3c42eba09b4196f68507c1b74c8e8d669080f (patch)
tree95ba357467517d4fdbe0e80172f2822eecdd21b0 /src
parent3ebac4319b2ec21de7de1c3d228c370ea0e4675b (diff)
downloadscala-38b3c42eba09b4196f68507c1b74c8e8d669080f.tar.gz
scala-38b3c42eba09b4196f68507c1b74c8e8d669080f.tar.bz2
scala-38b3c42eba09b4196f68507c1b74c8e8d669080f.zip
Sanitized the ScalaTool ant script so that it d...
Sanitized the ScalaTool ant script so that it doesn't add an automatic $PREFIX to classpath elements.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/ant/ScalaTool.scala3
-rw-r--r--src/compiler/scala/tools/ant/templates/generic-unix.tmpl7
-rw-r--r--src/compiler/scala/tools/ant/templates/generic-windows.tmpl8
-rw-r--r--src/compiler/scala/tools/ant/templates/tool-unix.tmpl7
-rw-r--r--src/compiler/scala/tools/ant/templates/tool-windows.tmpl8
5 files changed, 15 insertions, 18 deletions
diff --git a/src/compiler/scala/tools/ant/ScalaTool.scala b/src/compiler/scala/tools/ant/ScalaTool.scala
index 55566404a8..cb6d67c194 100644
--- a/src/compiler/scala/tools/ant/ScalaTool.scala
+++ b/src/compiler/scala/tools/ant/ScalaTool.scala
@@ -135,8 +135,7 @@ package scala.tools.ant {
/** Sets the classpath attribute. Used by Ant.
* @param input The value of <code>classpath</code>. */
def setClasspath(input: String) =
- classpath = classpath :::
- (List.fromArray(input.split(":")).filter(p => p != "").map(p => "#PREFIX#/" + p))
+ classpath = classpath ::: List.fromArray(input.split(":"))
/** Sets the properties attribute. Used by Ant.
* @param input The value for <code>properties</code>. */
diff --git a/src/compiler/scala/tools/ant/templates/generic-unix.tmpl b/src/compiler/scala/tools/ant/templates/generic-unix.tmpl
index 6f62014138..6882ca06ce 100644
--- a/src/compiler/scala/tools/ant/templates/generic-unix.tmpl
+++ b/src/compiler/scala/tools/ant/templates/generic-unix.tmpl
@@ -28,13 +28,12 @@ while [ -h "$SOURCE" ]; do
SOURCE=`dirname "$SOURCE"`/${TARGET:-.};
fi;
done;
-PREFIX=`dirname "$SOURCE"`/..;
-prefix=$PREFIX;
-PREFIX=`cd "$PREFIX"; pwd`;
+SCALA_HOME=`dirname "$SOURCE"`/..;
+SCALA_HOME=`cd "$SCALA_HOME"; pwd`;
CLASSPATH=@classpath@
if [ "$CLASSPATH" == "" ] ; then
- for jar in `ls $PREFIX/lib/*.jar` ; do
+ for jar in `ls $SCALA_HOME/lib/*.jar` ; do
CLASSPATH=$CLASSPATH:$jar
done
CLASSPATH=${CLASSPATH:1}
diff --git a/src/compiler/scala/tools/ant/templates/generic-windows.tmpl b/src/compiler/scala/tools/ant/templates/generic-windows.tmpl
index 06a99569f5..b132b670cc 100644
--- a/src/compiler/scala/tools/ant/templates/generic-windows.tmpl
+++ b/src/compiler/scala/tools/ant/templates/generic-windows.tmpl
@@ -10,10 +10,10 @@ rem ##########################################################################
if "%OS%"=="Windows_NT" (
@@setlocal
- set _PREFIX=%~dp0..
+ set _SCALA_HOME=%~dp0..
) else (
- set _PREFIX=%SCALA_HOME%
- if "%_PREFIX%"=="" goto error1
+ set _SCALA_HOME=%SCALA_HOME%
+ if "%_SCALA_HOME%"=="" goto error1
)
set _JAVACMD=%JAVACMD%
@@ -22,7 +22,7 @@ set _JAVAFLAGS=@javaflags@
set _CLASSPATH=@classpath@
if not "%_CLASSPATH%"=="" goto args
-for %%f in ("%_PREFIX%\lib\*.jar") do call :add_cpath "%%f"
+for %%f in ("%_SCALA_HOME%\lib\*.jar") do call :add_cpath "%%f"
:args
set _ARGS=
diff --git a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
index 2dd8c1f7c4..86cb8d95ec 100644
--- a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
+++ b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
@@ -28,9 +28,8 @@ while [ -h "$SOURCE" ]; do
SOURCE=`dirname "$SOURCE"`/${TARGET:-.};
fi;
done;
-PREFIX=`dirname "$SOURCE"`/..;
-prefix=$PREFIX;
-PREFIX=`cd "$PREFIX"; pwd`;
+SCALA_HOME=`dirname "$SOURCE"`/..;
+SCALA_HOME=`cd "$SCALA_HOME"; pwd`;
CLASSPATH=@classpath@
if [ "$CLASSPATH" == "" ] ; then
@@ -56,4 +55,4 @@ for flag in "$@@" ; do
fi
done
-${JAVACMD:=java} @javaflags@ -Dscala.home="$PREFIX" -Dscala.tool.name="@name@" -Dscala.tool.version="@version@" @properties@ -cp "$CLASSPATH" @class@ @toolflags@ "$@@" \ No newline at end of file
+${JAVACMD:=java} @javaflags@ -Dscala.home="$SCALA_HOME" -Dscala.tool.name="@name@" -Dscala.tool.version="@version@" @properties@ -cp "$CLASSPATH" @class@ @toolflags@ "$@@" \ No newline at end of file
diff --git a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
index 8664ae0f29..faf02d176f 100644
--- a/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
+++ b/src/compiler/scala/tools/ant/templates/tool-windows.tmpl
@@ -10,10 +10,10 @@ rem ##########################################################################
if "%OS%"=="Windows_NT" (
@@setlocal
- set _PREFIX=%~dp0..
+ set _SCALA_HOME=%~dp0..
) else (
- set _PREFIX=%SCALA_HOME%
- if "%_PREFIX%"=="" goto error1
+ set _SCALA_HOME=%SCALA_HOME%
+ if "%_SCALA_HOME%"=="" goto error1
)
set _JAVACMD=%JAVACMD%
@@ -22,7 +22,7 @@ set _JAVAFLAGS=@javaflags@
set _CLASSPATH=@classpath@
if not "%_CLASSPATH%"=="" goto args
-for %%f in ("%_PREFIX%\lib\*.jar") do call :add_cpath "%%f"
+for %%f in ("%_SCALA_HOME%\lib\*.jar") do call :add_cpath "%%f"
:args
set _ARGS=