reworked kotlin compiler dist

This commit is contained in:
Leonid Shalupov
2012-05-04 19:12:02 +04:00
parent 743c14f239
commit 4eae229127
24 changed files with 252 additions and 1246 deletions
@@ -39,18 +39,6 @@ if $cygwin; then
KOTLIN_HOME=`cygpath --unix "$KOTLIN_HOME"`
fi
# Constructing the extension classpath
TOOL_CLASSPATH=""
if [ -z "$TOOL_CLASSPATH" ] ; then
for ext in "$KOTLIN_HOME"/lib/* ; do
if [ -z "$TOOL_CLASSPATH" ] ; then
TOOL_CLASSPATH="$ext"
else
TOOL_CLASSPATH="$TOOL_CLASSPATH:$ext"
fi
done
fi
[ -n "$JAVA_OPTS" ] || JAVA_OPTS="-Xmx256M -Xms32M"
# break out -D and -J options and add them to JAVA_OPTS as well
@@ -69,7 +57,7 @@ while [ $# -gt 0 ]; do
shift
;;
-J*)
# as with -D, pass to scala even though it will almost
# as with -D, pass to kotlin even though it will almost
# never be used.
java_args=("${java_args[@]}" "${1:2}")
kotlin_args=("${kotlin_args[@]}" "$1")
@@ -94,5 +82,5 @@ CPSELECT="-cp "
"${JAVACMD:=java}" \
$JAVA_OPTS \
"${java_args[@]}" \
${CPSELECT}${TOOL_CLASSPATH} \
${CPSELECT}${KOTLIN_HOME}"/lib/kotlin-compiler.jar" \
org.jetbrains.jet.cli.jvm.K2JVMCompiler "$@"
@@ -21,26 +21,12 @@ if "%_JAVACMD%"=="" set _JAVACMD=java
rem We use the value of the JAVA_OPTS environment variable if defined
set _JAVA_OPTS=-Xmx256M -Xms32M
set _TOOL_CLASSPATH=
if "%_TOOL_CLASSPATH%"=="" (
for %%f in ("%_KOTLIN_HOME%\lib\*") do call :add_cpath "%%f"
for /d %%f in ("%_KOTLIN_HOME%\lib\*") do call :add_cpath "%%f"
)
"%_JAVACMD%" %_JAVA_OPTS% -cp "%_TOOL_CLASSPATH%" org.jetbrains.jet.cli.jvm.K2JVMCompiler %*
"%_JAVACMD%" %_JAVA_OPTS% -cp "%_KOTLIN_HOME%\lib\kotlin-compiler.jar" org.jetbrains.jet.cli.jvm.K2JVMCompiler %*
goto end
rem ##########################################################################
rem # subroutines
:add_cpath
if "%_TOOL_CLASSPATH%"=="" (
set _TOOL_CLASSPATH=%~1
) else (
set _TOOL_CLASSPATH=%_TOOL_CLASSPATH%;%~1
)
goto :eof
:set_home
set _BIN_DIR=
for %%i in (%~sf0) do set _BIN_DIR=%_BIN_DIR%%%~dpsi