[Omake] individual compilation
Aleksey Nogin
anogin at hrl.com
Wed May 16 09:37:12 PDT 2007
On 15.05.2007 21:34, Anastasia Gornostaeva wrote:
> The problem is that i cannot use camlp4 for all *.ml but i cannot get how to
> specify indifidyal compilation. I figured out only how to specify individual
> generating of depedency:
> .SCANNER: scan-ocaml-c.ml:
> ocamlfind ocamldep -syntax camlp4o -package ulex,otherlib c.ml
Normally, you need to use the "section" construct to create a separate
scope where a part of the compilation environment is redefined:
section
OCAMLFINDFLAGS += -syntax camlp4o
# tie specific targets to this section
c.cmx c$(EXT_OBJ):
c.cmo:
c.cmi:
Note that the values of the variables (like the OCAMLFINDFLAGS) do not
propagate outside from the indentation blocks (like the section block
above), unless you specifically request it. So in the above code, the
value of the OCAMLFINDFLAGS variable is automatically restored to the
original value (without camlp4) once the "section" ends.
For more information, see the "Scoping, sections" section of the
documentation -
http://omake.metaprl.org/omake-language.html#section:section
Aleksey
--
Aleksey Nogin, Research Staff Member
Advanced Technologies Department, Information & System Sciences Lab
HRL Laboratories, LLC, Malibu, CA
More information about the Omake
mailing list