]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/pxp/pxp/lexers/Makefile.generate
structurated attribute names added
[helm.git] / helm / DEVEL / pxp / pxp / lexers / Makefile.generate
1 LEXERSRC = pxp_lex_misc.src \
2            pxp_lex_document.src \
3            pxp_lex_content.src \
4            pxp_lex_within_tag.src \
5            pxp_lex_document_type.src \
6            pxp_lex_declaration.src \
7            pxp_lex_dtd_string.src \
8            pxp_lex_content_string.src \
9            pxp_lex_name_string.src 
10
11 OTHERSRC = open_pxp_lex_aux_iso88591.src \
12            pxp_lex_aux.src \
13            pxp_lex_defs_iso88591.def
14
15 LEXERMLL_iso88591 = $(LEXERSRC:.src=_iso88591.mll)
16 LEXERMLL_utf8     = $(LEXERSRC:.src=_utf8.mll)
17
18 LEXERML_iso88591  = $(LEXERSRC:.src=_iso88591.ml)
19 LEXERML_utf8      = $(LEXERSRC:.src=_utf8.ml)
20
21 LEXERCMO_iso88591 = pxp_lex_aux_iso88591.cmo $(LEXERSRC:.src=_iso88591.cmo)
22 LEXERCMO_utf8     = pxp_lex_aux_utf8.cmo     $(LEXERSRC:.src=_utf8.cmo)
23
24 LEXERCMX_iso88591 = $(LEXERCMO_iso88591:.cmo=.cmx)
25 LEXERCMX_utf8     = $(LEXERCMO_utf8:.cmo=.cmx)
26
27 .PHONY: all_iso88591
28 all_iso88591: iso88591_done 
29
30 .PHONY: all_utf8
31 all_utf8: utf8_done
32
33 iso88591_done: $(LEXERSRC) $(OTHERSRC)
34         ../tools/insert_variant -variant iso88591 $(LEXERSRC)
35         for file in $(LEXERMLL_iso88591); do ocamllex $$file; done
36         touch iso88591_done
37
38 utf8_done: $(LEXERSRC) $(OTHERSRC) pxp_lex_defs_utf8.def
39         ../tools/insert_variant -variant utf8 $(LEXERSRC)
40         for file in $(LEXERMLL_utf8); do ocamllex $$file; done
41         touch utf8_done
42
43 pxp_lex_defs_utf8.def: pxp_lex_defs_generic.def pxp_lex_defs_drv_utf8.def
44         ../tools/ucs2_to_utf8/ucs2_to_utf8 <pxp_lex_defs_generic.def \
45                                    >pxp_lex_defs_utf8.def || \
46                 rm -f pxp_lex_defs_utf8.def
47         cat pxp_lex_defs_drv_utf8.def >>pxp_lex_defs_utf8.def
48
49 objects_iso88591:
50         echo LOBJECTS_iso88591  = $(LEXERCMO_iso88591)  >objects_iso88591
51         echo XLOBJECTS_iso88591 = $(LEXERCMX_iso88591) >>objects_iso88591
52
53 objects_utf8:
54         echo LOBJECTS_utf8  = $(LEXERCMO_utf8)  >objects_utf8
55         echo XLOBJECTS_utf8 = $(LEXERCMX_utf8) >>objects_utf8
56
57 depend: *.ml *.mli 
58         ocamldep *.ml *.mli >depend
59
60 .PHONY: clean
61 clean:
62         rm -f $(LEXERMLL_iso88591) $(LEXERML_iso88591) iso88591_done \
63               $(LEXERMLL_utf8)     $(LEXERML_utf8)     utf8_done \
64               pxp_lex_defs_utf8.def \
65               objects_iso88591 objects_utf8 depend
66
67 *.mli: