From fc06c909c0b698b3cb05f21be5a60f3307e27a5b Mon Sep 17 00:00:00 2001 From: Howard Mao Date: Mon, 28 Jan 2019 14:31:13 -0800 Subject: [PATCH] fix README section on adding new submodules --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8d456858..91fe7ef4 100644 --- a/README.md +++ b/README.md @@ -396,7 +396,16 @@ to the project template. git submodule add https://git-repository.com/yourproject.git -Then add `yourproject` to the `EXTRA_PACKAGES` variable in the Makefrag. -Now your project will be bundled into a jar file alongside the rocket-chip -and testchipip libraries. You can then import the classes defined in the -submodule in a new project. +Then add `yourproject` to the project-template build.sbt file. + +```scala + lazy val yourproject = project.settings(commonSettings).dependsOn(rocketchip) +``` + +You can then import the classes defined in the submodule in a new project if +you add it as a dependency. For instance, if you want to use this code in +the `example` project, change the final line in build.sbt to the following. + +```scala + lazy val example = (project in file(".")).settings(commonSettings).dependsOn(testchipip, yourproject) +```