]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/grafite/Makefile
crosso compatibility patch which enable building both with ocaml 3.08 and 3.09
[helm.git] / helm / ocaml / grafite / Makefile
1 PACKAGE = grafite
2 PREDICATES =
3
4 INTERFACE_FILES =               \
5         grafiteAstPp.mli        \
6         grafiteParser.mli       \
7         cicNotation.mli         \
8         $(NULL)
9 IMPLEMENTATION_FILES =          \
10         grafiteAst.ml           \
11         $(INTERFACE_FILES:%.mli=%.ml)
12
13 all: test_parser print_grammar test_dep
14 clean: clean_tests
15
16 # <cross> cross compatibility among ocaml 3.09 and ocaml 3.08, to be removed as
17 # soon as we have ocaml 3.09 everywhere and "loc" occurrences are replaced by
18 # "_loc" occurrences
19 MY_SYNTAXOPTIONS = -pp "camlp4o -I $(UTF8DIR) -I $(ULEXDIR) pa_extend.cmo pa_ulex.cma pa_unicode_macro.cma -loc loc"
20 grafiteParser.cmo: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
21 grafiteParser.cmx: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
22 depend: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
23 # </cross>
24 #
25 grafiteParser.cmo: OCAMLC = $(OCAMLC_P4)
26 grafiteParser.cmx: OCAMLOPT = $(OCAMLOPT_P4)
27
28 clean_tests:
29         rm -f test_parser{,.opt} test_dep{,.opt} print_grammar{,.opt}
30
31 LOCAL_LINKOPTS = -package helm-grafite -linkpkg
32 test: test_parser print_grammar test_dep
33 test_parser: test_parser.ml $(PACKAGE).cma
34         $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
35 print_grammar: print_grammar.ml $(PACKAGE).cma
36         $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
37 test_dep: test_dep.ml $(PACKAGE).cma
38         $(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
39
40 include ../Makefile.common
41
42 # <cross> cross compatibility among ocaml 3.09 and ocaml 3.08, to be removed as
43 # soon as we have ocaml 3.09 everywhere and "loc" occurrences are replaced by
44 # "_loc" occurrences
45 UTF8DIR := $(shell $(OCAMLFIND) query helm-utf8_macros)
46 ULEXDIR := $(shell $(OCAMLFIND) query ulex)
47 MY_SYNTAXOPTIONS = -pp "camlp4o -I $(UTF8DIR) -I $(ULEXDIR) pa_extend.cmo pa_ulex.cma pa_unicode_macro.cma -loc loc"
48 cicNotationLexer.cmo: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
49 cicNotationParser.cmo: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
50 cicNotationLexer.cmx: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
51 cicNotationParser.cmx: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
52 cicNotationLexer.ml.annot: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
53 cicNotationParser.ml.annot: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
54 depend: SYNTAXOPTIONS = $(MY_SYNTAXOPTIONS)
55 # </cross>
56