]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/Makefile.common.in
Makefile.common.in and .depend backtracked to my last commit (before the
[helm.git] / helm / ocaml / Makefile.common.in
index 62df6201cad1f59b4f7094308fbef661da0c2c5b..42015d622c7869c5eb815da053fcef4f3038af49 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
 
@@ -41,11 +41,11 @@ depend: $(DEPEND_FILES)
        $(OCAMLDEP) $(INTERFACE_FILES) $(IMPLEMENTATION_FILES) > .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 +54,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 +70,6 @@ uninstall:
 
 .PHONY: all opt depend install uninstall clean
 
-include .depend
+ifneq ($(MAKECMDGOALS), depend)
+   include .depend   
+endif