Installation Notes for CDuce ============================ CDuce is written in the OCaml programming language. It has been successfully compiled under Intel Linux, SunOS 5.7, Windows XP and FreeBSD 4.7. (See INSTALL.WIN32 for installation under Windows) ------------------------------------------------------------------------------ Prerequisites ------------------------------------------------------------------------------ Before compiling CDuce, you need to install recent releases of the following packages: 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 Important notes: - the packages above must be installed in the order we used above. In particular wlex _must_ be installed before pcre-ocaml and pxp. - wlex: you only need to build and install the runtime support library (not the wlex tool itself): make runtime.all & make install_runtime - pcre-ocaml: you may also need to install the PCRE library from http://www.pcre.org/ ./configure --prefix= --disable-shared If pcre was installed in non standard place then in Makefile.conf: export STATIC = yes #this may help but first try without export INCDIRS := /include export LIBDIRS := /lib After make all && make opt: cd lib cp ../META . ocamlfind install pcre META *.a *.cma *.cmxa *.cmi *.mli - PXP: CDuce requires a development version >= 1.1.93. Efficiency issues: - OCamlnet: if you plan to load XML file with encodings other than UTF-8, it is advised to use the CVS version of OCamlnet: http://sourceforge.net/cvs/?group_id=19774 Indeed, the netconversion module in the latest release (0.95) was very slow, and it has been rewritten since then. ------------------------------------------------------------------------------ Compilation ------------------------------------------------------------------------------ You need a GNU Make (or equivalent) to use the Makefile from the distribution. It defines the following goals: - make cduce compiles the CDuce command line interpreter - make dtd2cduce compiles the dtd2cduce tools (converts DTD to CDuce types) - make webiface compiles the CDuce web interface interpreter (to be used as a CGI script) - make local_website compiles in the web/www/ subdirectory the HTML files for the CDuce website (including the tutorial and manual) - 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