X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql_test%2FMakefile;h=cd902ab3ea8856c758b92c811524917bec8832a5;hb=48b9bb5e9504aba97cff28a9d7e2797feb42972e;hp=f6f41aaa4fe5ce42f9f15e0eef46ef61ef92a7de;hpb=03dee221bd1f2c9a6e7f74d9abf88be14aac7763;p=helm.git diff --git a/helm/ocaml/mathql_test/Makefile b/helm/ocaml/mathql_test/Makefile index f6f41aaa4..cd902ab3e 100644 --- a/helm/ocaml/mathql_test/Makefile +++ b/helm/ocaml/mathql_test/Makefile @@ -1,23 +1,27 @@ BIN_DIR = /usr/local/bin -REQUIRES = unix helm-cic helm-cic_textual_parser helm-mathql helm-mathql_interpreter +REQUIRES = unix helm-cic helm-cic_textual_parser helm-mathql helm-mathql_interpreter helm-mquery_generator PREDICATES = OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" OCAMLC = ocamlfind ocamlc $(OCAMLOPTIONS) OCAMLOPT = ocamlfind ocamlopt $(OCAMLOPTIONS) OCAMLDEP = ocamldep +OCAMLYACC = ocamlyacc +OCAMLLEX = ocamllex 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)) MQTOP = mqtop.ml MQITOP = mqitop.ml +MQGTOP = mqgtop.ml -DEPOBJS = $(MQTOP) $(MQITOP) +DEPOBJS = $(MQTOP) $(MQITOP) $(MQGTOP) +AUXOBJS = mQGTopParser.ml mQGTopLexer.ml all: $(DEPOBJS:.ml=) opt: $(DEPOBJS:.ml=.opt) -depend: +depend: $(AUXOBJS) $(OCAMLDEP) $(DEPOBJS) > .depend mqtop: $(MQTOP:.ml=.cmo) $(LIBRARIES) @@ -32,19 +36,32 @@ mqitop: $(MQITOP:.ml=.cmo) $(LIBRARIES) mqitop.opt: $(MQITOP:.ml=.cmx) $(LIBRARIES_OPT) $(OCAMLOPT) -linkpkg -o mqitop.opt $(MQITOP:.ml=.cmx) -.SUFFIXES: .ml .mli .cmo .cmi .cmx +mqgtop: mQGTopParser.cmi $(AUXOBJS:.ml=.cmo) $(MQGTOP:.ml=.cmo) $(LIBRARIES) + $(OCAMLC) -linkpkg -o mqgtop $(AUXOBJS:.ml=.cmo) $(MQGTOP:.ml=.cmo) + +mqgtop.opt: $(AUXOBJS:.ml=.cmx) $(MQGTOP:.ml=.cmx) $(LIBRARIES_OPT) + $(OCAMLOPT) -linkpkg -o mqgtop.opt $(AUXOBJS:.ml=.cmx) $(MQGTOP:.ml=.cmx) + +.SUFFIXES: .ml .mli .cmo .cmi .cmx .mly .mll .ml.cmo: $(LIBRARIES) $(OCAMLC) -c $< .mli.cmi: $(LIBRARIES) $(OCAMLC) -c $< .ml.cmx: $(LIBRARIES_OPT) $(OCAMLOPT) -c $< +.mly.ml: + $(OCAMLYACC) $< +.mly.mli: + $(OCAMLYACC) $< +.mll.ml: + $(OCAMLLEX) $< $(DEPOBJS:%.ml=%.cmo): $(LIBRARIES) $(DEPOBJS:%.ml=%.cmx): $(LIBRARIES_OPT) clean: - rm -f *.cm[iox] *.o $(DEPOBJS:.ml=) $(DEPOBJS:.ml=.opt) + rm -f *.cm[iox] *.o $(DEPOBJS:.ml=) $(DEPOBJS:.ml=.opt) \ + mQGTopParser.ml mQGTopParser.mli mQGTopLexer.ml install: cp $(DEPOBJS:.ml=) $(DEPOBJS:.ml=.opt) $(BIN_DIR)