[Omake] implicit rules with different scopes
Alain Frisch
alain.frisch at lexifi.com
Tue Oct 2 13:41:55 PDT 2007
Matthieu Dubuget wrote:
> I can't figure out a simple way to have both: special scope for some
> files, but still using implicit rules?
>
> For example, I would like to let OMake apply implicit rules with a
> special environment (for example special OCAMLFLAGS) when working with
> file1.ml and apply the same implicit rules with another environment when
> working with file2.ml.
I think you can do something like:
section
OCAMLFLAGS=....
file1.cmx file1$(EXT_OBJ):
file1.cmo:
file1.cmo:
section
OCAMLFLAGS=....
file2.cmx file2$(EXT_OBJ):
file2.cmo:
file2.cmo:
That is, simply writing a rule with an empty body and with the same
targets than those of the instance of an implicit rule attaches the
current environment to this instance. I could not find it mentioned in
the manual, but it seems to work (you can also add extra dependencies).
-- Alain
More information about the Omake
mailing list