1 ******************************************************************************
2 INSTALL - PXP, the XML parser for O'Caml
3 ******************************************************************************
6 ==============================================================================
8 ==============================================================================
10 ------------------------------------------------------------------------------
12 ------------------------------------------------------------------------------
14 PXP requires that the netstring package [1] is already installed. PXP works
15 only with O'Caml 3.00 (the support for 2.04 has been dropped). The installation
16 procedure defined in the Makefile requires findlib [2] to work [3].
18 ------------------------------------------------------------------------------
20 ------------------------------------------------------------------------------
22 It is not necessary to configure PXP; but you can switch off the UTF-8 support
23 by setting the variable
27 in Makefile.conf. In this case, the UTF-8 modules are not even compiled. - By
28 default, the UTF-8 support is enabled.
30 Note: Compiling the UTF-8 modules lasts 10 minutes on my 400 Mhz Pentium II; if
31 this is too long, you can set UTF8_SUPPORT to "no".
33 ------------------------------------------------------------------------------
35 ------------------------------------------------------------------------------
37 The Makefile defines the following goals:
40 compiles with the bytecode compiler and creates the files pxp_types.cma,
41 pxp_lex_iso88591.cma, pxp_lex_utf8.cma (*), pxp_engine.cma, and pxp_utf8.cmo
42 (*). The (*) files are not built if the UTF-8 support is switched off.
45 compiles with the native compiler and creates the files pxp_types.cmxa,
46 pxp_lex_iso88591.cmxa, pxp_lex_utf8.cmxa (*), pxp_engine.cmxa, and
47 pxp_utf8.cmx (*). The (*) files are not built if the UTF-8 support is
50 ------------------------------------------------------------------------------
52 ------------------------------------------------------------------------------
54 The Makefile defines the following goals:
57 installs the bytecode archives, the interface definitions, and if present,
58 the native archives in the default location of findlib as package "pxp"
61 removes the package "pxp"
64 installs the Markup compatibility API as package "markup"
66 - make markup-uninstall
67 removes the package "markup"
69 ------------------------------------------------------------------------------
70 Usage with the help of "findlib"
71 ------------------------------------------------------------------------------
73 You can refer to the parser as the findlib package "pxp":
75 ocamlfind ocamlc -package pxp ...
77 By default, the UTF-8 support modules will be linked in. If you do not need
78 them, you may define the predicate "pxp_without_utf8", which causes that the
79 UTF-8 relevant parts are not linked with your program; the difference in size
82 ocamlfind ocamlc -package pxp -predicates pxp_without_utf8 ...
84 Note that you can also reduce the size of the resulting executable by
85 specifying Netstring-related predicates (e.g. netstring_only_iso); see the
86 documentation of Netstring.
88 ------------------------------------------------------------------------------
89 Linking with the archives directly
90 ------------------------------------------------------------------------------
92 If you need UTF-8 support, you must link your program as follows:
94 ocamlc ... pxp_types.cma pxp_lex_iso88591.cma pxp_lex_utf8.cma
95 pxp_engine.cma pxp_utf8.cmo ...
97 If you do not need UTF-8, the following suffices:
99 ocamlc ... pxp_types.cma pxp_lex_iso88591.cma pxp_engine.cma ...
103 ==============================================================================
105 ==============================================================================
107 In the "examples" directory you find several applications of PXP. They require
108 that PXP has been installed using findlib. See the Makefiles in the directories
109 for descriptions of "make" goals.
111 ==============================================================================
113 ==============================================================================
115 ------------------------------------------------------------------------------
117 ------------------------------------------------------------------------------
119 The "make" utility of Solaris does not work properly enough; there is a bug in
120 it that prevents the so-called suffix rules from being recognized. There are
123 - Install GNU make and use it instead of Solaris make. This is the recommended
124 way to solve the problem, as GNU make can process almost every Makefile from
125 open source projects, and you will never have problems with building
128 - Add the following lines to Makefile.code:
145 --------------------------
147 [1] see http://www.ocaml-programming.de/packages/documentation/netstring
149 [2] see http://www.ocaml-programming.de/packages/documentation/findlib/
151 [3] Findlib is a package manager, see the file ABOUT-FINDLIB.