]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/Makefile.common.in
- the mathql interpreter is not helm-dependent any more
[helm.git] / helm / ocaml / Makefile.common.in
index 62df6201cad1f59b4f7094308fbef661da0c2c5b..47d02bb42867c70452ca921eb451bf96ff4d26f6 100644 (file)
@@ -13,7 +13,7 @@ OCAMLFIND_DEST_DIR = @OCAMLFIND_DEST_DIR@
 OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -pp camlp4o
 OCAMLC = ocamlfind ocamlc $(OCAMLOPTIONS)
 OCAMLOPT = ocamlfind ocamlopt $(OCAMLOPTIONS)
-OCAMLDEP = ocamldep
+OCAMLDEP = ocamldep -pp camlp4o
 OCAMLLEX = ocamllex
 OCAMLYACC = ocamlyacc
 
@@ -40,12 +40,18 @@ opt: $(IMPLEMENTATION_FILES:%.ml=%.cmx) $(ARCHIVE_OPT)
 depend: $(DEPEND_FILES)
        $(OCAMLDEP) $(INTERFACE_FILES) $(IMPLEMENTATION_FILES) > .depend
 
+$(PACKAGE).ps: .dep.dot
+       dot -Tps -o $@ $<
+
+.dep.dot: .depend
+       ocamldot < .depend > $@
+
 .SUFFIXES: .ml .mli .cmo .cmi .cmx .mll .mly
-.ml.cmo: $(LIBRARIES)
+.ml.cmo:
        $(OCAMLC) -c $<
-.mli.cmi: $(LIBRARIES)
+.mli.cmi:
        $(OCAMLC) -c $<
-.ml.cmx: $(LIBRARIES_OPT)
+.ml.cmx:
        $(OCAMLOPT) -c $<
 .mly.ml:
        $(OCAMLYACC) $<
@@ -54,6 +60,9 @@ depend: $(DEPEND_FILES)
 .mll.ml:
        $(OCAMLLEX) $<
 
+$(IMPLEMENTATION_FILES:%.ml=%.cmo): $(LIBRARIES)
+$(IMPLEMENTATION_FILES:%.ml=%.cmx): $(LIBRARIES_OPT)
+
 clean:
        rm -f *.cm[ioax] *.cmxa *.o *.a $(EXTRA_OBJECTS_TO_CLEAN)
 
@@ -67,4 +76,6 @@ uninstall:
 
 .PHONY: all opt depend install uninstall clean
 
-include .depend
+ifneq ($(MAKECMDGOALS), depend)
+   include .depend   
+endif