gildor478 / ocaml-gettext

Other
13 stars 10 forks source link

Bad interaction between camlp4 and ocaml-xgettext #10

Open gildor478 opened 4 years ago

gildor478 commented 4 years ago

This bug has been migrated from artifact #537 on forge.ocamlcore.org. It was assigned to user102.

user102 posted on 2010-03-06 16:31:36:

It seems quite hard to mix ocaml-xgettext and camlp4.

E.g: ocaml-xgettext -I +camlp4 /usr/lib/ocaml/type-conv/pa_type_conv.cmo /home/gildor/programmation/00build/x86_64-unknown-linux-gnu/lib/ocaml/3.11.2/odn/pa_odn.cma ../src/oasis/OASISTypes.ml Camlp4: Uncaught exception: Not_found

but

ocaml-xgettext pa_o.cmo -I /usr/lib/ocaml/type-conv pa_type_conv.cmo /home/gildor/programmation/00build/x86_64-unknown-linux-gnu/lib/ocaml/3.11.2/odn/pa_odn.cma ../src/oasis/OASISTypes.ml

A good idea to simplify this, is to integrate findlib and: ocaml-xgettext -syntax camlp4o -package pa_odn.with.syntax

Another idea is to be able to create .ppo (partial po), during the build and merge them: ocamlfind ocamlc -syntax camlp4o toto.ml -> toto.mo ocamlfind ocaml-xgettext -syntax camlp4o toto.ml -> toto.pop

This will allow incremental extraction and will work nicely with ocamlbuild.