]> matita.cs.unibo.it Git - helm.git/blob - helm/software/components/grafite_parser/Makefile
fixed check, if 0 constructors then no List.nth is allowed
[helm.git] / helm / software / components / grafite_parser / Makefile
1 PACKAGE = grafite_parser
2 PREDICATES =
3
4 INTERFACE_FILES =                       \
5         dependenciesParser.mli          \
6         grafiteParser.mli               \
7         cicNotation2.mli                \
8         grafiteDisambiguator.mli        \
9         grafiteDisambiguate.mli         \
10         grafiteWalker.mli               \
11         print_grammar.mli               \
12         $(NULL)
13 IMPLEMENTATION_FILES = $(INTERFACE_FILES:%.mli=%.ml)
14
15 all: test_parser test_dep
16 clean: clean_tests
17
18 # <cross> cross compatibility among ocaml 3.09 and ocaml 3.08, to be removed as
19 # soon as we have ocaml 3.09 everywhere and "loc" occurrences are replaced by
20 # "_loc" occurrences
21 UTF8DIR = $(shell $(OCAMLFIND) query helm-syntax_extensions)
22 ULEXDIR = $(shell $(OCAMLFIND) query ulex08)
23 MY_SYNTAXOPTIONS = -pp "camlp5o -I $(UTF8DIR) -I $(ULEXDIR) pa_extend.cmo pa_ulex.cma pa_unicode_macro.cma -loc loc"
24 grafiteParser.cmo: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
25 grafiteParser.cmx: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
26 depend: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
27 depend.opt: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
28 # </cross>
29 #
30 grafiteParser.cmo: OCAMLC = $(OCAMLC_P4)
31 grafiteParser.cmx: OCAMLOPT = $(OCAMLOPT_P4)
32
33 clean_tests:
34         rm -f test_parser{,.opt} test_dep{,.opt} print_grammar{,.opt}
35
36 LOCAL_LINKOPTS = -package helm-$(PACKAGE) -linkpkg
37 test: test_parser print_grammar test_dep
38 test_parser: test_parser.ml $(PACKAGE).cma
39         @echo "  OCAMLC $<"
40         @$(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
41 print_grammar: print_grammar.ml $(PACKAGE).cma
42         @echo "  OCAMLC $<"
43         @$(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
44 test_dep: test_dep.ml $(PACKAGE).cma
45         @echo "  OCAMLC $<"
46         @$(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
47
48 include ../../Makefile.defs
49 include ../Makefile.common