From 2f0dcccad173b2478d9d9c4590b2355677b631bb Mon Sep 17 00:00:00 2001 From: kyessenov Date: Thu, 15 Jul 2010 02:02:11 +0000 Subject: Chalice: revert minor commit; add cygwin python make script --- Chalice/make | 39 +++++++++++++++++++++++++++++++++++++++ Chalice/src/Chalice.scala | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 Chalice/make diff --git a/Chalice/make b/Chalice/make new file mode 100644 index 00000000..643832ef --- /dev/null +++ b/Chalice/make @@ -0,0 +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." diff --git a/Chalice/src/Chalice.scala b/Chalice/src/Chalice.scala index d202f42f..2f54b71f 100644 --- a/Chalice/src/Chalice.scala +++ b/Chalice/src/Chalice.scala @@ -11,7 +11,7 @@ import scala.util.parsing.input.Position object Chalice { def main(args: Array[String]): unit = { - var boogiePath = "C:\\Users\\t-kuayes\\Documents\\Boogie-2010-07-13\\Boogie.exe" + var boogiePath = "C:\\boogie\\Binaries\\Boogie.exe" // parse command-line arguments var inputName: String = null var printProgram = false -- cgit v1.2.3