summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2009-01-12 02:56:37 +0100
committerGuillaume Seguin <guillaume@segu.in>2009-01-12 02:56:37 +0100
commit68dd15729869c1accb5bca3214fbfe8cca3b49ba (patch)
tree64c4f972105edf026a3c82ff7d2c689c5adb801e
parent3a9435618cbb39e01fbea0d48769c8978e1e4224 (diff)
downloadpetitcaml-68dd15729869c1accb5bca3214fbfe8cca3b49ba.tar.gz
petitcaml-68dd15729869c1accb5bca3214fbfe8cca3b49ba.tar.bz2
[petitcaml] Update Makefile, use --infer for menhir and fix consequences
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 5bc105c..593b289 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,15 @@
CMO=typing.cmo utils.cmo lexer.cmo parser.cmo \
- mips.cmo closure.cmo compile.cmo main.cmo
+ primitives.cmo mips.cmo closure.cmo optimize.cmo compile.cmo \
+ main.cmo
+CMI=ast.cmi
+CMO_DEP=typing.cmo utils.cmo
GENERATED = lexer.ml parser.ml parser.mli
BIN=petit-caml
FLAGS=
all: $(BIN)
-$(BIN):$(CMO)
+$(BIN):$(CMI) $(CMO)
ocamlc $(FLAGS) -o $(BIN) $(CMO)
.SUFFIXES: .mli .ml .cmi .cmo .mll .mly
@@ -21,7 +24,7 @@ $(BIN):$(CMO)
ocamllex $<
.mly.ml:
- menhir -v $<
+ menhir --infer -v $<
.mly.mli:
ocamlyacc -v $<
@@ -29,7 +32,7 @@ $(BIN):$(CMO)
clean:
rm -f *.cm[io] *.o *~ $(BIN) $(GENERATED) parser.output
-.depend depend:$(GENERATED)
+.depend depend:$(CMO_DEP) $(CMI) $(GENERATED)
rm -f .depend
ocamldep *.ml *.mli > .depend