]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/Makefile.common.in
ported to latest lablgtk2 snapshot
[helm.git] / helm / ocaml / Makefile.common.in
index e71b71942d19875be0967ec515525fa0fa32edaa..15d0fdab1a782c57696e930841a14c907a9abf76 100644 (file)
@@ -13,8 +13,8 @@ OCAMLFIND_DEST_DIR = @OCAMLFIND_DEST_DIR@
 PREPROCOPTIONS = -pp camlp4o
 PREREQ =
 OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)"
-OCAMLC = ocamlfind ocamlc $(OCAMLOPTIONS) $(PREPROCOPTIONS)
-OCAMLOPT = ocamlfind ocamlopt $(OCAMLOPTIONS) $(PREPROCOPTIONS)
+OCAMLC = ocamlfind ocamlc -thread $(OCAMLOPTIONS) $(PREPROCOPTIONS)
+OCAMLOPT = ocamlfind ocamlopt -thread $(OCAMLOPTIONS) $(PREPROCOPTIONS)
 OCAMLDEP = ocamlfind ocamldep $(PREPROCOPTIONS)
 OCAMLLEX = ocamllex
 OCAMLYACC = ocamlyacc
@@ -39,6 +39,7 @@ $(ARCHIVE_OPT): $(IMPLEMENTATION_FILES:%.ml=%.cmx) $(LIBRARIES_OPT)
 prereq: $(PREREQ)
 all: prereq $(IMPLEMENTATION_FILES:%.ml=%.cmo) $(ARCHIVE)
 opt: prereq $(IMPLEMENTATION_FILES:%.ml=%.cmx) $(ARCHIVE_OPT)
+world: all opt
 
 depend: $(DEPEND_FILES)
        $(OCAMLDEP) $(INTERFACE_FILES) $(IMPLEMENTATION_FILES) > .depend
@@ -49,18 +50,15 @@ $(PACKAGE).ps: .dep.dot
 .dep.dot: .depend
        ocamldot < .depend > $@
 
-.SUFFIXES: .ml .mli .cmo .cmi .cmx .mll .mly
-.ml.cmo:
+%.cmi: %.mli
        $(OCAMLC) -c $<
-.mli.cmi:
+%.cmo %.cmi: %.ml
        $(OCAMLC) -c $<
-.ml.cmx:
+%.cmx: %.ml
        $(OCAMLOPT) -c $<
-.mly.ml:
+%.ml %.mli: %.mly
        $(OCAMLYACC) $<
-.mly.mli:
-       $(OCAMLYACC) $<
-.mll.ml:
+%.ml: %.mll
        $(OCAMLLEX) $<
 
 $(IMPLEMENTATION_FILES:%.ml=%.cmo): $(LIBRARIES)
@@ -77,7 +75,10 @@ uninstall:
        cd $(OCAMLFIND_DEST_DIR)/$(PACKAGE) && rm -f $(OBJECTS_TO_INSTALL)
        rmdir $(OCAMLFIND_DEST_DIR)/$(PACKAGE)
 
-.PHONY: all opt depend install uninstall clean
+backup:
+       cd ..; tar cvzf $(PACKAGE)_$(shell date +%s).tar.gz $(PACKAGE)
+
+.PHONY: all opt world backup depend install uninstall clean
 
 ifneq ($(MAKECMDGOALS), depend)
    include .depend