2 PACKAGE = cic_textual_parser2
4 helm-tactics helm-logger helm-cic_unification helm-cic_transformations \
5 ulex pxp camlp4.gramlib
6 NOTATIONS = logic arit tex
8 disambiguateTypes.mli \
9 disambiguateChoices.mli \
11 cicTextualParser2Macro.mli \
12 cicTextualLexer2.mli \
13 cicTextualParser2.mli \
15 IMPLEMENTATION_FILES = \
16 $(patsubst %.mli, %.ml, $(INTERFACE_FILES)) \
17 $(patsubst %,%_notation.ml,$(NOTATIONS))
19 ULEXDIR := $(shell ocamlfind query ulex)
21 LEXER_P4_OPTS = -I $(ULEXDIR) pa_ulex.cma
25 ./cicTextualParser2Macro.cmo \
26 ./pa_unicode_macro.cmo
27 PA_P4_OPTS = q_MLast.cmo pa_extend.cmo
31 cicTextualLexer2.cmo: cicTextualLexer2.ml
32 $(OCAMLC) -pp "camlp4o $(LEXER_P4_OPTS)" -c $<
33 cicTextualParser2.cmo: cicTextualParser2.ml cicTextualParser2Macro.cmo pa_unicode_macro.cmo
34 $(OCAMLC) -pp "camlp4o $(PARSER_P4_OPTS)" -c $<
35 cicTextualLexer2.cmx: cicTextualLexer2.ml
36 $(OCAMLOPT) -pp "camlp4o $(LEXER_P4_OPTS)" -c $<
37 cicTextualParser2.cmx: cicTextualParser2.ml cicTextualParser2Macro.cmo pa_unicode_macro.cmo
38 $(OCAMLOPT) -pp "camlp4o $(PARSER_P4_OPTS)" -c $<
40 %_notation.cmo: %_notation.ml cicTextualParser2.cmo
41 $(OCAMLC) -pp "camlp4o $(PARSER_P4_OPTS)" -c $<
42 %_notation.cmx: %_notation.ml cicTextualParser2.cmx
43 $(OCAMLOPT) -pp "camlp4o $(PARSER_P4_OPTS)" -c $<
45 pa_unicode_macro.cmo: pa_unicode_macro.ml cicTextualParser2Macro.cmo
46 $(OCAMLC) -pp "camlp4o $(PA_P4_OPTS)" -c $<
47 pa_unicode_macro.cmx: pa_unicode_macro.ml cicTextualParser2Macro.cmx
48 $(OCAMLOPT) -pp "camlp4o $(PA_P4_OPTS)" -c $<
50 LOCAL_LINKOPTS = -linkpkg $(PACKAGE).cma
51 test: test_lexer test_parser
52 test_lexer: test_lexer.ml $(PACKAGE).cma
53 $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
54 test_parser: test_parser.ml $(PACKAGE).cma
55 $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
56 make_table: make_table.ml
57 $(OCAMLFIND) ocamlc -package pxp -linkpkg -o $@ $^
59 macro_table.ml: make_table
61 macro_table.cmo: macro_table.ml
62 $(OCAMLFIND) ocamlc -c $<
65 distclean: extra_clean
66 rm -f macro_table.dump
68 rm -f test_lexer test_parser make_table
70 include ../Makefile.common
73 depend: cicTextualParser2Macro.cmi cicTextualParser2Macro.cmo pa_unicode_macro.cmi pa_unicode_macro.cmo
74 $(OCAMLDEP) -pp "camlp4o $(PARSER_P4_OPTS) $(LEXER_P4_OPTS)" $(INTERFACE_FILES) $(IMPLEMENTATION_FILES) > .depend
76 disambiguateTypes.cmi: disambiguateTypes.mli
77 $(OCAMLC) -c -rectypes $<
78 disambiguateTypes.cmo: disambiguateTypes.ml disambiguateTypes.cmi
79 $(OCAMLC) -c -rectypes $<
80 disambiguateTypes.cmx: disambiguateTypes.ml disambiguateTypes.cmi
81 $(OCAMLOPT) -c -rectypes $<