[Omake] ocamldep -syntax and omake 0.9.4

Aleksey Nogin anogin at hrl.com
Mon Aug 6 11:12:18 PDT 2007


On 03.08.2007 17:47, Martin Jambon wrote:

> After upgrading from omake 0.9.8.1 to omake 0.9.8.4,
> some of our projects that use camlp4 preprocessing don't compile anymore.
> It looks like it's due to an incorrect ocamldep command, without a 
> -syntax flag.
> I attached a small, typical example.
[...]
> - scan . scan-ocaml-example.ml
> + ocamlrun /home/martin/godi/bin/ocamldep-omake -modules example.ml
>      | Shell.ocamldep-postproc()
> File "example.ml", line 1, characters 10-17:
> Syntax error

Martin,

Yes, 0.9.8.4 fails to use the ocamlfind (even under USE_OCAMLFIND = 
true). This is fixed on SVN and the fix will be included in 0.9.8.5 
(which I am hoping to release tomorrow). Note that the -syntax is an 
ocamlfind's option, not ocamldep's.

If you want to include the fix manually, you can fix the OCamlScanner 
function definition (either by editing the OCaml.om, or by temporarily 
including it in your own OMakefile) to say:

public.OCamlScanner(src_file) =
     if $(OCAMLDEP_MODULES_ENABLED)
         value $(OCAMLFIND) $(OCAMLDEP_MODULES) $(LAZY_OCAMLFINDFLAGS) 
$(PREFIXED_OCAMLPACKS) $(OCAMLDEPFLAGS) -modules $(src_file) | 
ocamldep-postproc
     else
         value $(OCAMLFIND) $(OCAMLDEP) $(LAZY_OCAMLFINDFLAGS) 
$(PREFIXED_OCAMLPACKS) $(OCAMLDEPFLAGS) $(PREFIXED_OCAMLINCLUDES) 
$(src_file)

(here only the OCAMLDEP_MODULES line is different from the 0.9.8.4 version).

Aleksey

-- 
Aleksey Nogin, Research Scientist
Advanced Technologies Department, Information & System Sciences Lab
HRL Laboratories, LLC, Malibu, CA


More information about the Omake mailing list