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

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

8
9
10
------------------------------------------------------------------------------
Prerequisites
------------------------------------------------------------------------------
11

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

15
16
17
18
19
20
21
22
23
24
25
26
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
27
28


29
Important notes:
30

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

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

37
     make runtime.all & make install_runtime
38

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

42
  ./configure --prefix=<prefix directory> --disable-shared
43

44
45
46
47
48
49
  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:
50
51
52
53
    cd lib
    cp ../META .
    ocamlfind install pcre META *.a *.cma *.cmxa *.cmi *.mli

54
55
- PXP:
  CDuce requires a development version >= 1.1.93.
56

57

58
Efficiency issues:
59
60

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

66
67
68
------------------------------------------------------------------------------
Compilation
------------------------------------------------------------------------------
69

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

73
- make cduce
74
  compiles the CDuce command line interpreter
75

76
77
- make dtd2cduce
  compiles the dtd2cduce tools (converts DTD to CDuce types)
78

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

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

- 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.:
  make cduce NATIVE=false