]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/hbugs/tutors/Makefile
MQueryInterpreter: interface updated
[helm.git] / helm / hbugs / tutors / Makefile
index 6a3f718d59a7aed1d75387112a113dc1c7b69d9d..fe6331ee4dfb8585581e7dedb629eb4829667820 100644 (file)
@@ -16,9 +16,12 @@ BUILD_TUTORS = ./build_tutors.ml
 CTL = ./sabba.sh
 TUTORS_OPT = $(patsubst %,%.opt,$(TUTORS))
 GENERATED_TUTORS_SRC = $(patsubst %,%.ml,$(GENERATED_TUTORS))
-COMMON = hbugs_tutors_common.cmo
+COMMON = hbugs_deity.cmo hbugs_tutors_common.cmo
 COMMON_OPT = $(patsubst %.cmo,%.cmx,$(COMMON))
 
+DEPS = $(shell $(OCAMLFIND) query -recursive -predicates byte -format "%d/%a" $(REQUIRES))
+DEPSOPT = $(shell $(OCAMLFIND) query -recursive -predicates native -format "%d/%a" $(REQUIRES))
+
 all: byte
 world: byte opt
 byte: $(TUTORS)
@@ -30,16 +33,16 @@ stop:
 
 $(GENERATED_TUTORS_SRC): $(TUTORS_TEMPLATE) $(TUTORS_INDEX)
        $(BUILD_TUTORS)
-%_tutor: $(COMMON) %_tutor.ml
-       $(OCAMLC) $(LINK_OPTIONS) -o $@ $^
-%_tutor.opt: $(COMMON_OPT) %_tutor.ml
-       $(OCAMLOPT) $(LINK_OPTIONS) -o $@ $^
+%_tutor: $(DEPS) $(COMMON) %_tutor.ml
+       $(OCAMLC) $(LINK_OPTIONS) -o $@ $(COMMON) $*_tutor.ml
+%_tutor.opt: $(DEPSOPT) $(COMMON_OPT) %_tutor.ml
+       $(OCAMLOPT) $(LINK_OPTIONS) -o $@ $(COMMON_OPT) $*_tutor.ml
 
-hbugs_tutors_common.cmi: hbugs_tutors_common.mli
+%.cmi: %.mli
        $(OCAMLC) -c $<
-$(COMMON): hbugs_tutors_common.ml hbugs_tutors_common.cmi
+%.cmo: %.ml %.cmi
        $(OCAMLC) -c $<
-$(COMMON_OPT): hbugs_tutors_common.ml
+%.cmx: %.ml %.cmi
        $(OCAMLOPT) -c $<
 
 clean: