Commit b33fa803 authored by Jens Korinth's avatar Jens Korinth
Browse files

Fix chiselSetup.sh, build.sbt

parent bd890015
...@@ -34,15 +34,3 @@ lazy val tapascostatus = (project in file(".")).dependsOn(packaging, axiutils, a ...@@ -34,15 +34,3 @@ lazy val tapascostatus = (project in file(".")).dependsOn(packaging, axiutils, a
cleanFiles ++= Seq((baseDirectory.value / "test"), (baseDirectory.value / "ip"), (baseDirectory.value / "chisel3")) cleanFiles ++= Seq((baseDirectory.value / "test"), (baseDirectory.value / "ip"), (baseDirectory.value / "chisel3"))
aggregate in test := false aggregate in test := false
lazy val chiselSetupTask = TaskKey[Unit]("chiselSetup", "Build latest chisel libs from source")
chiselSetupTask := {
import sys.process._
"./chiselSetup.sh" !
}
(compile in Compile) := {
val x = chiselSetupTask.value
(compile in Compile).value
}
...@@ -2,24 +2,40 @@ ...@@ -2,24 +2,40 @@
DIR=$PWD/chisel3 DIR=$PWD/chisel3
URL=https://github.com/freechipsproject URL=https://github.com/freechipsproject
REPOS="firrtl firrtl-interpreter chisel3 chisel-testers" REPOS="firrtl firrtl-interpreter chisel3 chisel-testers"
REPO_URLS=`for r in $REPOS; do echo $URL/$r.git; done` REPO_URLS=`for r in $REPOS; do echo $URL/$(echo $r | cut -d: -f1).git; done`
echo "Installing Chisel3 dependencies in $DIR ..."
if [ "$1" = "clean" ]; then if [ "$1" = "clean" ]; then
echo "Removing Chisel3 dependencies in $DIR ..."
rm -rf $DIR rm -rf $DIR
else else
echo "Installing Chisel3 dependencies in $DIR ..."
mkdir -p $DIR mkdir -p $DIR
pushd $DIR && pushd $DIR
for r in $REPOS; do for r in $REPOS; do
if [ ! -e $r ]; then if [ ! -e $r ]; then
git clone "$URL/$r.git" && R=`echo $r | cut -d: -f1`
pushd $r && V=`echo $r | cut -d: -s -f2`
sbt publishLocal && C=${V:+"-b $V"}
popd echo "$R $V $C $URL/$R.git"
if git clone "$URL/$R.git" $C; then
pushd $R
if sbt publishLocal; then
popd
else
echo "could not build $r - check log" >&2
exit 1
fi
else
echo "could not clone $URL/$r.git - check log" >&2
exit 1
fi
echo "================================================"
echo "$R finished."
echo "================================================"
else else
echo "$r already exists in $DIR/$r" echo "$r already exists in $DIR/$r"
fi fi
done && if [[ $? -ne 0 ]]; then exit 1; fi
done
popd popd
fi fi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment