1 BIN_DIR = /usr/local/bin
3 helm-mathql_interpreter \
4 helm-mathql_generator \
6 helm-cic_transformations \
7 helm-cic_textual_parser2 \
8 helm-cic_textual_parser \
9 helm-tex_cic_textual_parser \
18 PREDICATES = "gnome,init,glade"
19 OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -pp camlp4o
21 OCAMLDEBUGOPTIONS = -g
22 OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) $(OCAMLOPTIONS)
23 OCAMLOPT = $(OCAMLFIND) opt $(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
41 proofEngine.mli logicalOperations.mli oldDisambiguate.mli \
42 disambiguatingParser.mli termEditor.mli texTermEditor.mli xmlDiff.mli \
43 chosenTransformer.mli termViewer.mli invokeTactics.mli hbugs.mli \
47 $(INTERFACE_FILES) $(INTERFACE_FILES:%.mli=%.ml) \
48 gTopLevel.ml regtest.ml testlibrary.ml batchParser.ml batchParser.mli
50 TOPLEVELOBJS = $(INTERFACE_FILES:%.mli=%.cmo) gTopLevel.cmo
53 disambiguatingParser.cmo \
56 TESTLIBOBJS = testlibrary.cmo
58 $(INTERFACE_FILES:%.mli=%.cmo): $(LIBRARIES)
59 $(INTERFACE_FILES:%.mli=%.cmx): $(LIBRARIES_OPT)
62 @echo "***********************************************************************"
63 @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
64 @echo "***********************************************************************"
66 (cd styles && for i in ../stylesheets/*.xsl ; do ln -s $$i; done)
67 (cd styles && for i in ../stylesheets/generated/*.xsl ; do ln -s $$i; done)
68 (cd styles && rm rootcontent.xsl && ln -s ../rootcontent.xsl)
71 $(OCAMLDEP) $(DEPOBJS) > .depend
73 gTopLevel: $(TOPLEVELOBJS) $(LIBRARIES)
74 $(OCAMLC) -thread -linkpkg -o $@ $(TOPLEVELOBJS)
75 gTopLevel.opt: $(TOPLEVELOBJS:.cmo=.cmx) $(LIBRARIES_OPT)
76 $(OCAMLOPT) -thread -linkpkg -o $@ $(TOPLEVELOBJS:.cmo=.cmx)
78 testlibrary: $(TESTLIBOBJS) $(TEST_LIBRARIES)
79 $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) -linkpkg \
80 -package "$(TEST_REQUIRES)" -o $@ $(TESTLIBOBJS)
81 testlibrary.opt: $(TESTLIBOBJS:.cmo=.cmx) $(TEST_LIBRARIES_OPT)
82 $(OCAMLFIND) opt -linkpkg -package "$(TEST_REQUIRES)" -o $@ \
83 $(TESTLIBOBJS:.cmo=.cmx)
85 regtest: $(REGTESTOBJS) $(TEST_LIBRARIES)
86 $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) -linkpkg \
87 -package "$(TEST_REQUIRES)" -o $@ $(REGTESTOBJS)
88 regtest.opt: $(REGTESTOBJS:.cmo=.cmx) $(TEST_LIBRARIES_OPT)
89 $(OCAMLOPT) opt -linkpkg -package "$(TEST_REQUIRES)" -o $@ \
90 $(REGTESTOBJS:.cmo=.cmx)
92 .SUFFIXES: .ml .mli .cmo .cmi .cmx
100 $(TOPLEVELOBJS): $(LIBRARIES)
101 $(TOPLEVELOBJS:.cmo=.cmx)): $(LIBRARIES_OPT)
104 rm -f *.cm[iox] *.o gTopLevel{,.opt} regtest{,.opt} testlibrary{,.opt}
106 cp gTopLevel gTopLevel.opt $(BIN_DIR)
108 rm -f $(BIN_DIR)/gTopLevel $(BIN_DIR)/gTopLevel.opt
110 .PHONY: install uninstall clean test
112 INTESTS := $(wildcard tests/*.cic)
113 OUTTESTS := $(patsubst %, %.test, $(INTESTS))
117 tests/%.cic.test: tests/%.cic regtest
118 time ./regtest -gen $<
120 ./regtest $(INTESTS) 2> /dev/null
122 ./regtest -dump $(INTESTS) 2> /dev/null
123 librarytest: testlibrary.opt
124 ./testlibrary.opt - <index.txt 2>/dev/null >LOG &
129 $(OCAMLFIND) query -recursive -predicates byte -a-format \
130 helm-cic_unification | \
131 sed 's/\(.*\)/load_printer "\1"/' \
133 echo "install_printer CicMetaSubst.fppsubst" >> .debug_script
134 echo "install_printer CicMetaSubst.fppterm" >> .debug_script
135 echo "install_printer CicMetaSubst.fppmetasenv" >> .debug_script
137 -source .debug_script \
138 $(shell $(OCAMLFIND) query -recursive -i-format $(REQUIRES)) \
141 ifneq ($(MAKECMDGOALS), depend)