changeset 112:f73923903ba4

Add Makefile, fix compile errors
author Chris Cannam
date Wed, 17 Apr 2013 20:23:12 +0100
parents 90dca6156662
children 935c6ca5d370
files Makefile yetilab/plot/plot.yeti yetilab/stream/playback.yeti
diffstat 3 files changed, 25 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile	Wed Apr 17 20:23:12 2013 +0100
@@ -0,0 +1,16 @@
+TEST_SOURCES := $(wildcard yetilab/test/*.yeti yetilab/*/test/*.yeti yetilab/*/*/test/*.yeti)
+SOURCES := $(filter-out $(TESTS), $(wildcard yetilab/*.yeti yetilab/*/*.yeti yetilab/*/*/*.yeti))
+
+test/.run:	yetilab.jar $(TEST_SOURCES)
+	./bin/yc yetilab/test/all.yeti | tee $@.out
+	@grep -qv passed $@.out || touch $@
+
+yetilab.jar:	$(SOURCES)
+	./bin/yc -d classes -doc doc $^
+	jar cf $@ -C classes yetilab 
+
+clean:	
+	rm -rf com test/.run
+
+distclean:	clean
+	rm -f yetilab.jar
--- a/yetilab/plot/plot.yeti	Sun Apr 14 21:29:21 2013 +0100
+++ b/yetilab/plot/plot.yeti	Wed Apr 17 20:23:12 2013 +0100
@@ -38,11 +38,13 @@
     xrange = new Range(1, size.columns - 1);
     yrange = new Range(1, size.rows - 1);
     grid = new OrthonormalGrid(xrange, size.columns, yrange, size.rows);
+    println "Matrix size: \(size)";
     surface = Builder#buildOrthonormalBig(grid, mapper); //??? big?
     surface#setFaceDisplayed(false);
     surface#setWireframeDisplayed(true);
     surface#setWireframeColor(Color#BLACK);
-    chart = new Chart(Quality#Fastest, "swing");
+//    chart = new Chart(Quality#Fastest, "swing");
+    chart = new Chart(Quality#Nicest);
     chart#getScene()#getGraph()#add(surface);
     ChartLauncher#openChart(chart));
 
--- a/yetilab/stream/playback.yeti	Sun Apr 14 21:29:21 2013 +0100
+++ b/yetilab/stream/playback.yeti	Wed Apr 17 20:23:12 2013 +0100
@@ -13,7 +13,7 @@
 
 playBlock line b is ~SourceDataLine -> 'a -> () =
    (len = block.length b;
-    samples = block.unblock b;
+    samples = block.data b;
     nb = len * 2;
     bytes = new byte[nb];
     bb = ByteBuffer#wrap(bytes, 0, nb);
@@ -47,7 +47,11 @@
     line.close();
     stream.close());
 
-playFile filename = playStream (af.open filename);
+playFile filename = 
+    case af.open filename of
+    Stream str: playStream str;
+    Error e: failWith e
+    esac;
 
 {
     open, play, playStream, playFile,