$(OCAMLC_BYTE) -c $<
clean:
- rm -f $(EXECUTABLES)
+ rm -f $(EXECUTABLES) tree.dot # There's also tree.png, but I'm keeping it.
-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
+tree.dot: 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 > tree.dot
+
+tree.png: tree.dot
+ neato -T png tree.dot > tree.png
demo_unbalanced: tree.png
sxiv ./tree.png
~init:("", "\n")
~f:(fun (edges, sep) (k1, k2) ->
let k1, k2 = k_to_string k1, k_to_string k2 in
- (Printf.sprintf "%s%s%S -> %S;\n" edges sep k1 k2, "")
+ (Printf.sprintf "%s%s %S -> %S;\n" edges sep k1 k2, "")
)
in
"digraph G {" ^ edges ^ "}"