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 pp.ml macro.ml lexer.ml disambiguate_struct.ml parser.ml \
13 $(patsubst %,%_notation.ml,$(NOTATIONS)) \
15 ULEXDIR := $(shell ocamlfind query ulex)
17 LEXER_P4_OPTS = -I $(ULEXDIR) pa_ulex.cma
18 PARSER_P4_OPTS = pa_extend.cmo ./macro.cmo ./pa_unicode_macro.cmo
19 PA_P4_OPTS = q_MLast.cmo pa_extend.cmo
24 $(OCAMLC) -pp "camlp4o $(LEXER_P4_OPTS)" -c $<
25 parser.cmo: parser.ml macro.cmo pa_unicode_macro.cmo
26 $(OCAMLC) -pp "camlp4o $(PARSER_P4_OPTS)" -c $<
28 %_notation.cmo: %_notation.ml parser.cmo
29 $(OCAMLC) -pp "camlp4o $(PARSER_P4_OPTS)" -c $<
31 pa_unicode_macro.cmo: pa_unicode_macro.ml macro.cmo
32 $(OCAMLC) -pp "camlp4o $(PA_P4_OPTS)" -c $<
34 LOCAL_LINKOPTS = -linkpkg $(PACKAGE).cma
35 test: test_lexer test_parser
36 test_lexer: test_lexer.ml $(PACKAGE).cma
37 $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
38 test_parser: test_parser.ml $(PACKAGE).cma
39 $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
40 make_table: make_table.ml
41 $(OCAMLC) -linkpkg -o $@ $<
43 .PHONY: macro_table.dump
44 macro_table.dump: make_table
48 distclean: extra_clean
49 rm -f macro_table.dump
51 rm -f test_lexer test_parser make_table
53 include ../Makefile.common
56 depend: macro.cmi macro.cmo pa_unicode_macro.cmi pa_unicode_macro.cmo
57 $(OCAMLDEP) -pp "camlp4o $(PARSER_P4_OPTS) $(LEXER_P4_OPTS)" $(INTERFACE_FILES) $(IMPLEMENTATION_FILES) > .depend
59 disambiguate_types.cmi: disambiguate_types.mli
60 $(OCAMLC) -c -rectypes $<