summaryrefslogtreecommitdiff
path: root/Chalice
diff options
context:
space:
mode:
authorGravatar kyessenov <unknown>2010-12-04 21:02:00 +0000
committerGravatar kyessenov <unknown>2010-12-04 21:02:00 +0000
commit7815fe3715e83d9a73f171bbb2839c49d0f0bd3a (patch)
treeedb939db5e5119ad8cd0c8d60e4e0630155bac16 /Chalice
parentf08bf65f0c319ea266e75bf4ebb8448ab91d2ae8 (diff)
Small changes to compile and test Chalice on Linux.
Diffstat (limited to 'Chalice')
-rw-r--r--Chalice/make78
-rw-r--r--Chalice/src/Chalice.scala6
2 files changed, 43 insertions, 41 deletions
diff --git a/Chalice/make b/Chalice/make
index 643832ef..cdb3b29a 100644
--- a/Chalice/make
+++ b/Chalice/make
@@ -1,39 +1,39 @@
-#! /bin/python
-
-import os
-import glob
-import sys
-import datetime
-
-bindir = "bin"
-if not os.path.exists(bindir):
- os.makedirs(bindir)
-
-srcspecs = ["src/*.scala"]
-srcfiles = [file for spec in srcspecs for file in glob.glob(spec)]
-
-buildstamp = "makestamp"
-
-lastbuild = None
-if os.path.exists(buildstamp):
- lastbuild = os.path.getmtime(buildstamp)
-
-changedfiles = [file for file in srcfiles if not lastbuild or lastbuild <= os.path.getmtime(file)]
-
-if not changedfiles:
- print "Build is up-to-date."
- sys.exit(0)
-
-def printtime():
- print datetime.datetime.now().strftime("%H:%M:%S")
-
-printtime()
-cmd = "scalac -d bin -unchecked -deprecation " + " ".join(changedfiles) + " 2>&1"
-print cmd
-result = os.system(cmd)
-printtime()
-
-if result == 0:
- open(buildstamp, "w").close()
-else:
- print "Build failed."
+#!/usr/bin/python
+
+import os
+import glob
+import sys
+import datetime
+
+bindir = "bin"
+if not os.path.exists(bindir):
+ os.makedirs(bindir)
+
+srcspecs = ["src/*.scala"]
+srcfiles = [file for spec in srcspecs for file in glob.glob(spec)]
+
+buildstamp = "makestamp"
+
+lastbuild = None
+if os.path.exists(buildstamp):
+ lastbuild = os.path.getmtime(buildstamp)
+
+changedfiles = [file for file in srcfiles if not lastbuild or lastbuild <= os.path.getmtime(file)]
+
+if not changedfiles:
+ print "Build is up-to-date."
+ sys.exit(0)
+
+def printtime():
+ print datetime.datetime.now().strftime("%H:%M:%S")
+
+printtime()
+cmd = "scalac -d bin -unchecked -deprecation " + " ".join(changedfiles) + " 2>&1"
+print cmd
+result = os.system(cmd)
+printtime()
+
+if result == 0:
+ open(buildstamp, "w").close()
+else:
+ print "Build failed."
diff --git a/Chalice/src/Chalice.scala b/Chalice/src/Chalice.scala
index 0b2d43c5..9fb76972 100644
--- a/Chalice/src/Chalice.scala
+++ b/Chalice/src/Chalice.scala
@@ -141,8 +141,10 @@ object Chalice {
// terminate boogie if interrupted
Runtime.getRuntime.addShutdownHook(new Thread(new Runnable() {
def run {
- val kill = Runtime.getRuntime.exec("taskkill /T /F /IM Boogie.exe");
- kill.waitFor;
+ try {
+ val kill = Runtime.getRuntime.exec("taskkill /T /F /IM Boogie.exe");
+ kill.waitFor;
+ } catch {case _ => }
// just to be sure
boogie.destroy
}