]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/gTopLevel/topLevel/Makefile
packege dependences calculation patched
[helm.git] / helm / gTopLevel / topLevel / Makefile
index 1245ae089062c60e7ec13eff3fc3e4aeb45ca652..a78019a811b8982a494c87a041fef2ea93db3686 100644 (file)
@@ -2,6 +2,7 @@ BIN_DIR = /usr/local/bin
 REQUIRES = helm-urimanager helm-cic_textual_parser helm-cic_proof_checking helm-mathql helm-mathql_interpreter
 PREDICATES =
 OCAMLOPTIONS = -I .. -package "$(REQUIRES)" -predicates "$(PREDICATES)"
+OCAMLDEPOPTIONS = $(shell ocamlfind query -recursive -predicates "$(PREDICATES)" -i-format $(REQUIRES))
 OCAMLC = ocamlfind ocamlc $(OCAMLOPTIONS)
 OCAMLOPT = ocamlfind ocamlopt $(OCAMLOPTIONS)
 OCAMLDEP = ocamldep -I .. -I ../../ocaml/mathql_interpreter -I ../../ocaml/mathql
@@ -17,7 +18,7 @@ DEPOBJS = topLevel.ml
 TOPLEVELOBJS = ../mQueryLevels.cmo ../mQueryGenerator.cmo topLevel.cmo
 
 depend:
-       $(OCAMLDEP) $(DEPOBJS) > .depend
+       $(OCAMLDEP) $(OCAMLDEPOPTIONS) $(DEPOBJS) > .depend
 
 topLevel: $(TOPLEVELOBJS) $(LIBRARIES)
        $(OCAMLC)  -linkpkg -o topLevel $(TOPLEVELOBJS)
@@ -44,4 +45,6 @@ uninstall:
 
 .PHONY: install uninstall clean
 
-include .depend
+ifneq ($(MAKECMDGOALS), depend)
+   include .depend   
+endif