From 9b25ed521ad6ae7c54b83e47175b5589dae255cd Mon Sep 17 00:00:00 2001 From: Jakob Odersky Date: Wed, 9 Sep 2015 13:10:54 +0200 Subject: minor tweaks --- flow-native/readme.md | 2 +- project/Build.scala | 6 ++++-- project/jni.scala | 2 +- project/native.scala | 6 +++--- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/flow-native/readme.md b/flow-native/readme.md index 86987ed..4bee987 100644 --- a/flow-native/readme.md +++ b/flow-native/readme.md @@ -1,3 +1,3 @@ # Native backend for flow -Refer to documentation/building.md for information on how to build. \ No newline at end of file +Refer to Documentation/building.md for information on how to build. diff --git a/project/Build.scala b/project/Build.scala index 7842517..8c882dc 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -5,11 +5,13 @@ import NativeKeys._ object FlowBuild extends Build { + + val scalaVersions = List("2.11.7", "2.10.5") lazy val commonSettings: Seq[Setting[_]] = Seq( version := "2.2.3-SNAPSHOT", - scalaVersion in ThisBuild := "2.11.7", - crossScalaVersions in ThisBuild := Seq("2.10.5", "2.11.7"), + scalaVersion in ThisBuild := scalaVersions.head, + crossScalaVersions in ThisBuild := scalaVersions.reverse, organization := "com.github.jodersky", licenses := Seq(("BSD New", url("http://opensource.org/licenses/BSD-3-Clause"))), scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature", "-target:jvm-1.7") diff --git a/project/jni.scala b/project/jni.scala index 6686078..07d8406 100644 --- a/project/jni.scala +++ b/project/jni.scala @@ -29,7 +29,7 @@ object JniDefaults { clazz) val cmd = parts.mkString(" ") val ev = Process(cmd) ! streams.value.log - if (ev != 0) throw new RuntimeException("Error occured running javah.") + if (ev != 0) throw new RuntimeException(s"Error occured running javah. Exit code: ${ev}") } IO.listFiles(javahHeaderDirectory.value) } diff --git a/project/native.scala b/project/native.scala index 9af8b77..342a863 100644 --- a/project/native.scala +++ b/project/native.scala @@ -33,7 +33,7 @@ object NativeDefaults { "./configure " + "--prefix=" + out.getAbsolutePath + " " + "--libdir=" + out.getAbsolutePath + " " + - "--disable-versioned-lib", + "--disable-versioned-lib", //Disable producing versioned library files, not needed for fat jars. build) val make = Process("make", build) @@ -42,7 +42,7 @@ object NativeDefaults { val ev = configure #&& make #&& makeInstall ! log if (ev != 0) - throw new RuntimeException(s"Building native library failed.") + throw new RuntimeException(s"Building native library failed. Exit code: ${ev}") (out ** ("*.la")).get.foreach(_.delete()) @@ -67,7 +67,7 @@ object NativeDefaults { managedMappings ++ unmanagedMappings } - def os = System.getProperty("os.name").toLowerCase.filter(_ != ' ') + def os = System.getProperty("os.name").toLowerCase.filter(c => !c.isWhitespace) def arch = System.getProperty("os.arch").toLowerCase val settings: Seq[Setting[_]] = Seq( -- cgit v1.2.3