From 4f3b3e300a094ad9ceab6fab7b544b5f686fd6e9 Mon Sep 17 00:00:00 2001 From: Philippe Suter <philippe.suter@gmail.com> Date: Wed, 24 Oct 2012 15:07:49 +0200 Subject: [PATCH] `sbt clean` now deletes script. Fewer scripts in general. --- README | 8 ++++---- lib-bin/{ => 32}/libz3.so | Bin {lib64-bin => lib-bin/64}/libz3.so | Bin .../{ => src/main/scala/leon}/Annotations.scala | 0 library/{ => src/main/scala/leon}/Utils.scala | 0 project/Build.scala | 14 +++++++++++--- run-demo | 1 - run-demo-testgen | 1 - 8 files changed, 15 insertions(+), 9 deletions(-) rename lib-bin/{ => 32}/libz3.so (100%) rename {lib64-bin => lib-bin/64}/libz3.so (100%) rename library/{ => src/main/scala/leon}/Annotations.scala (100%) rename library/{ => src/main/scala/leon}/Utils.scala (100%) delete mode 100755 run-demo delete mode 100755 run-demo-testgen diff --git a/README b/README index dd0228d69..12537450f 100644 --- a/README +++ b/README @@ -13,13 +13,13 @@ To build it, you will need, for example, the following: To build, type this: -xsbt clean -xsbt package # takes a while -xsbt script + $ xsbt clean + $ xsbt package # takes a while + $ xsbt script Then you can try e.g. -./run-demo demo/RedBlackTree.scala + $ ./leon ./testcases/sas2011-testcases/RedBlackTree.scala and get something like this: diff --git a/lib-bin/libz3.so b/lib-bin/32/libz3.so similarity index 100% rename from lib-bin/libz3.so rename to lib-bin/32/libz3.so diff --git a/lib64-bin/libz3.so b/lib-bin/64/libz3.so similarity index 100% rename from lib64-bin/libz3.so rename to lib-bin/64/libz3.so diff --git a/library/Annotations.scala b/library/src/main/scala/leon/Annotations.scala similarity index 100% rename from library/Annotations.scala rename to library/src/main/scala/leon/Annotations.scala diff --git a/library/Utils.scala b/library/src/main/scala/leon/Utils.scala similarity index 100% rename from library/Utils.scala rename to library/src/main/scala/leon/Utils.scala diff --git a/project/Build.scala b/project/Build.scala index 1a56a0f59..e01392ba6 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -6,8 +6,15 @@ object Leon extends Build { private val scriptName = "leon" def scriptFile = file(".") / scriptName def is64 = System.getProperty("sun.arch.data.model") == "64" - def ldLibraryDir32 = file(".") / "lib-bin" - def ldLibraryDir64 = file(".") / "lib64-bin" + def ldLibraryDir32 = file(".") / "lib-bin" / "32" + def ldLibraryDir64 = file(".") / "lib-bin" / "64" + + val cleanTask = TaskKey[Unit]("clean", "Cleans up the generated binaries and scripts.") <<= (streams, clean) map { (s,c) => + c + if(scriptFile.exists && scriptFile.isFile) { + scriptFile.delete + } + } val scriptTask = TaskKey[Unit]("script", "Generate the " + scriptName + " Bash script") <<= (streams, dependencyClasspath in Compile, classDirectory in Compile) map { (s, deps, out) => if(!scriptFile.exists) { @@ -74,7 +81,8 @@ object Leon extends Build { object LeonProject { val settings = Seq( - scriptTask + scriptTask, + cleanTask ) } diff --git a/run-demo b/run-demo deleted file mode 100755 index a3db30e66..000000000 --- a/run-demo +++ /dev/null @@ -1 +0,0 @@ -./leon --timeout=10 --noLuckyTests $@ diff --git a/run-demo-testgen b/run-demo-testgen deleted file mode 100755 index 90b0479f2..000000000 --- a/run-demo-testgen +++ /dev/null @@ -1 +0,0 @@ -./leon --nodefaults --extensions=leon.TestGeneration $@ -- GitLab