eval: Goals with no targets always need a rebuild.
[goals.git] / src / Makefile.in
index 15e8006..4d6640e 100644 (file)
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 OBJECTS = \
+       config.cmx \
+       utils.cmx \
+       cmdline.cmx \
        ast.cmx \
+       eval.cmx \
        parser.cmx \
        lexer.cmx \
        parse.cmx \
@@ -31,21 +35,24 @@ clean:
        rm -f parser.ml parser.mli lexer.ml parser.conflicts stamp-parser
        rm -f goals
 
-goals: $(OBJECTS)
-       @OCAMLFIND@ opt $^ -o $@
-
+OCAMLPACKAGES = -package str,unix
 OCAMLFLAGS = -g -safe-string -warn-error CDEFLMPSUVYZX+52-3
 
+goals: $(OBJECTS)
+       @OCAMLFIND@ opt $(OCAMLFLAGS) $(OCAMLPACKAGES) -linkpkg $^ -o $@
+
 %.cmi: %.mli
-       @OCAMLFIND@ c $(OCAMLFLAGS) -c $< -o $@
+       @OCAMLFIND@ c $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
 %.cmo: %.ml
-       @OCAMLFIND@ c $(OCAMLFLAGS) -c $< -o $@
+       @OCAMLFIND@ c $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
 %.cmx: %.ml
-       @OCAMLFIND@ opt $(OCAMLFLAGS) -c $< -o $@
+       @OCAMLFIND@ opt $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@
 
 parser.ml parser.mli: stamp-parser
 stamp-parser: parser.mly
        @MENHIR@ --explain $<
+# Hack required to get includes working.
+       echo 'val lexer_read : (Lexing.lexbuf -> token) option ref' >> parser.mli
        touch $@
 
 lexer.ml: lexer.mll lexer.cmi parser.ml
@@ -62,7 +69,10 @@ depend: .depend
 -include .depend
 
 Makefile: Makefile.in ../config.status
-       ../config.status Makefile
+       ../config.status $@
+
+config.ml: config.ml.in ../config.status
+       ../config.status $@
 
 .PHONY: all clean depend