.\" Hey, EMACS: -*- nroff -*- .TH ELIOMC 1 2012-02-15 .SH NAME eliomc, eliomcp, eliomopt, js_of_eliom, eliomdep \- the eliom build tools .SH SYNOPSIS .B eliomc .RI [ options ] .RI files .B eliomcp .RI [ options ] .RI files .B eliomopt .RI [ options ] .RI files .B eliomdep .RI [ options ] .RI files .B js_of_eliom .RI [ options ] .RI files \-o .RI filename.js .SH DESCRIPTION .B eliomc, .B eliomcp and .B eliomopt are wrapper around the OCaml compiler that ease the compilation of the server part of projects based on the Eliom framework. They respectively accept the same set of option than the .BR ocamlc (1), ocamlcp (1) and .BR ocamlopt (1) compilers plus the specific ones described in the .I OPTIONS section. .B js_of_eliom is a wrapper around the OCaml and Js_of_ocaml compilers that ease the compilation of the client part of projects based on the Eliom framework. It accepts the same set of option than the .BR ocamlc (1) compiler plus the specific ones described in the .I OPTIONS section. .B eliomdep is a wrapper around .BR ocamldep (1) that handles dependencies of an .eliom source files. It accepts the same set of options plus the specific ones described in the .I OPTIONS section. Warnings: this tools is still limited and do not handle dependencies towards an .eliom files. .SH COMPILING ELIOM SOURCE FILES The compilation of files with a .eliom extension is achieved in three steps: infer the type of value sent by the server to the client; compile the server part of the code and compile the client part. The first two steps can be realised with .B eliomc and the last one with .B js_of_eliom. Both tools produce a .cmo file named as the original .eliom file. To avoid overwriting the .cmo representing the server part with .cmo of the client part, files generated by .BR eliomc \ or \ eliomopt are stored by default in a subdirectory named _server and files generated by .B js_of_eliom are stored in a subdirectory named _client. Those default directories could be respectively overridden by the environment variables ELIOM_SERVER_DIR and ELIOM_CLIENT_DIR. The types infered by .B eliomc for values sent by the server to the client are stored in an intermediate files named as the original .eliom file and whose extension is .type_mli. That file is required by .B js_of_eliom for compiling the client part of the .eliom file. The .B eliomdep tool correctly generate dependencies that intermediate file for the server .cmo and the client .cmo. .SH OPTIONS .TP .BR \-dir\ Specify the target directory for generated files .TP .BR \-package\ This is the same option as the ocamlfind one. .TP .BR \-predicates\

This is the same option as the ocamlfind one. .TP .BR \-ppopt\ Append to preprocessor invocation. .TP .BR \-jsopt\ Append to js_of_ocaml invocation (js_of_eliom only). .TP .BR \-infer\ For .eliom file, only generate the intermediate .type_mli file (eliomc and eliomopt only). .TP .BR \-noinfer\ For .eliom file, do not generate the intermediate .type_mli file (eliomc and eliomopt only). .TP .BR \-help \ or \ \-\-help Display a short usage summary and exit. .SH EXAMPLES The compilation of an Eliom projects composed of a server specific file named server.ml, a client specific file named client.ml and two common files name base.eliom and main.eliom, could be achieved with the following commands: \ \ \ \ eliomc \-a \-o appl.cma server.ml base.eliom main.eliom .br \ \ \ \ js_of_eliom \-o appl.js client.ml base.eliom main.eliom To avoid recompiling the whole project each times, this could be split in multiple steps: \ \ \ \ eliomc \-c server.ml .br \ \ \ \ eliomc \-c base.eliom .br \ \ \ \ eliomc \-c main.eliom .br \ \ \ \ eliomc \-a \-o appl.cma _server/server.cmo _server/base.cmo _server/main.cmo .br \ \ \ \ js_of_eliom \-c client.ml .br \ \ \ \ js_of_eliom \-c base.eliom .br \ \ \ \ js_of_eliom \-c main.eliom .br \ \ \ \ js_of_eliom \-o appl.js _client/client.cmo _client/base.cmo _client/main.cmo .SH SEE ALSO .BR ocamlc (1), .BR ocamlopt (1), .BR js_of_ocaml (1), .BR ocamlfind (1), .BR ocamlcp (1), .BR ocamldep (1). .SH AUTHOR eliomc, js_of_eliom, eliomdep and eliomopt were written by Gregoire Henry . .PP This manual page was written by Pierre Chambart .