1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
% OCAMLIFY(1) Ocamlify User Manual
% Sylvain Le Gall
% November 9, 2010
# NAME
ocamlify - create an OCaml file including other files.
# SYNOPSIS
ocamlify [options] option-file
# DESCRIPTION
This program allows to copy files inside OCaml code. It uses a first file that
describes the other files that must be included and the type of OCaml variable
it should create. It can also describe dependencies to other files, in order to
generate .depends files for make.
For example, we can create a file `test.mlify` with this content:
VarString oasissys_ml "OASISSys.ml"
VarStringList readme_template_mkd "MANUAL-template.mkd"
We then translate it using the program:
$> ocamlify --output test.ml test.mlify
And we get a file `test.ml` containing two OCaml variables: *oasissys_ml*,
which is a string, and *readme_template_mkd* which is a string list (one string
per line).
# OPTIONS
\--var-string-list *varname* `file`
: Include file as a list of string, each string representing a line (without
trailing EOL character)
\--var-string *varname* `file`
: Include file as a string.
\--output `file`
: Output file, default to standard output
\--depends
: Output file dependencies
\--target file
: Define target of dependencies
-help|\--help
: Display list of options
|