2 PACKAGE = cic_textual_parser2
4 helm-tactics helm-logger helm-cic_unification helm-cic_transformations helm-pxp \
6 NOTATIONS = logic arit tex
7 # NOTATIONS = logic arit
9 disambiguateTypes.mli \
10 disambiguateChoices.mli \
12 cicTextualParser2Macro.mli \
13 cicTextualLexer2.mli \
14 cicTextualParser2.mli \
16 IMPLEMENTATION_FILES = \
17 $(patsubst %.mli, %.ml, $(INTERFACE_FILES)) \
18 $(patsubst %,%_notation.ml,$(NOTATIONS))
20 ULEXDIR := $(shell ocamlfind query ulex)
22 LEXER_P4_OPTS = -I $(ULEXDIR) pa_ulex.cma
26 ./cicTextualParser2Macro.cmo \
27 ./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 cicTextualParser2Macro.cmo pa_unicode_macro.cmo
35 $(OCAMLC) -pp "camlp4o $(PARSER_P4_OPTS)" -c $<
36 cicTextualLexer2.cmx: cicTextualLexer2.ml
37 $(OCAMLOPT) -pp "camlp4o $(LEXER_P4_OPTS)" -c $<
38 cicTextualParser2.cmx: cicTextualParser2.ml cicTextualParser2Macro.cmo pa_unicode_macro.cmo
39 $(OCAMLOPT) -pp "camlp4o $(PARSER_P4_OPTS)" -c $<
41 %_notation.cmo: %_notation.ml cicTextualParser2.cmo
42 $(OCAMLC) -pp "camlp4o $(PARSER_P4_OPTS)" -c $<
43 %_notation.cmx: %_notation.ml cicTextualParser2.cmx
44 $(OCAMLOPT) -pp "camlp4o $(PARSER_P4_OPTS)" -c $<
46 pa_unicode_macro.cmo: pa_unicode_macro.ml cicTextualParser2Macro.cmo
47 $(OCAMLC) -pp "camlp4o $(PA_P4_OPTS)" -c $<
48 pa_unicode_macro.cmx: pa_unicode_macro.ml cicTextualParser2Macro.cmx
49 $(OCAMLOPT) -pp "camlp4o $(PA_P4_OPTS)" -c $<
51 LOCAL_LINKOPTS = -linkpkg $(PACKAGE).cma
52 test: test_lexer test_parser
53 test_lexer: test_lexer.ml $(PACKAGE).cma
54 $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
55 test_parser: test_parser.ml $(PACKAGE).cma
56 $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
57 make_table: make_table.ml
58 $(OCAMLFIND) ocamlc -package helm-pxp -linkpkg -o $@ $^
60 macro_table.ml: make_table
62 macro_table.cmo: macro_table.ml
63 $(OCAMLFIND) ocamlc -c $<
66 distclean: extra_clean
67 rm -f macro_table.dump
69 rm -f test_lexer test_parser make_table
71 include ../Makefile.common
72 OCAMLARCHIVEOPTIONS += -linkall
75 depend: cicTextualParser2Macro.cmi cicTextualParser2Macro.cmo pa_unicode_macro.cmi pa_unicode_macro.cmo
76 $(OCAMLDEP) -pp "camlp4o $(PARSER_P4_OPTS) $(LEXER_P4_OPTS)" $(INTERFACE_FILES) $(IMPLEMENTATION_FILES) > .depend
78 disambiguateTypes.cmi: disambiguateTypes.mli
79 $(OCAMLC) -c -rectypes $<
80 disambiguateTypes.cmo: disambiguateTypes.ml disambiguateTypes.cmi
81 $(OCAMLC) -c -rectypes $<
82 disambiguateTypes.cmx: disambiguateTypes.ml disambiguateTypes.cmi
83 $(OCAMLOPT) -c -rectypes $<