echo 'camlp4find is a preprocessing command which can be used instead
of camlp4o or camlp4r in order to use ocamlfind packages.
Usage: camlp4find [camlp4o|camlp4r] [packages] [files to parse]
A "file to parse" can be specified as follows:
-echo displays the command which should be executed and exits
-help displays this message
The following command assumes that the packages pa_tryfinally, pa_openin
and micmatch_pcre are installed. pr_o.cmo is the standard module which
will generate a human-readable output for the preprocessed OCaml code.
The file to process does not end in .ml, so we have to use the -impl
option exactly like with camlp4o:
camlp4find pa_tryfinally pa_openin micmatch_pcre pr_o.cmo -impl somefile.mml
camlp4o) syntax=camlp4o;;
camlp4r) syntax=camlp4r;;
-impl) shift; src="$src -impl $1";;
-intf) shift; src="$src -intf $1";;
*.cmo|*.cma) libfiles="$libfiles $1";;
i_options=`ocamlfind query -predicates "syntax,preprocessor,$syntax" \
a_options=`ocamlfind query -predicates "syntax,preprocessor,$syntax" \