Commit 9dd0ea91 authored by gerd's avatar gerd

First trial.


git-svn-id: https://godirepo.camlcity.org/svn/lib-pxp/trunk@669 dbe99aee-44db-0310-b2b3-d33182c8eb97
parent 5b055111
description = "Polymorphic XML parser - Lexical analyzer for UTF-8 based on wlex"
requires = "pxp-engine,wlexing"
version = "@VERSION@"
archive(byte) = "pxp_wlex_utf8.cma pxp_wlex_link_utf8.cmo"
archive(native) = "pxp_wlex_utf8.cmxa pxp_wlex_link_utf8.cmx"
TOP_DIR = ../..
ENC = utf8
INPUT = $(TOP_DIR)/src/pxp-lex
ML = $(shell echo pxp_ulex_$(ENC)_*.ml)
CMO = $(MLL:.ml=.cmo)
CMX = $(MLL:.ml=.cmx)
OCAMLC_OPTIONS = -I $(TOP_DIR)/src/pxp-engine -syntax camlp4o
OCAMLOPT_OPTIONS = $(OCAMLC_OPTIONS) -syntax camlp4o
PACKAGES = netstring,ulex
include $(TOP_DIR)/Makefile.rules
.PHONY: all opt generate clean CLEAN distclean install uninstall
all: pxp_ulex_$(ENC).cma pxp_ulex_link_$(ENC).cmo
opt: pxp_ulex_$(ENC).cmxa pxp_ulex_link_$(ENC).cmx
pxp_ulex_$(ENC).cma: $(CMO)
$(OCAMLC) -o pxp_ulex_$(ENC).cma -a $(CMO)
pxp_ulex_$(ENC).cmxa: $(CMX)
$(OCAMLOPT) -o pxp_ulex_$(ENC).cmxa -a $(CMX)
generate: gen_done
gen_done: $(INPUT)/*.def $(INPUT)/*.src
$(LEXPP) -charclasses "$(INPUT)/char_classes_generic.def" \
-lexsrc "$(INPUT)/lex.src" \
-linksrc "$(INPUT)/link_ulex.src" \
-encoding "$(ENC)" \
-outformat ulex \
-outlexprefix "pxp_ulex_$(ENC)" \
-outlinkprefix "pxp_ulex_link_$(ENC)"
touch gen_done
clean:
rm -f $(CLEAN_LIST) *.ml *.mll gen_done
CLEAN: clean
# distclean is not clean, because the distribution contains the .ml files
# and gen_done
distclean:
rm -f $(CLEAN_LIST) META
install:
files=`$(COLLECT_FILES) *.mli *.cmi *.cma *.cmxa *.a pxp_ulex_link_*.cmo pxp_ulex_link_*.cmx pxp_ulex_link_*.o META` && \
$(OCAMLFIND) install pxp-ulex-$(ENC) $$files
uninstall:
$(OCAMLFIND) remove pxp-ulex-$(ENC)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment