From 409a65421cc625693a1c60af63dbf27c7efd63fb Mon Sep 17 00:00:00 2001 From: Matthias Zenger Date: Tue, 23 Sep 2003 10:04:40 +0000 Subject: Included scalap. --- sources/bin/.scala_wrapper.tmpl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'sources') diff --git a/sources/bin/.scala_wrapper.tmpl b/sources/bin/.scala_wrapper.tmpl index beddb6fc5e..0bbe351e2c 100644 --- a/sources/bin/.scala_wrapper.tmpl +++ b/sources/bin/.scala_wrapper.tmpl @@ -335,6 +335,25 @@ exec_dtd2scala() { "$@"; } +# Starts a program using dtd2scala. The given arguments are passed to +# exec_java. They must, at least, contain the name of the main class. +exec_scalap() { + [ $# -gt 0 ] || abort "internal error"; + + # compute Java classpath + append_path JAVA_CLASSPATH TOOLS_CLASSES; + + # compute Scala classpath and bootclasspath + compute_scala_classpath; + compute_scala_bootclasspath; + + # invoke Java + exec_java \ + -Dscala.class.path=`get_os_pathlist "$SCALA_CLASSPATH"` \ + -Dscala.boot.class.path=`get_os_pathlist "$SCALA_BOOTCLASSPATH"` \ + "$@"; +} + ############################################################################## # Implementation of scala-info @@ -476,6 +495,7 @@ case "$SCRIPT" in scalarun* ) exec_interpret scalai.Main "$@";; scalaint* ) exec_interpret scalai.Main -interactive "$@";; dtd2scala* ) exec_dtd2scala dtd2scala.Main "$@";; + scalap* ) exec_scalap scalap.Main "$@";; socos* ) warning "Deprecated command, use scalac${SCRIPT#socos} instead."; exec_compile scalac.Main "$@";; -- cgit v1.2.3