1 BIN_DIR = /usr/local/bin
4 helm-mathql_interpreter \
5 helm-mathql_generator \
7 helm-cic_transformations \
8 helm-cic_textual_parser2 \
9 helm-cic_textual_parser \
10 helm-tex_cic_textual_parser \
17 PREDICATES = "gnome,init,glade"
19 -package "$(REQUIRES)" -predicates "$(PREDICATES)" -pp camlp4o -thread
21 OCAMLDEBUGOPTIONS = -g
22 OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) $(OCAMLOPTIONS)
23 OCAMLOPT = $(OCAMLFIND) ocamlopt $(OCAMLOPTIONS)
24 OCAMLDEP = $(OCAMLFIND) ocamldep -pp camlp4o
25 OCAMLDEBUG = wowcamldebug
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))
33 opt: styles gTopLevel.opt
36 $(MAKE) -C ../hbugs/ start
38 $(MAKE) -C ../hbugs/ stop
42 logicalOperations.mli \
44 disambiguatingParser.mli \
48 chosenTransformer.mli \
52 chosenTermEditor.mli \
56 $(INTERFACE_FILES) $(INTERFACE_FILES:%.mli=%.ml) \
57 gTopLevel.ml regtest.ml testlibrary.ml batchParser.ml batchParser.mli
59 TOPLEVELOBJS = $(INTERFACE_FILES:%.mli=%.cmo) gTopLevel.cmo
62 disambiguatingParser.cmo \
64 REGTESTOBJS = $(TESTOBJS) regtest.cmo
65 TESTLIBOBJS = $(TESTOBJS) testlibrary.cmo
67 $(INTERFACE_FILES:%.mli=%.cmo): $(LIBRARIES)
68 $(INTERFACE_FILES:%.mli=%.cmx): $(LIBRARIES_OPT)
71 @echo "***********************************************************************"
72 @if [ -d stylesheets -a -d meta_stylesheets ] ; then echo -e "* stylesheets and metastylesheets found: *\\n* I will create the request hyperlinks in styles *" ; else echo -e "* stylesheets or meta_stylesheets not found: *\\n* you should check-out the two directories from the MoWGLI repository *" ; exit -1 ; fi
73 @echo "***********************************************************************"
75 (cd styles && for i in ../stylesheets/*.xsl ; do ln -s $$i; done)
76 (cd styles && for i in ../stylesheets/generated/*.xsl ; do ln -s $$i; done)
77 (cd styles && rm rootcontent.xsl && ln -s ../rootcontent.xsl)
80 $(OCAMLDEP) $(DEPOBJS) > .depend
82 gTopLevel: $(TOPLEVELOBJS) $(LIBRARIES)
83 $(OCAMLC) -thread -linkpkg -o $@ $(TOPLEVELOBJS)
84 gTopLevel.opt: $(TOPLEVELOBJS:.cmo=.cmx) $(LIBRARIES_OPT)
85 $(OCAMLOPT) -thread -linkpkg -o $@ $(TOPLEVELOBJS:.cmo=.cmx)
87 testlibrary: $(TESTLIBOBJS) $(TEST_LIBRARIES)
88 $(OCAMLFIND) ocamlc -thread $(OCAMLDEBUGOPTIONS) -linkpkg \
89 -package "$(TEST_REQUIRES)" -o $@ $(TESTLIBOBJS)
90 testlibrary.opt: $(TESTLIBOBJS:.cmo=.cmx) $(TEST_LIBRARIES_OPT)
91 $(OCAMLFIND) ocamlopt -thread -linkpkg -package "$(TEST_REQUIRES)" -o $@ \
92 $(TESTLIBOBJS:.cmo=.cmx)
94 regtest: $(REGTESTOBJS) $(TEST_LIBRARIES)
95 $(OCAMLFIND) ocamlc -thread $(OCAMLDEBUGOPTIONS) -linkpkg \
96 -package "$(TEST_REQUIRES)" -o $@ $(REGTESTOBJS)
97 regtest.opt: $(REGTESTOBJS:.cmo=.cmx) $(TEST_LIBRARIES_OPT)
98 $(OCAMLFIND) ocamlopt -thread -linkpkg -package "$(TEST_REQUIRES)" -o $@ \
99 $(REGTESTOBJS:.cmo=.cmx)
101 .SUFFIXES: .ml .mli .cmo .cmi .cmx
109 $(TOPLEVELOBJS): $(LIBRARIES)
110 $(TOPLEVELOBJS:.cmo=.cmx)): $(LIBRARIES_OPT)
113 rm -f *.cm[iox] *.o gTopLevel{,.opt} regtest{,.opt} testlibrary{,.opt}
115 cp gTopLevel gTopLevel.opt $(BIN_DIR)
117 rm -f $(BIN_DIR)/gTopLevel $(BIN_DIR)/gTopLevel.opt
119 .PHONY: install uninstall clean test
121 INTESTS := $(wildcard tests/*.cic)
122 OUTTESTS := $(patsubst %, %.test, $(INTESTS))
126 tests/%.cic.test: tests/%.cic regtest
127 time ./regtest -gen $<
129 ./regtest $(INTESTS) 2> /dev/null
130 test.opt: regtest.opt
131 ./regtest.opt $(INTESTS) 2> /dev/null
133 ./regtest -dump $(INTESTS) 2> /dev/null
134 envtest.opt: regtest.opt
135 ./regtest.opt -dump $(INTESTS) 2> /dev/null
136 librarytest: testlibrary
137 ./testlibrary -vars -varsprefix cic:/Coq index.txt 2>/dev/null >LOG &
138 librarytest.opt: testlibrary.opt
139 ./testlibrary.opt -vars -varsprefix cic:/Coq index.txt 2>/dev/null >LOG &
144 $(OCAMLFIND) query -recursive -predicates byte -a-format \
145 helm-cic_unification | \
146 sed 's/\(.*\)/load_printer "\1"/' \
148 echo "install_printer CicMetaSubst.fppsubst" >> .debug_script
149 echo "install_printer CicMetaSubst.fppterm" >> .debug_script
150 echo "install_printer CicMetaSubst.fppmetasenv" >> .debug_script
151 ledit $(OCAMLDEBUG) \
152 -source .debug_script \
153 $(shell $(OCAMLFIND) query -recursive -i-format $(REQUIRES)) \
156 ifneq ($(MAKECMDGOALS), depend)