INSTALL 3.19 KB
Newer Older
1
2
Installation Notes for CDuce
============================
3

4
CDuce is written in the OCaml programming language. It has been
5
successfully compiled under Intel Linux, SunOS 5.7, Windows XP
6
and FreeBSD 4.7.
7

8
9
(See INSTALL.WIN32 for installation under Windows)

10
11
12
------------------------------------------------------------------------------
Prerequisites
------------------------------------------------------------------------------
13

14
15
Before compiling CDuce, you need to install recent releases of the
following packages:
16

17
18
19
20
21
22
23
24
25
26
27
28
ocaml      
  http://caml.inria.fr/ocaml/distrib.html
findlib    
  http://www.ocaml-programming.de/packages
wlex       
  http://www.eleves.ens.fr/home/frisch/soft.html#wlex
pcre-ocaml 
  http://www.ai.univie.ac.at/~markus/home/ocaml_sources.html
ocamlnet   
  http://ocamlnet.sourceforge.net/
pxp
  http://www.ocaml-programming.de/packages/documentation/pxp/index_dev.html
29
30


31
Important notes:
32

33
34
35
- the packages above must be installed in the order we used above. In
  particular wlex _must_ be installed before pcre-ocaml and pxp.

36
37
- wlex: you only need to build and install the runtime support library
  (not the wlex tool itself):
38

39
     make runtime.all & make install_runtime
40

41
42
- pcre-ocaml: you may also need to install the PCRE library
  from http://www.pcre.org/
43

44
  ./configure --prefix=<prefix directory> --disable-shared
45

46
47
48
49
50
51
  If pcre was installed in non standard place then in Makefile.conf:
  export STATIC = yes     #this may help but first try without
  export INCDIRS := <prefix_directory>/include
  export LIBDIRS := <prefix_directory>/lib

  After make all && make opt:
52
53
54
55
    cd lib
    cp ../META .
    ocamlfind install pcre META *.a *.cma *.cmxa *.cmi *.mli

56
57
- PXP:
  CDuce requires a development version >= 1.1.93.
58

59

60
Efficiency issues:
61
62

- OCamlnet: if you plan to load XML file with encodings other than
63
  UTF-8, it is advised to use the CVS version of OCamlnet:
64
    http://sourceforge.net/cvs/?group_id=19774  
65
  Indeed, the netconversion module in the latest release (0.95) was
66
67
  very slow, and it has been rewritten since then.

68
69
70
------------------------------------------------------------------------------
Compilation
------------------------------------------------------------------------------
71

72
73
You need a GNU Make (or equivalent) to use the Makefile from the
distribution. It defines the following goals:
74

75
- make cduce
76
  compiles the CDuce command line interpreter
77

78
79
- make dtd2cduce
  compiles the dtd2cduce tools (converts DTD to CDuce types)
80

81
- make webiface
82
  compiles the CDuce web interface interpreter (to be used as a CGI script)
83

84
- make local_website
85
86
  compiles in the web/www/ subdirectory the HTML files for the CDuce website
  (including the tutorial and manual)
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103

- make all
  equivalent to (make cduce; make dtd2cduce; make local_website)


Makefile accepts the following options, which can take the values
true or false.

NATIVE=true   : use the OCaml native code compiler (ocamlopt) to build CDuce
NATIVE=false  : use the OCaml bytecode compiler (ocamlc)
  default: true  (the native code version is much faster)

PXP_WLEX=true : use wlex for parsing UTF-8 XML files
PXP_WLEX=false: use ocamllex for parsing UTF-8 XML files
  default: false (ocamllex is faster; wlex is more compact)

E.g.:
104
  make cduce NATIVE=false