]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/paramodulation/Makefile
incomplete proof completed
[helm.git] / helm / ocaml / paramodulation / Makefile
1 BIN_DIR = /usr/local/bin
2
3 TEST_REQUIRES = \
4         helm-registry \
5         helm-tactics \
6         helm-cic_transformations \
7         helm-cic_textual_parser2 \
8 #       helm-mathql_interpreter \
9 #       helm-mathql_generator \
10 #       helm-xmldiff 
11 #       lablgtk2 \
12 #       mathml-editor \
13 #       lablgtkmathview \
14 #       mysql
15
16 REQUIRES = $(TEST_REQUIRES) #gdome2-xslt helm-hbugs lablgtk2.init lablgtk2.glade
17
18 OCAMLOPTIONS = \
19         -package "$(REQUIRES)" -predicates "$(PREDICATES)" #-pp camlp4o -thread
20 OCAMLFIND = ocamlfind
21 OCAMLDEBUGOPTIONS = -g
22 OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) $(OCAMLOPTIONS)
23 OCAMLOPT = $(OCAMLFIND) ocamlopt $(OCAMLOPTIONS)
24 OCAMLDEP = $(OCAMLFIND) ocamldep #-pp camlp4o
25 OCAMLDEBUG = wowcamldebug
26
27 LIBRARIES = $(shell $(OCAMLFIND) query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES))
28 LIBRARIES_OPT = $(shell $(OCAMLFIND) query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES))
29 TEST_LIBRARIES = $(shell $(OCAMLFIND) query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(TEST_REQUIRES))
30 TEST_LIBRARIES_OPT = $(shell $(OCAMLFIND) query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(TEST_REQUIRES))
31
32 all: saturation
33 opt: saturation.opt
34
35 start:
36         $(MAKE) -C ../hbugs/ start
37 stop:
38         $(MAKE) -C ../hbugs/ stop
39
40 INTERFACE_FILES = \
41         utils.mli \
42         inference.mli
43
44 DEPOBJS = \
45         $(INTERFACE_FILES) $(INTERFACE_FILES:%.mli=%.ml) \
46         indexing.ml \
47         saturation.ml
48
49 TOPLEVELOBJS = $(INTERFACE_FILES:%.mli=%.cmo) \
50         indexing.cmo \
51         saturation.cmo
52 # TESTOBJS = \
53 #       disambiguatingParser.cmo \
54 #       batchParser.cmo
55 # REGTESTOBJS = $(TESTOBJS) regtest.cmo
56 # TESTLIBOBJS = $(TESTOBJS) testlibrary.cmo
57
58 $(INTERFACE_FILES:%.mli=%.cmo): $(LIBRARIES)
59 $(INTERFACE_FILES:%.mli=%.cmx): $(LIBRARIES_OPT)
60
61 depend:
62         $(OCAMLDEP) $(DEPOBJS) > .depend
63
64 saturation: $(TOPLEVELOBJS) $(LIBRARIES)
65         $(OCAMLC) -thread -linkpkg -o $@ $(TOPLEVELOBJS)
66 saturation.opt: $(TOPLEVELOBJS:.cmo=.cmx) $(LIBRARIES_OPT)
67         $(OCAMLOPT) -thread -linkpkg -o $@ $(TOPLEVELOBJS:.cmo=.cmx)
68
69 .SUFFIXES: .ml .mli .cmo .cmi .cmx
70 .ml.cmo:
71         $(OCAMLC) -c $<
72 .mli.cmi:
73         $(OCAMLC) -c $<
74 .ml.cmx:
75         $(OCAMLOPT) -c $<
76
77 $(TOPLEVELOBJS): $(LIBRARIES)
78 $(TOPLEVELOBJS:.cmo=.cmx)): $(LIBRARIES_OPT)
79
80 clean:
81         rm -f *.cm[iox] *.o saturation{,.opt} regtest{,.opt} testlibrary{,.opt}
82 install:
83         cp gTopLevel gTopLevel.opt $(BIN_DIR)
84 uninstall:
85         rm -f $(BIN_DIR)/gTopLevel $(BIN_DIR)/gTopLevel.opt
86
87 .PHONY: install uninstall clean test
88
89 INTESTS := $(wildcard tests/*.cic)
90 OUTTESTS := $(patsubst %, %.test, $(INTESTS))
91 gentest: $(OUTTESTS)
92 cleantest:
93         rm -f $(OUTTESTS)
94 tests/%.cic.test: tests/%.cic regtest
95         time ./regtest -gen $<
96 test: regtest
97         ./regtest $(INTESTS) 2> /dev/null
98 test.opt: regtest.opt
99         ./regtest.opt $(INTESTS) 2> /dev/null
100 envtest: regtest
101         ./regtest -dump $(INTESTS) 2> /dev/null
102 envtest.opt: regtest.opt
103         ./regtest.opt -dump $(INTESTS) 2> /dev/null
104 librarytest: testlibrary
105         ./testlibrary -vars -varsprefix cic:/Coq index.txt 2>/dev/null >LOG
106 librarytest.opt: testlibrary.opt
107         ./testlibrary.opt -vars -varsprefix cic:/Coq index.txt 2>/dev/null >LOG
108 typecheck_uri: typecheck_uri.ml
109         $(OCAMLFIND) ocamlc -thread -package helm-cic_proof_checking -linkpkg -o $@ $<
110 typecheck_uri.opt: typecheck_uri.ml
111         $(OCAMLFIND) opt -thread -package helm-cic_proof_checking -linkpkg -o $@ $<
112
113 MAIN = ./gTopLevel
114 ARGS =
115 debug:
116         echo "load_printer \"threads.cma\"" > .debug_script
117         $(OCAMLFIND) query -recursive -predicates "mt,byte" -a-format \
118                 helm-cic_unification | \
119                 sed 's/\(.*\)/load_printer "\1"/' \
120                 >> .debug_script
121         echo "install_printer CicMetaSubst.fppsubst" >> .debug_script
122         echo "install_printer CicMetaSubst.fppterm" >> .debug_script
123         echo "install_printer CicMetaSubst.fppmetasenv" >> .debug_script
124         ledit $(OCAMLDEBUG) \
125                 -source .debug_script \
126     -I +threads \
127                 $(shell $(OCAMLFIND) query -recursive -i-format $(REQUIRES)) \
128                 $(MAIN) $(ARGS)
129
130 ifneq ($(MAKECMDGOALS), depend)
131    include .depend   
132 endif
133