2 PACKAGE = cic_textual_parser2
4 ulex pxp helm-tactics helm-cic helm-logger helm-cic_unification \
8 cicTextualParser2Ast.mli \
9 cicTextualParser2Pp.mli \
11 cicTextualLexer2.mli \
13 cicTextualParser2.mli \
15 IMPLEMENTATION_FILES = \
16 disambiguateTypes.ml \
17 cicTextualParser2Pp.ml \
20 cicTextualParser2.ml \
22 $(patsubst %,%_notation.ml,$(NOTATIONS)) \
24 ULEXDIR := $(shell ocamlfind query ulex)
26 LEXER_P4_OPTS = -I $(ULEXDIR) pa_ulex.cma
27 PARSER_P4_OPTS = pa_extend.cmo ./macro.cmo ./pa_unicode_macro.cmo
28 PA_P4_OPTS = q_MLast.cmo pa_extend.cmo
32 cicTextualLexer2.cmo: cicTextualLexer2.ml
33 $(OCAMLC) -pp "camlp4o $(LEXER_P4_OPTS)" -c $<
34 cicTextualParser2.cmo: cicTextualParser2.ml macro.cmo pa_unicode_macro.cmo
35 $(OCAMLC) -pp "camlp4o $(PARSER_P4_OPTS)" -c $<
37 %_notation.cmo: %_notation.ml cicTextualParser2.cmo
38 $(OCAMLC) -pp "camlp4o $(PARSER_P4_OPTS)" -c $<
40 pa_unicode_macro.cmo: pa_unicode_macro.ml macro.cmo
41 $(OCAMLC) -pp "camlp4o $(PA_P4_OPTS)" -c $<
43 LOCAL_LINKOPTS = -linkpkg $(PACKAGE).cma
44 test: test_lexer test_parser
45 test_lexer: test_lexer.ml $(PACKAGE).cma
46 $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
47 test_parser: test_parser.ml $(PACKAGE).cma
48 $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
49 make_table: make_table.ml
50 $(OCAMLC) -linkpkg -o $@ $<
52 .PHONY: macro_table.dump
53 macro_table.dump: make_table
57 distclean: extra_clean
58 rm -f macro_table.dump
60 rm -f test_lexer test_parser make_table
62 include ../Makefile.common
65 depend: macro.cmi macro.cmo pa_unicode_macro.cmi pa_unicode_macro.cmo
66 $(OCAMLDEP) -pp "camlp4o $(PARSER_P4_OPTS) $(LEXER_P4_OPTS)" $(INTERFACE_FILES) $(IMPLEMENTATION_FILES) > .depend
68 disambiguateTypes.cmi: disambiguateTypes.mli
69 $(OCAMLC) -c -rectypes $<
70 disambiguateTypes.cmo: disambiguateTypes.ml disambiguateTypes.cmi
71 $(OCAMLC) -c -rectypes $<