From: Stefano Zacchiroli Date: Fri, 6 Feb 2004 12:24:38 +0000 (+0000) Subject: - split regtest/testlibrary/gTopLevel objects so that the first two X-Git-Tag: V_0_2_3~21 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=d7d9d42a3d44ff82f797bd36c3a0ccc05f48483d;p=helm.git - split regtest/testlibrary/gTopLevel objects so that the first two aren't linked in thread mode - added debug target to debug with wowcamldebug executables - link with -g per default in bytecode mode --- diff --git a/helm/gTopLevel/Makefile b/helm/gTopLevel/Makefile index 7ea740bc6..3175bbea7 100644 --- a/helm/gTopLevel/Makefile +++ b/helm/gTopLevel/Makefile @@ -1,17 +1,33 @@ BIN_DIR = /usr/local/bin -REQUIRES = lablgtkmathview helm-cic_textual_parser helm-tex_cic_textual_parser \ - gdome2-xslt helm-mathql_interpreter helm-mathql_generator \ - helm-tactics hbugs-client mathml-editor helm-cic_transformations \ - helm-cic_textual_parser2 helm-cic_cache +TEST_REQUIRES = \ + helm-mathql_interpreter \ + helm-mathql_generator \ + helm-tactics \ + helm-cic_transformations \ + helm-cic_textual_parser2 \ + helm-cic_textual_parser \ + helm-tex_cic_textual_parser \ + mathml-editor \ + lablgtkmathview \ + helm-cic_cache +REQUIRES = \ + $(TEST_REQUIRES) \ + gdome2-xslt \ + hbugs-client \ + helm-cic_cache PREDICATES = "gnome,init,glade" OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -pp camlp4o OCAMLFIND = ocamlfind -OCAMLC = $(OCAMLFIND) ocamlc -thread $(OCAMLOPTIONS) -OCAMLOPT = $(OCAMLFIND) ocamlopt -thread $(OCAMLOPTIONS) -OCAMLDEP = ocamldep -pp camlp4o +OCAMLDEBUGOPTIONS = -g +OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) $(OCAMLOPTIONS) +OCAMLOPT = $(OCAMLFIND) opt $(OCAMLOPTIONS) +OCAMLDEP = $(OCAMLFIND) ocamldep -pp camlp4o +OCAMLDEBUG = wowcamldebug 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)) +TEST_LIBRARIES = $(shell $(OCAMLFIND) query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(TEST_REQUIRES)) +TEST_LIBRARIES_OPT = $(shell $(OCAMLFIND) query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(TEST_REQUIRES)) all: styles gTopLevel opt: styles gTopLevel.opt @@ -33,9 +49,11 @@ DEPOBJS = \ TOPLEVELOBJS = $(INTERFACE_FILES:%.mli=%.cmo) gTopLevel.cmo REGTESTOBJS = \ - $(INTERFACE_FILES:%.mli=%.cmo) batchParser.cmo regtest.cmo -TESTLIBOBJS = \ - $(INTERFACE_FILES:%.mli=%.cmo) testlibrary.cmo + oldDisambiguate.cmo \ + disambiguatingParser.cmo \ + batchParser.cmo \ + regtest.cmo +TESTLIBOBJS = testlibrary.cmo $(INTERFACE_FILES:%.mli=%.cmo): $(LIBRARIES) $(INTERFACE_FILES:%.mli=%.cmx): $(LIBRARIES_OPT) @@ -53,18 +71,23 @@ depend: $(OCAMLDEP) $(DEPOBJS) > .depend gTopLevel: $(TOPLEVELOBJS) $(LIBRARIES) - $(OCAMLC) -linkpkg -o $@ $(TOPLEVELOBJS) + $(OCAMLC) -thread -linkpkg -o $@ $(TOPLEVELOBJS) gTopLevel.opt: $(TOPLEVELOBJS:.cmo=.cmx) $(LIBRARIES_OPT) - $(OCAMLOPT) -linkpkg -o $@ $(TOPLEVELOBJS:.cmo=.cmx) - -testlibrary: $(TESTLIBOBJS) $(LIBRARIES) - $(OCAMLC) -linkpkg -o $@ $(TESTLIBOBJS) -testlibrary.opt: $(TESTLIBOBJS:.cmo=.cmx) $(LIBRARIES) - $(OCAMLOPT) -linkpkg -o $@ $(TESTLIBOBJS:.cmo=.cmx) -regtest: $(REGTESTOBJS) $(LIBRARIES) - $(OCAMLC) -linkpkg -o $@ $(REGTESTOBJS) -regtest.opt: $(REGTESTOBJS:.cmo=.cmx) $(LIBRARIES) - $(OCAMLOPT) -linkpkg -o $@ $(REGTESTOBJS:.cmo=.cmx) + $(OCAMLOPT) -thread -linkpkg -o $@ $(TOPLEVELOBJS:.cmo=.cmx) + +testlibrary: $(TESTLIBOBJS) $(TEST_LIBRARIES) + $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) -linkpkg \ + -package "$(TEST_REQUIRES)" -o $@ $(TESTLIBOBJS) +testlibrary.opt: $(TESTLIBOBJS:.cmo=.cmx) $(TEST_LIBRARIES_OPT) + $(OCAMLFIND) opt -linkpkg -package "$(TEST_REQUIRES)" -o $@ \ + $(TESTLIBOBJS:.cmo=.cmx) + +regtest: $(REGTESTOBJS) $(TEST_LIBRARIES) + $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) -linkpkg \ + -package "$(TEST_REQUIRES)" -o $@ $(REGTESTOBJS) +regtest.opt: $(REGTESTOBJS:.cmo=.cmx) $(TEST_LIBRARIES_OPT) + $(OCAMLOPT) opt -linkpkg -package "$(TEST_REQUIRES)" -o $@ \ + $(REGTESTOBJS:.cmo=.cmx) .SUFFIXES: .ml .mli .cmo .cmi .cmx .ml.cmo: @@ -78,7 +101,7 @@ $(TOPLEVELOBJS): $(LIBRARIES) $(TOPLEVELOBJS:.cmo=.cmx)): $(LIBRARIES_OPT) clean: - rm -f *.cm[iox] *.o gTopLevel{,.opt} regtest{,.opt} + rm -f *.cm[iox] *.o gTopLevel{,.opt} regtest{,.opt} testlibrary{,.opt} install: cp gTopLevel gTopLevel.opt $(BIN_DIR) uninstall: @@ -100,6 +123,22 @@ envtest: regtest librarytest: testlibrary.opt ./testlibrary.opt - /dev/null >LOG & +MAIN = ./gTopLevel +ARGS = +debug: + $(OCAMLFIND) query -recursive -predicates byte -a-format \ + helm-cic_unification | \ + sed 's/\(.*\)/load_printer "\1"/' \ + > .debug_script + echo "install_printer CicMetaSubst.fppsubst" >> .debug_script + echo "install_printer CicMetaSubst.fppterm" >> .debug_script + echo "install_printer CicMetaSubst.fppmetasenv" >> .debug_script + $(OCAMLDEBUG) \ + -source .debug_script \ + $(shell $(OCAMLFIND) query -recursive -i-format $(REQUIRES)) \ + $(MAIN) $(ARGS) + ifneq ($(MAKECMDGOALS), depend) include .depend endif +