]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/binaries/transcript/Makefile
hSqlite3.ml used create_fun_2 to define REGEXP.
[helm.git] / helm / software / components / binaries / transcript / Makefile
index 1252d345fbb343659f6d37cb53a8280aa055e102..7d6cd364ff4cc98628cf5379abd117f008fdafb4 100644 (file)
@@ -1,3 +1,5 @@
+include ../../../Makefile.defs
+
 H=@
 
 REQUIRES = unix str helm-grafite_parser
@@ -8,6 +10,9 @@ CLEAN = v8Parser.ml v8Parser.mli v8Lexer.ml
 
 PACKAGES = CoRN
 
+LIBRARIES = $(shell $(OCAMLFIND) query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES))
+LIBRARIES_OPT = $(shell $(OCAMLFIND) query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES))
+
 CMOS = $(MLS:%.ml=%.cmo)
 CMXS = $(MLS:%.ml=%.cmx)
 CMIS = $(MLIS:%.mli=%.cmi)
@@ -23,13 +28,13 @@ all: transcript .depend
        @echo -n
 
 opt: transcript.opt $(EXTRAS) .depend.opt
-       #echo -n
+       @echo -n
 
 transcript: $(CMIS) $(CMOS) $(EXTRAS) 
        @echo "  OCAMLC $(CMOS)"
        $(H)$(OCAMLC) -o $@ $(CMOS)
 
-transcript.opt: $(CMIS) $(CMXS) $(EXTRAS) 
+transcript.opt: $(CMIS) $(CMXS) $(EXTRAS)
        @echo "  OCAMLOPT $(CMXS)"
        $(H)$(OCAMLOPT) -o $@ $(CMXS)
 
@@ -62,13 +67,13 @@ depend: .depend
 
 depend.opt: .depend.opt 
 
-%.cmi: %.mli $(EXTRAS) 
+%.cmi: %.mli $(EXTRAS)
        @echo "  OCAMLC $<"
        $(H)$(OCAMLC) -c $<
-%.cmo %.cmi: %.ml $(EXTRAS) 
+%.cmo %.cmi: %.ml $(EXTRAS) $(LIBRARIES)
        @echo "  OCAMLC $<"
        $(H)$(OCAMLC) -c $<
-%.cmx: %.ml $(EXTRAS) 
+%.cmx: %.ml $(EXTRAS) $(LIBRARIES_OPT)
        @echo "  OCAMLOPT $<"
        $(H)$(OCAMLOPT) -c $<
 %.ml %.mli: %.mly $(EXTRAS) 
@@ -80,14 +85,22 @@ depend.opt: .depend.opt
 
 include ../../../Makefile.defs
 
-ifeq ($(MAKECMDGOALS), opt)
-  include .depend.opt   
+ifeq ($(MAKECMDGOALS),)
+  include .depend   
 endif
 
 ifeq ($(MAKECMDGOALS), all)
   include .depend   
 endif
 
-ifeq ($(MAKECMDGOALS),)
+ifeq ($(MAKECMDGOALS), opt)
+  include .depend.opt   
+endif
+
+ifeq ($(MAKECMDGOALS), test)
   include .depend   
 endif
+
+ifeq ($(MAKECMDGOALS), test.opt)
+  include .depend.opt   
+endif