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
42 logicalOperations.mli \
44 disambiguatingParser.mli \
48 chosenTransformer.mli \
55 $(INTERFACE_FILES) $(INTERFACE_FILES:%.mli=%.ml) \
56 gTopLevel.ml regtest.ml testlibrary.ml batchParser.ml batchParser.mli
58 TOPLEVELOBJS = $(INTERFACE_FILES:%.mli=%.cmo) gTopLevel.cmo
61 disambiguatingParser.cmo \
63 REGTESTOBJS = $(TESTOBJS) regtest.cmo
64 TESTLIBOBJS = $(TESTOBJS) testlibrary.cmo
66 $(INTERFACE_FILES:%.mli=%.cmo): $(LIBRARIES)
67 $(INTERFACE_FILES:%.mli=%.cmx): $(LIBRARIES_OPT)
70 @echo "***********************************************************************"
71 @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
72 @echo "***********************************************************************"
74 (cd styles && for i in ../stylesheets/*.xsl ; do ln -s $$i; done)
75 (cd styles && for i in ../stylesheets/generated/*.xsl ; do ln -s $$i; done)
76 (cd styles && rm rootcontent.xsl && ln -s ../rootcontent.xsl)
79 $(OCAMLDEP) $(DEPOBJS) > .depend
81 gTopLevel: $(TOPLEVELOBJS) $(LIBRARIES)
82 $(OCAMLC) -thread -linkpkg -o $@ $(TOPLEVELOBJS)
83 gTopLevel.opt: $(TOPLEVELOBJS:.cmo=.cmx) $(LIBRARIES_OPT)
84 $(OCAMLOPT) -thread -linkpkg -o $@ $(TOPLEVELOBJS:.cmo=.cmx)
86 testlibrary: $(TESTLIBOBJS) $(TEST_LIBRARIES)
87 $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) -linkpkg \
88 -package "$(TEST_REQUIRES)" -o $@ $(TESTLIBOBJS)
89 testlibrary.opt: $(TESTLIBOBJS:.cmo=.cmx) $(TEST_LIBRARIES_OPT)
90 $(OCAMLFIND) opt -linkpkg -package "$(TEST_REQUIRES)" -o $@ \
91 $(TESTLIBOBJS:.cmo=.cmx)
93 regtest: $(REGTESTOBJS) $(TEST_LIBRARIES)
94 $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) -linkpkg \
95 -package "$(TEST_REQUIRES)" -o $@ $(REGTESTOBJS)
96 regtest.opt: $(REGTESTOBJS:.cmo=.cmx) $(TEST_LIBRARIES_OPT)
97 $(OCAMLOPT) opt -linkpkg -package "$(TEST_REQUIRES)" -o $@ \
98 $(REGTESTOBJS:.cmo=.cmx)
100 .SUFFIXES: .ml .mli .cmo .cmi .cmx
108 $(TOPLEVELOBJS): $(LIBRARIES)
109 $(TOPLEVELOBJS:.cmo=.cmx)): $(LIBRARIES_OPT)
112 rm -f *.cm[iox] *.o gTopLevel{,.opt} regtest{,.opt} testlibrary{,.opt}
114 cp gTopLevel gTopLevel.opt $(BIN_DIR)
116 rm -f $(BIN_DIR)/gTopLevel $(BIN_DIR)/gTopLevel.opt
118 .PHONY: install uninstall clean test
120 INTESTS := $(wildcard tests/*.cic)
121 OUTTESTS := $(patsubst %, %.test, $(INTESTS))
125 tests/%.cic.test: tests/%.cic regtest
126 time ./regtest -gen $<
128 ./regtest $(INTESTS) 2> /dev/null
130 ./regtest -dump $(INTESTS) 2> /dev/null
131 librarytest: testlibrary.opt
132 ./testlibrary.opt index.txt 2>/dev/null >LOG &
137 $(OCAMLFIND) query -recursive -predicates byte -a-format \
138 helm-cic_unification | \
139 sed 's/\(.*\)/load_printer "\1"/' \
141 echo "install_printer CicMetaSubst.fppsubst" >> .debug_script
142 echo "install_printer CicMetaSubst.fppterm" >> .debug_script
143 echo "install_printer CicMetaSubst.fppmetasenv" >> .debug_script
144 ledit $(OCAMLDEBUG) \
145 -source .debug_script \
146 $(shell $(OCAMLFIND) query -recursive -i-format $(REQUIRES)) \
149 ifneq ($(MAKECMDGOALS), depend)