From 9d67ef4ee225da36843bb4694c36a1f6fa173a03 Mon Sep 17 00:00:00 2001 From: Henry Cook Date: Tue, 28 Jul 2015 14:35:26 -0700 Subject: [PATCH] simplify .sbt files --- rocket/build.sbt | 3 +++ rocket/chisel-dependent.sbt | 10 ---------- rocket/hardfloat-dependent.sbt | 8 -------- rocket/uncore-dependent.sbt | 8 -------- 4 files changed, 3 insertions(+), 26 deletions(-) delete mode 100644 rocket/chisel-dependent.sbt delete mode 100644 rocket/hardfloat-dependent.sbt delete mode 100644 rocket/uncore-dependent.sbt diff --git a/rocket/build.sbt b/rocket/build.sbt index d9150787..33b49e0a 100644 --- a/rocket/build.sbt +++ b/rocket/build.sbt @@ -5,3 +5,6 @@ version := "1.2" name := "rocket" scalaVersion := "2.10.2" + +libraryDependencies ++= (Seq("chisel", "hardfloat", "uncore").map { + dep: String => sys.props.get(dep + "Version") map { "edu.berkeley.cs" %% dep % _ }}).flatten diff --git a/rocket/chisel-dependent.sbt b/rocket/chisel-dependent.sbt deleted file mode 100644 index 1681364e..00000000 --- a/rocket/chisel-dependent.sbt +++ /dev/null @@ -1,10 +0,0 @@ -// Provide a managed dependency on chisel if -DchiselVersion="" is -// supplied on the command line. - -val chiselVersion_r = System.getProperty("chiselVersion", "None") - -// _r a temporary fix until sbt 13.6 https://github.com/sbt/sbt/issues/1465 - -libraryDependencies ++= ( if (chiselVersion_r != "None" ) ( - "edu.berkeley.cs" %% "chisel" % chiselVersion_r -) :: Nil; else Nil) diff --git a/rocket/hardfloat-dependent.sbt b/rocket/hardfloat-dependent.sbt deleted file mode 100644 index e6cc8f7e..00000000 --- a/rocket/hardfloat-dependent.sbt +++ /dev/null @@ -1,8 +0,0 @@ -// Provide a managed dependency on chisel if -DhardfloatVersion="" is -// supplied on the command line. - -val hardfloatVersion = System.getProperty("hardfloatVersion", "None") - -libraryDependencies ++= ( if (hardfloatVersion != "None" ) ( - "edu.berkeley.cs" %% "hardfloat" % hardfloatVersion -) :: Nil; else Nil) diff --git a/rocket/uncore-dependent.sbt b/rocket/uncore-dependent.sbt deleted file mode 100644 index 9526f621..00000000 --- a/rocket/uncore-dependent.sbt +++ /dev/null @@ -1,8 +0,0 @@ -// Provide a managed dependency on chisel if -DuncoreVersion="" is -// supplied on the command line. - -val uncoreVersion = System.getProperty("uncoreVersion", "None") - -libraryDependencies ++= ( if (uncoreVersion != "None" ) ( - "edu.berkeley.cs" %% "uncore" % uncoreVersion -) :: Nil; else Nil)