PACKAGE = cic_textual_parser2 REQUIRES = \ ulex pxp helm-tactics helm-cic helm-logger helm-cic_unification \ camlp4.gramlib NOTATIONS = logic arit INTERFACE_FILES = \ cicTextualParser2Ast.mli \ cicTextualParser2Pp.mli \ macro.mli \ cicTextualLexer2.mli \ disambiguate.mli \ cicTextualParser2.mli \ disambiguateTypes.mli IMPLEMENTATION_FILES = \ disambiguateTypes.ml \ cicTextualParser2Pp.ml \ macro.ml \ cicTextualLexer2.ml \ cicTextualParser2.ml \ disambiguate.ml \ $(patsubst %,%_notation.ml,$(NOTATIONS)) \ ULEXDIR := $(shell ocamlfind query ulex) LEXER_P4_OPTS = -I $(ULEXDIR) pa_ulex.cma PARSER_P4_OPTS = pa_extend.cmo ./macro.cmo ./pa_unicode_macro.cmo PA_P4_OPTS = q_MLast.cmo pa_extend.cmo all: cicTextualLexer2.cmo: cicTextualLexer2.ml $(OCAMLC) -pp "camlp4o $(LEXER_P4_OPTS)" -c $< cicTextualParser2.cmo: cicTextualParser2.ml macro.cmo pa_unicode_macro.cmo $(OCAMLC) -pp "camlp4o $(PARSER_P4_OPTS)" -c $< %_notation.cmo: %_notation.ml cicTextualParser2.cmo $(OCAMLC) -pp "camlp4o $(PARSER_P4_OPTS)" -c $< pa_unicode_macro.cmo: pa_unicode_macro.ml macro.cmo $(OCAMLC) -pp "camlp4o $(PA_P4_OPTS)" -c $< LOCAL_LINKOPTS = -linkpkg $(PACKAGE).cma test: test_lexer test_parser test_lexer: test_lexer.ml $(PACKAGE).cma $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $< test_parser: test_parser.ml $(PACKAGE).cma $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $< make_table: make_table.ml $(OCAMLC) -linkpkg -o $@ $< .PHONY: macro_table.dump macro_table.dump: make_table ./make_table $@ clean: extra_clean distclean: extra_clean rm -f macro_table.dump extra_clean: rm -f test_lexer test_parser make_table include ../Makefile.common .PHONY: depend depend: macro.cmi macro.cmo pa_unicode_macro.cmi pa_unicode_macro.cmo $(OCAMLDEP) -pp "camlp4o $(PARSER_P4_OPTS) $(LEXER_P4_OPTS)" $(INTERFACE_FILES) $(IMPLEMENTATION_FILES) > .depend disambiguateTypes.cmi: disambiguateTypes.mli $(OCAMLC) -c -rectypes $< disambiguateTypes.cmo: disambiguateTypes.ml disambiguateTypes.cmi $(OCAMLC) -c -rectypes $<