Fix demo of unbalanced behaviour - use graphviz
[tiger.ml.git] / exercises / ch01 / Makefile
index 65c4991..3c986c0 100644 (file)
@@ -3,9 +3,11 @@ MAKEFLAGS := --no-builtin-rules
 OCAMLC_OPTIONS := -w A -warn-error A
 OCAMLC_BYTE    := ocamlc.opt   $(OCAMLC_OPTIONS)
 
-.PHONY: build clean
+.PHONY: build clean demo_unbalanced
 
-build : straight_line_program_interpreter
+build : \
+       straight_line_program_interpreter \
+       tree
 
 %: %.ml %.cmo %.cmi
        $(OCAMLC_BYTE) -o $@ $*.cmo
@@ -18,3 +20,9 @@ build : straight_line_program_interpreter
 
 clean:
        rm -f straight_line_program_interpreter
+
+tree.png: tree
+       ./tree a b c d e f g h i j k l m n o p q r s t u v foo bar kgkvbkvg lkhjlk gfjyfjf fdtrdchfhtr trhfgfch hjlilijhl iygkyugkgkhy | neato -T png > tree.png
+
+demo_unbalanced: tree.png
+       sxiv ./tree.png
This page took 0.0266 seconds and 4 git commands to generate.