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

« back to all changes in this revision

Viewing changes to gensrc/pxp-wlex-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
MLL = $(shell echo pxp_wlex_$(ENC)_*.mll)
 
8
CMO = $(MLL:.mll=.cmo)
 
9
CMX = $(MLL:.mll=.cmx)
 
10
OCAMLC_OPTIONS += -I $(TOP_DIR)/src/pxp-engine
 
11
OCAMLOPT_OPTIONS += $(OCAMLC_OPTIONS)
 
12
PACKAGES = netstring,wlexing
 
13
 
 
14
.PHONY: all opt generate clean CLEAN distclean install uninstall
 
15
 
 
16
all: pxp_wlex_$(ENC).cma pxp_wlex_link_$(ENC).cmo
 
17
 
 
18
opt: pxp_wlex_$(ENC).cmxa pxp_wlex_link_$(ENC).cmx
 
19
 
 
20
pxp_wlex_$(ENC).cma: $(CMO)
 
21
        $(OCAMLC) -o pxp_wlex_$(ENC).cma -a $(CMO)
 
22
 
 
23
pxp_wlex_$(ENC).cmxa: $(CMX)
 
24
        $(OCAMLOPT) -o pxp_wlex_$(ENC).cmxa -a $(CMX)
 
25
 
 
26
generate: gen_done
 
27
 
 
28
gen_done: $(INPUT)/*.def $(INPUT)/*.src
 
29
        $(LEXPP) -charclasses "$(INPUT)/char_classes_wlex.def" \
 
30
                -lexsrc "$(INPUT)/lex.src" \
 
31
                -linksrc "$(INPUT)/link_wlex.src" \
 
32
                -encoding "$(ENC)" \
 
33
                -outformat wlex \
 
34
                -outlexprefix "pxp_wlex_$(ENC)" \
 
35
                -outlinkprefix "pxp_wlex_link_$(ENC)"
 
36
        for mll in *.mll; do echo "Doing $$mll:"; $(WLEX) $$mll; done
 
37
        touch gen_done
 
38
 
 
39
clean:
 
40
        rm -f $(CLEAN_LIST) *.ml *.mll gen_done
 
41
 
 
42
CLEAN: clean
 
43
 
 
44
# distclean is not clean, because the distribution contains the .ml files
 
45
# and gen_done
 
46
distclean:
 
47
        rm -f $(CLEAN_LIST) META
 
48
 
 
49
install:
 
50
        files=`$(COLLECT_FILES) *.mli *.cmi *.cma *.cmxa *.a pxp_wlex_link_*.cmo pxp_wlex_link_*.cmx pxp_wlex_link_*.o META` && \
 
51
        $(OCAMLFIND) install pxp-wlex-$(ENC) $$files
 
52
 
 
53
uninstall:
 
54
        $(OCAMLFIND) remove pxp-wlex-$(ENC)