Fix missing cleanup of "tree" executable
[tiger.ml.git] / exercises / ch01 / Makefile
index 65c4991..d376e05 100644 (file)
@@ -3,9 +3,13 @@ MAKEFLAGS := --no-builtin-rules
 OCAMLC_OPTIONS := -w A -warn-error A
 OCAMLC_BYTE    := ocamlc.opt   $(OCAMLC_OPTIONS)
 
-.PHONY: build clean
+EXECUTABLES := \
+       straight_line_program_interpreter \
+       tree
 
-build : straight_line_program_interpreter
+.PHONY: build clean demo_unbalanced
+
+build : $(EXECUTABLES)
 
 %: %.ml %.cmo %.cmi
        $(OCAMLC_BYTE) -o $@ $*.cmo
@@ -17,4 +21,10 @@ build : straight_line_program_interpreter
        $(OCAMLC_BYTE) -c $<
 
 clean:
-       rm -f straight_line_program_interpreter
+       rm -f $(EXECUTABLES)
+
+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.023393 seconds and 4 git commands to generate.