| 1 |
abate |
370 |
Installation Notes for CDuce |
| 2 |
|
|
============================ |
| 3 |
abate |
104 |
|
| 4 |
abate |
370 |
CDuce is written in the OCaml programming language. It has been |
| 5 |
|
|
sucessfully compiled under Intel Linux, SunOS 5.7, and FreeBSD 4.7. |
| 6 |
abate |
104 |
|
| 7 |
abate |
370 |
------------------------------------------------------------------------------ |
| 8 |
|
|
Prerequisites |
| 9 |
|
|
------------------------------------------------------------------------------ |
| 10 |
abate |
104 |
|
| 11 |
abate |
370 |
Before compiling CDuce, you need to install recent releases of the |
| 12 |
|
|
following packages: |
| 13 |
abate |
298 |
|
| 14 |
abate |
370 |
ocaml |
| 15 |
|
|
http://caml.inria.fr/ocaml/distrib.html |
| 16 |
|
|
findlib |
| 17 |
|
|
http://www.ocaml-programming.de/packages |
| 18 |
|
|
wlex |
| 19 |
|
|
http://www.eleves.ens.fr/home/frisch/soft.html#wlex |
| 20 |
|
|
pcre-ocaml |
| 21 |
|
|
http://www.ai.univie.ac.at/~markus/home/ocaml_sources.html |
| 22 |
|
|
ocamlnet |
| 23 |
|
|
http://ocamlnet.sourceforge.net/ |
| 24 |
|
|
pxp |
| 25 |
|
|
http://www.ocaml-programming.de/packages/documentation/pxp/index_dev.html |
| 26 |
abate |
323 |
|
| 27 |
|
|
|
| 28 |
abate |
370 |
Important notes: |
| 29 |
abate |
323 |
|
| 30 |
abate |
390 |
- the packages above must be installed in the order we used above. In |
| 31 |
|
|
particular wlex _must_ be installed before pcre-ocaml and pxp. |
| 32 |
|
|
|
| 33 |
abate |
370 |
- wlex: you only need to build and install the runtime support library |
| 34 |
|
|
(not the wlex tool itself): |
| 35 |
abate |
104 |
|
| 36 |
abate |
370 |
make runtime.all & make install_runtime |
| 37 |
abate |
298 |
|
| 38 |
abate |
370 |
- pcre-ocaml: you may also need to install the PCRE library |
| 39 |
|
|
from http://www.pcre.org/ |
| 40 |
abate |
298 |
|
| 41 |
abate |
370 |
./configure --prefix=<prefix directory> --disable-shared |
| 42 |
abate |
298 |
|
| 43 |
|
|
If pcre was installed in non standard place then in Makefile.conf: |
| 44 |
|
|
export STATIC = yes #this may help but first try without |
| 45 |
|
|
export INCDIRS := <prefix_directory>/include |
| 46 |
|
|
export LIBDIRS := <prefix_directory>/lib |
| 47 |
|
|
|
| 48 |
|
|
After make all && make opt: |
| 49 |
abate |
104 |
cd lib |
| 50 |
|
|
cp ../META . |
| 51 |
|
|
ocamlfind install pcre META *.a *.cma *.cmxa *.cmi *.mli |
| 52 |
|
|
|
| 53 |
abate |
370 |
- PXP: |
| 54 |
|
|
CDuce requires a development version >= 1.1.93. |
| 55 |
abate |
104 |
|
| 56 |
|
|
|
| 57 |
abate |
402 |
Efficiency issues: |
| 58 |
abate |
399 |
|
| 59 |
|
|
- OCamlnet: if you plan to load XML file with encodings other than |
| 60 |
abate |
402 |
UTF-8, it is advised to use the CVS version of OCamlnet: |
| 61 |
abate |
399 |
http://sourceforge.net/cvs/?group_id=19774 |
| 62 |
|
|
Indeed, the netconversion module in the lastest release (0.95) was |
| 63 |
|
|
very slow, and it has been rewritten since then. |
| 64 |
|
|
|
| 65 |
abate |
370 |
------------------------------------------------------------------------------ |
| 66 |
|
|
Compilation |
| 67 |
|
|
------------------------------------------------------------------------------ |
| 68 |
abate |
298 |
|
| 69 |
abate |
370 |
You need a GNU Make (or equivalent) to use the Makefile from the |
| 70 |
|
|
distribution. It defines the following goals: |
| 71 |
abate |
298 |
|
| 72 |
abate |
402 |
- make cduce |
| 73 |
abate |
370 |
compiles the CDuce command line interpreter |
| 74 |
abate |
298 |
|
| 75 |
abate |
370 |
- make dtd2cduce |
| 76 |
|
|
compiles the dtd2cduce tools (converts DTD to CDuce types) |
| 77 |
abate |
298 |
|
| 78 |
abate |
402 |
- make webiface |
| 79 |
abate |
370 |
compiles the CDuce web interface interpreter (to be used as a CGI script) |
| 80 |
abate |
362 |
|
| 81 |
abate |
370 |
- make local_website |
| 82 |
abate |
402 |
compiles in the web/www/ subdirectory the HTML files of CDuce website |
| 83 |
abate |
370 |
(including the tutorial) |
| 84 |
abate |
402 |
|
| 85 |
|
|
- make all |
| 86 |
|
|
equivalent to (make cduce; make dtd2cduce; make local_website) |
| 87 |
|
|
|
| 88 |
|
|
|
| 89 |
|
|
Makefile accepts the following options, which can take the values |
| 90 |
|
|
true or false. |
| 91 |
|
|
|
| 92 |
|
|
NATIVE=true : use the OCaml native code compiler (ocamlopt) to build CDuce |
| 93 |
|
|
NATIVE=false : use the OCaml bytecode compiler (ocamlc) |
| 94 |
|
|
default: true (the native code version is much faster) |
| 95 |
|
|
|
| 96 |
|
|
PXP_WLEX=true : use wlex for parsing UTF-8 XML files |
| 97 |
|
|
PXP_WLEX=false: use ocamllex for parsing UTF-8 XML files |
| 98 |
|
|
default: false (ocamllex is faster; wlex is more compact) |
| 99 |
|
|
|
| 100 |
|
|
E.g.: |
| 101 |
|
|
make cduce NATIVE=false |