diff options
author | mihaylov <mihaylov@epfl.ch> | 2008-02-14 06:34:05 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2008-02-14 06:34:05 +0000 |
commit | c8fcd5202eae6104e42cb50fda0025b9c3b3b56d (patch) | |
tree | 6df2bf57e3a5c073e9949485857cd29e21da02ba | |
parent | 67729af8d59c9bde12b426a552f010553d0d7726 (diff) | |
download | scala-c8fcd5202eae6104e42cb50fda0025b9c3b3b56d.tar.gz scala-c8fcd5202eae6104e42cb50fda0025b9c3b3b56d.tar.bz2 scala-c8fcd5202eae6104e42cb50fda0025b9c3b3b56d.zip |
Check for command-line option dependency AFTER ...
Check for command-line option dependency AFTER all command-line
arguments have been parsed. Avoids unnecessary dependency on the order
of the arguments
-rw-r--r-- | src/compiler/scala/tools/nsc/CompilerCommand.scala | 4 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/clr/CLRTypes.scala | 2 | ||||
-rwxr-xr-x | test/scalatest | 6 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/CompilerCommand.scala b/src/compiler/scala/tools/nsc/CompilerCommand.scala index 95b65dadce..25c53cb2b7 100644 --- a/src/compiler/scala/tools/nsc/CompilerCommand.scala +++ b/src/compiler/scala/tools/nsc/CompilerCommand.scala @@ -96,8 +96,7 @@ class CompilerCommand(arguments: List[String], val settings: Settings, if (args eq args0) { error("bad option: '" + args.head + "'") ok = false - } else - ok = settings.checkDependencies + } } } else if ((settings.script.value != "") || args.head.endsWith(fileEnding)) { fs = args.head :: fs @@ -109,6 +108,7 @@ class CompilerCommand(arguments: List[String], val settings: Settings, ok = false } } + ok &&= settings.checkDependencies } processArguments() diff --git a/src/compiler/scala/tools/nsc/symtab/clr/CLRTypes.scala b/src/compiler/scala/tools/nsc/symtab/clr/CLRTypes.scala index e312c61f3f..d2f75693ea 100644 --- a/src/compiler/scala/tools/nsc/symtab/clr/CLRTypes.scala +++ b/src/compiler/scala/tools/nsc/symtab/clr/CLRTypes.scala @@ -195,7 +195,7 @@ abstract class CLRTypes { } } throw new RuntimeException( - "cannot find assembly " + name + "; use the -r option to specify its location") + "cannot find assembly " + name + "; use the -Xassem-path option to specify its location") } /** Load the rest of the assemblies specified with the '-r' option diff --git a/test/scalatest b/test/scalatest index 5b00c33830..f8f4ed7639 100755 --- a/test/scalatest +++ b/test/scalatest @@ -298,7 +298,7 @@ test_run_msil() { rm -f "$dstbase".$MSIL && rm -f "$dstbase".$EXE && - $SCALAC -nowarn -target:msil -Xassem "$os_dstbase" -Xassem-path $assemblies "$@" \ + $SCALAC -nowarn -Xassem "$os_dstbase" -Xassem-path $assemblies "$@" \ -sourcepath "$PREFIX/build/msil/src" "$os_srcbase".scala && case "$UNAME" in CYGWIN* ) @@ -755,7 +755,9 @@ while [ $# -gt 0 ]; do esac; done; -if [ "$JAVA5" = "false" -o "$TEST_TYPE" = "msil" ]; then +if [ "$TEST_TYPE" = "msil" ]; then + FLAGS="$FLAGS -target:msil"; +elif [ "$JAVA5" = "false" ]; then FLAGS="$FLAGS -target:jvm-1.4"; fi; |