diff --git a/.gitignore b/.gitignore index 9fd508b7..4224ac53 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ target/ project/target *.swp *~ +.addons-dont-touch diff --git a/addons/.gitignore b/addons/.gitignore deleted file mode 100644 index 28e79c2d..00000000 --- a/addons/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -src -target diff --git a/addons/DO_NOT_ADD_FILES_HERE.README b/addons/DO_NOT_ADD_FILES_HERE.README deleted file mode 100644 index b9b106dd..00000000 --- a/addons/DO_NOT_ADD_FILES_HERE.README +++ /dev/null @@ -1,3 +0,0 @@ -ANY FILES ADDED HERE WILL BE DELETED - -The src directory is dynamically refreshed by the rocketchip project as part of the addons/prepare task. diff --git a/project/build.scala b/project/build.scala index aadd597e..9b0b2da2 100644 --- a/project/build.scala +++ b/project/build.scala @@ -34,8 +34,8 @@ object BuildSettings extends Build { val baselist = Vector("chisel", "uncore", "rocket", "hardfloat") def getsubdirs = { - val blacklist = (baselist ++ Vector("target", "project", "addons")) - IO.listFiles(file(".")) map (_.toString.split("/").last) filter (f=> !blacklist.contains(f)) filter (f=> !IO.listFiles(file(f+"/src/main/scala")).isEmpty) + val blacklist = (baselist ++ Vector("target", "project")) + IO.listFiles(file(".")) map (_.toString.split("/").last) filter (f=> !blacklist.contains(f) && (f(0)!='.')) filter (f=> !IO.listFiles(file(f+"/src/main/scala")).isEmpty) } val addonsources = getsubdirs map (f=>s"${f}/src/main/scala") map (f=>file(f)) addonsources.foreach(a => println(s"[info] Found addon: " + a.toString.split("/").head)) @@ -43,15 +43,15 @@ object BuildSettings extends Build { val prepareTask = TaskKey[Unit]("prepare","Remove old sources and copy over new ones to addon/src") def prepareTaskImpl = { import IO._ - delete(file("addons/src")) - createDirectory(file("addons/src/main/scala")) + delete(file(".addons-dont-touch/src")) + createDirectory(file(".addons-dont-touch/src/main/scala")) addonsources.foreach(as => { val addonname = as.toString.split("/").head - copyDirectory(as, file("addons/src/main/scala/"+addonname)) + copyDirectory(as, file(".addons-dont-touch/src/main/scala/"+addonname)) }) } - lazy val addons = Project("addons", file("addons"), settings = buildSettings ++ Seq( + lazy val addons = Project("addons", file(".addons-dont-touch"), settings = buildSettings ++ Seq( prepareTask := prepareTaskImpl, (compile in Compile) <<= (compile in Compile) dependsOn (prepareTask) )) dependsOn(chisel, hardfloat, uncore, rocket)