added license and readme files to the doc
corrected classpath handling in tool-unix.tmpl git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@6782 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
aee0ec096c
commit
beb284a232
|
@ -983,6 +983,9 @@ GENERATES A DISTRIBUTION
|
||||||
perm="ugo+rx"
|
perm="ugo+rx"
|
||||||
/>
|
/>
|
||||||
<!-- Copy the API, examples and man -->
|
<!-- Copy the API, examples and man -->
|
||||||
|
<copy todir="${dist.current.dir}/doc/${dist.name}">
|
||||||
|
<fileset dir="${docs.dir}" includes="README,LICENSE"/>
|
||||||
|
</copy>
|
||||||
<copy todir="${dist.current.dir}/doc/${dist.name}/api">
|
<copy todir="${dist.current.dir}/doc/${dist.name}/api">
|
||||||
<fileset dir="${api.lib.dir}"/>
|
<fileset dir="${api.lib.dir}"/>
|
||||||
</copy>
|
</copy>
|
||||||
|
|
|
@ -31,12 +31,50 @@ done;
|
||||||
SCALA_HOME=`dirname "$SOURCE"`/..;
|
SCALA_HOME=`dirname "$SOURCE"`/..;
|
||||||
SCALA_HOME=`cd "$SCALA_HOME"; pwd`;
|
SCALA_HOME=`cd "$SCALA_HOME"; pwd`;
|
||||||
|
|
||||||
CLASSPATH=@classpath@
|
## buraq: previous version of this script computed the MYCLASSPATH and
|
||||||
if [ "$CLASSPATH" == "" ] ; then
|
## then appended it to the bootclasspath. Unfortunately, this
|
||||||
|
## won't work for library code that uses reflection to obtain
|
||||||
|
## a class living on the classpath. For this reason, we have
|
||||||
|
## to merge everything in the -cp classpath. This requires
|
||||||
|
## intercepting the user's -cp, if any, or the user's $CLASSPATH,
|
||||||
|
## if set, appending our libs to it and passing the whole thing by -cp
|
||||||
|
|
||||||
|
MYCLASSPATH=@classpath@
|
||||||
|
if [ "$MYCLASSPATH" == "" ] ; then
|
||||||
for jar in `ls $SCALA_HOME/lib/*.jar` ; do
|
for jar in `ls $SCALA_HOME/lib/*.jar` ; do
|
||||||
CLASSPATH=$CLASSPATH:$jar
|
MYCLASSPATH="$MYCLASSPATH:$jar"
|
||||||
done
|
done
|
||||||
CLASSPATH=${CLASSPATH:1}
|
MYCLASSPATH=${MYCLASSPATH:1}
|
||||||
|
fi
|
||||||
|
|
||||||
|
QQ_USERCLASSPATH="."
|
||||||
|
QQ_USERARGS=""
|
||||||
|
QQ_NEXT=0
|
||||||
|
for i in $@@ ; do
|
||||||
|
if [ $QQ_NEXT -eq 1 ] ; then
|
||||||
|
QQ_USERCLASSPATH=$i
|
||||||
|
QQ_NEXT=0
|
||||||
|
else
|
||||||
|
if [[ $i = "-cp" || $i = "-classpath" ]] ; then
|
||||||
|
QQ_NEXT=1
|
||||||
|
else
|
||||||
|
QQ_USERARGS="$QQ_USERARGS $i"
|
||||||
|
QQ_NEXT=0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
## Lex suggested the user classpath comes before
|
||||||
|
## the Scala libraries, since it gets preferred.
|
||||||
|
|
||||||
|
if [ "$QQ_USERCLASSPATH" != "." ] ; then
|
||||||
|
MYCLASSPATH="$QQ_USERCLASSPATH:$MYCLASSPATH"
|
||||||
|
else
|
||||||
|
if [ "$CLASSPATH" != "" ] ; then
|
||||||
|
MYCLASSPATH="$CLASSPATH:$MYCLASSPATH"
|
||||||
|
else
|
||||||
|
MYCLASSPATH=".:$MYCLASSPATH"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $cygwin; then
|
if $cygwin; then
|
||||||
|
@ -45,7 +83,7 @@ if $cygwin; then
|
||||||
else
|
else
|
||||||
format=windows
|
format=windows
|
||||||
fi
|
fi
|
||||||
CLASSPATH=`cygpath --path --$format "$CLASSPATH"`
|
MYCLASSPATH=`cygpath --path --$format "$MYCLASSPATH"`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for flag in "$@@" ; do
|
for flag in "$@@" ; do
|
||||||
|
@ -55,4 +93,4 @@ for flag in "$@@" ; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
${JAVACMD:=java} @javaflags@ -Dscala.home="$SCALA_HOME" -Dscala.tool.name="@name@" -Dscala.tool.version="@version@" @properties@ -cp "$CLASSPATH" @class@ @toolflags@ "$@@"
|
${JAVACMD:=java} @javaflags@ -Dscala.home="$SCALA_HOME" -Dscala.tool.name="@name@" -Dscala.tool.version="@version@" @properties@ -cp $MYCLASSPATH @class@ @toolflags@ $QQ_USERARGS
|
||||||
|
|
Loading…
Reference in New Issue