~ubuntu-branches/ubuntu/hardy/pxp/hardy

« back to all changes in this revision

Viewing changes to gensrc/pxp-ulex-utf8/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Stefano Zacchiroli
  • Date: 2005-03-29 11:06:39 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050329110639-5p39hz1d4aq3r2ec
Tags: 1.1.95-6
* Rebuilt against ocaml 3.08.3
* No longer built with wlex support (since wlex is no longer supported
  upstream and corresponding package has been removed from the debian
  archive)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
TOP_DIR = ../..
 
2
 
 
3
include $(TOP_DIR)/Makefile.rules
 
4
 
 
5
ENC = utf8
 
6
INPUT = $(TOP_DIR)/src/pxp-lex
 
7
ML = $(shell echo pxp_ulex_$(ENC)_*.ml)
 
8
CMO = $(ML:.ml=.cmo)
 
9
CMX = $(ML:.ml=.cmx)
 
10
OCAMLC_OPTIONS += -I $(TOP_DIR)/src/pxp-engine -syntax camlp4o
 
11
OCAMLOPT_OPTIONS += -I $(TOP_DIR)/src/pxp-engine -syntax camlp4o
 
12
PACKAGES = netstring,ulex
 
13
 
 
14
.PHONY: all opt generate clean CLEAN distclean install uninstall
 
15
 
 
16
all: pxp_ulex_$(ENC).cma pxp_ulex_link_$(ENC).cmo
 
17
 
 
18
opt: pxp_ulex_$(ENC).cmxa pxp_ulex_link_$(ENC).cmx
 
19
 
 
20
pxp_ulex_$(ENC).cma: $(CMO)
 
21
        $(OCAMLC) -o pxp_ulex_$(ENC).cma -a $(CMO)
 
22
 
 
23
pxp_ulex_$(ENC).cmxa: $(CMX)
 
24
        $(OCAMLOPT) -o pxp_ulex_$(ENC).cmxa -a $(CMX)
 
25
 
 
26
generate: gen_done
 
27
 
 
28
gen_done: $(INPUT)/*.def $(INPUT)/*.src
 
29
        $(LEXPP) -charclasses "$(INPUT)/char_classes_generic.def" \
 
30
                -lexsrc "$(INPUT)/lex.src" \
 
31
                -linksrc "$(INPUT)/link_ulex.src" \
 
32
                -encoding "$(ENC)" \
 
33
                -outformat ulex \
 
34
                -outlexprefix "pxp_ulex_$(ENC)" \
 
35
                -outlinkprefix "pxp_ulex_link_$(ENC)"
 
36
        touch gen_done
 
37
 
 
38
.PHONY: expand
 
39
expand:
 
40
        camlp4 -I `ocamlfind query ulex` pa_o.cmo pa_op.cmo pa_ulex.cma pr_o.cmo pxp_ulex_utf8_01.ml
 
41
 
 
42
clean:
 
43
        rm -f $(CLEAN_LIST) *.ml *.mll gen_done
 
44
 
 
45
CLEAN: clean
 
46
 
 
47
# distclean is not clean, because the distribution contains the .ml files
 
48
# and gen_done
 
49
distclean:
 
50
        rm -f $(CLEAN_LIST) META
 
51
 
 
52
install:
 
53
        files=`$(COLLECT_FILES) *.mli *.cmi *.cma *.cmxa *.a pxp_ulex_link_*.cmo pxp_ulex_link_*.cmx pxp_ulex_link_*.o META` && \
 
54
        $(OCAMLFIND) install pxp-ulex-$(ENC) $$files
 
55
 
 
56
uninstall:
 
57
        $(OCAMLFIND) remove pxp-ulex-$(ENC)