[Omake] Dependencies on generated tools
Jonathan Roewen
jonathan.roewen at gmail.com
Mon Apr 9 15:47:54 PDT 2007
Why do you need the if tests? (Not that I use ocamlopt...)
Afaik, you can use either ocamlc or ocamlopt to compile .mli files to
.cmi files for both native & bytecode modes.
Jonathan
On 4/10/07, Aleksey Nogin <anogin at hrl.com> wrote:
> On 08.04.2007 21:59, Nathaniel Gray wrote:
>
> > You can use LocalOCamlGeneratedFiles($(OCAMLC)) in every subdir *except* for the toolchain subdir.
>
> Note that this would be a bit too aggressive (since this defines a
> dependency for the _scanner_ rules, but the scanner rules do not really
> care about OCAMLC), so this is probably not what you want. Also, as
> Nathan said, LocalOCamlGeneratedFiles is likely to go away once the
> OCAMLDEP_MODULES stuff is working.
>
> However, if you did want it, you should know that the
> LocalOCamlGeneratedFiles stuff is scoped like everything else, so you
> could define it right after ".SUBDIRS: toolchain" and have it be
> inherited by other subdirs.
>
> > In fact, I think this would work just as well (though I
> > haven't tested it and my omake-fu is not terribly strong):
> > .SUBDIRS: toolchain
> > . . .
> > # After the toolchain subdir but before the others
> > %.cmi: $(OCAMLC)
> > %.cmx %.cmo: $(OCAMLC)
> >
> Yes, the implicit dependencies is the proper way of doing that. If you
> are overriding both OCAMLOPT and OCAMLC, then you probably want
> something like
>
> .SUBDIRS: toolchain
> ...
>
> %.cmo: $(OCAMLC)
> %.cmx: $(OCAMLOPT)
> if $(BYTE_ENABLED)
> %.cmi: $(OCAMLC)
> export
> if $(NATIVE_ENABLED)
> %.cmi: $(OCAMLOPT)
> export
>
> Note that the implicit dependencies are scoped in the normal fashion, so
> you need the "export" statements above.
>
> Aleksey
>
> --
> Aleksey Nogin, Research Staff Member
> Advanced Technologies Department, Information & System Sciences Lab
> HRL Laboratories, LLC, Malibu, CA
> _______________________________________________
> Omake mailing list
> Omake at metaprl.org
> https://lists.metaprl.org/mailman/listinfo/omake
>
More information about the Omake
mailing list