2 PACKAGE = cic_textual_parser2
4 ulex pxp helm-tactics helm-cic helm-logger helm-cic_unification \
8 ast.mli pp.mli macro.mli lexer.mli disambiguate.mli parser.mli \
10 IMPLEMENTATION_FILES = \
11 disambiguate_types.ml \
12 pp.ml macro.ml lexer.ml parser.ml \
14 $(patsubst %,%_notation.ml,$(NOTATIONS)) \
16 ULEXDIR := $(shell ocamlfind query ulex)
18 LEXER_P4_OPTS = -I $(ULEXDIR) pa_ulex.cma
19 PARSER_P4_OPTS = pa_extend.cmo ./macro.cmo ./pa_unicode_macro.cmo
20 PA_P4_OPTS = q_MLast.cmo pa_extend.cmo
25 $(OCAMLC) -pp "camlp4o $(LEXER_P4_OPTS)" -c $<
26 parser.cmo: parser.ml macro.cmo pa_unicode_macro.cmo
27 $(OCAMLC) -pp "camlp4o $(PARSER_P4_OPTS)" -c $<
29 %_notation.cmo: %_notation.ml parser.cmo
30 $(OCAMLC) -pp "camlp4o $(PARSER_P4_OPTS)" -c $<
32 pa_unicode_macro.cmo: pa_unicode_macro.ml macro.cmo
33 $(OCAMLC) -pp "camlp4o $(PA_P4_OPTS)" -c $<
35 LOCAL_LINKOPTS = -linkpkg $(PACKAGE).cma
36 test: test_lexer test_parser
37 test_lexer: test_lexer.ml $(PACKAGE).cma
38 $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
39 test_parser: test_parser.ml $(PACKAGE).cma
40 $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
41 make_table: make_table.ml
42 $(OCAMLC) -linkpkg -o $@ $<
44 .PHONY: macro_table.dump
45 macro_table.dump: make_table
49 distclean: extra_clean
50 rm -f macro_table.dump
52 rm -f test_lexer test_parser make_table
54 include ../Makefile.common
57 depend: macro.cmi macro.cmo pa_unicode_macro.cmi pa_unicode_macro.cmo
58 $(OCAMLDEP) -pp "camlp4o $(PARSER_P4_OPTS) $(LEXER_P4_OPTS)" $(INTERFACE_FILES) $(IMPLEMENTATION_FILES) > .depend
60 disambiguate_types.cmi: disambiguate_types.mli
61 $(OCAMLC) -c -rectypes $<
62 disambiguate_types.cmo: disambiguate_types.ml disambiguate_types.cmi
63 $(OCAMLC) -c -rectypes $<