Fix missing cleanup of "tree" executable
authorSiraaj Khandkar <siraaj@khandkar.net>
Thu, 19 Apr 2018 15:44:03 +0000 (11:44 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Thu, 19 Apr 2018 15:44:03 +0000 (11:44 -0400)
exercises/ch01/Makefile

index 3c986c0..d376e05 100644 (file)
@@ -3,12 +3,14 @@ MAKEFLAGS := --no-builtin-rules
 OCAMLC_OPTIONS := -w A -warn-error A
 OCAMLC_BYTE    := ocamlc.opt   $(OCAMLC_OPTIONS)
 
-.PHONY: build clean demo_unbalanced
-
-build : \
+EXECUTABLES := \
        straight_line_program_interpreter \
        tree
 
+.PHONY: build clean demo_unbalanced
+
+build : $(EXECUTABLES)
+
 %: %.ml %.cmo %.cmi
        $(OCAMLC_BYTE) -o $@ $*.cmo
 
@@ -19,7 +21,7 @@ build : \
        $(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
This page took 0.030858 seconds and 4 git commands to generate.