aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-10-18 17:42:57 +0200
committerGuillaume Martres <smarter@ubuntu.com>2016-11-22 01:35:06 +0100
commit2769e1b5b680868433c91b37d44f9420d728c4ac (patch)
treeba66613269a7b50746f124a92d9c970411521825 /bin
parent2d10c87ce537fb42fdb134efcae53dca7305a7b7 (diff)
downloaddotty-2769e1b5b680868433c91b37d44f9420d728c4ac.tar.gz
dotty-2769e1b5b680868433c91b37d44f9420d728c4ac.tar.bz2
dotty-2769e1b5b680868433c91b37d44f9420d728c4ac.zip
separate lib from compiler
Diffstat (limited to 'bin')
-rwxr-xr-xbin/common13
-rwxr-xr-xbin/dotc8
2 files changed, 14 insertions, 7 deletions
diff --git a/bin/common b/bin/common
index 8f4677330..0d7dc6150 100755
--- a/bin/common
+++ b/bin/common
@@ -74,6 +74,7 @@ function build_jar {
function update_packages {
echo "$INTERFACES_JAR" > $DOTTY_ROOT/.packages
echo "$MAIN_JAR" >> $DOTTY_ROOT/.packages
+ echo "$DOTTY_LIB_JAR" >> $DOTTY_ROOT/.packages
echo "$TEST_JAR" >> $DOTTY_ROOT/.packages
}
@@ -84,10 +85,14 @@ function build_all {
INTERFACES_JAR=$(build_jar dotty-interfaces/package interfaces/target)
printf "done\n"
- printf "Building dotty..."
+ printf "Building dotty-compiler..."
MAIN_JAR=$(build_jar package "target/scala-$SCALA_BINARY_VERSION")
printf "done\n"
+ printf "Building dotty library..."
+ DOTTY_LIB_JAR=$(build_jar dotty-library/package "library/target/scala-$SCALA_BINARY_VERSION")
+ printf "done\n"
+
printf "Building tests..."
TEST_JAR=$(build_jar test:package "target/scala-$SCALA_BINARY_VERSION" '/dotty.*-tests\.jar/p')
printf "done\n"
@@ -101,10 +106,11 @@ if [ ! -f "$DOTTY_ROOT/.packages" ]; then
else
IFS=$'\r\n' GLOBIGNORE='*' command eval 'JARS=($(cat $DOTTY_ROOT/.packages))'
- if [ "${#JARS[@]}" == "3" ]; then
+ if [ "${#JARS[@]}" == "4" ]; then
INTERFACES_JAR="${JARS[0]}"
MAIN_JAR="${JARS[1]}"
- TEST_JAR="${JARS[2]}"
+ DOTTY_LIB_JAR="${JARS[2]}"
+ TEST_JAR="${JARS[3]}"
else
echo "Failed to parse .packages file"
build_all
@@ -126,6 +132,7 @@ function check_jar {
check_jar "dotty-interfaces" $INTERFACES_JAR "interfaces" 'INTERFACES_JAR=$(build_jar dotty-interfaces/package interfaces/target)'
check_jar "dotty" $MAIN_JAR "src" 'MAIN_JAR=$(build_jar package target/scala-$SCALA_BINARY_VERSION)'
+check_jar "dotty-library" $DOTTY_LIB_JAR "library" 'DOTTY_LIB_JAR=$(build_jar dotty-library/package library/target/scala-$SCALA_BINARY_VERSION)'
check_jar "dotty-tests" $TEST_JAR "test" 'TEST_JAR=$(build_jar test:package target/scala-$SCALA_BINARY_VERSION /dotty.*-tests\.jar/p)'
# Autodetecting the scala-library location, in case it wasn't provided by an environment variable
diff --git a/bin/dotc b/bin/dotc
index 3f529194c..57e97ba5c 100755
--- a/bin/dotc
+++ b/bin/dotc
@@ -115,12 +115,12 @@ trap onExit INT
classpathArgs () {
if [[ "true" == $bootstrapped ]]; then
check_jar "dotty-bootstrapped" $DOTTY_JAR "target" 'build_jar "test:runMain dotc.build" target' &> /dev/null
- toolchain="$DOTTY_JAR:$SCALA_LIBRARY_JAR:$SCALA_REFLECT_JAR:$SCALA_COMPILER_JAR:$SBT_INTERFACE_JAR"
+ toolchain="$DOTTY_JAR:$DOTTY_LIB_JAR:$SCALA_LIBRARY_JAR:$SCALA_REFLECT_JAR:$SCALA_COMPILER_JAR:$SBT_INTERFACE_JAR"
else
- toolchain="$SCALA_LIBRARY_JAR:$SCALA_REFLECT_JAR:$SCALA_COMPILER_JAR:$SBT_INTERFACE_JAR"
+ toolchain="$SCALA_LIBRARY_JAR:$DOTTY_LIB_JAR:$SCALA_REFLECT_JAR:$SCALA_COMPILER_JAR:$SBT_INTERFACE_JAR"
fi
- bcpJars="$INTERFACES_JAR:$MAIN_JAR"
- cpJars="$INTERFACES_JAR:$MAIN_JAR:$TEST_JAR"
+ bcpJars="$INTERFACES_JAR:$MAIN_JAR:$DOTTY_LIB_JAR"
+ cpJars="$INTERFACES_JAR:$MAIN_JAR:$DOTTY_LIB_JAR:$TEST_JAR"
if [[ -n "$cygwin" ]]; then
if [[ "$OS" = "Windows_NT" ]] && cygpath -m .>/dev/null 2>/dev/null ; then