[Omake] Problem computing dependencies for byte code applications
Aleksey Nogin
anogin at hrl.com
Fri Nov 16 13:35:46 PST 2007
On 16.11.2007 13:27, Markus Mottl wrote:
> We want a rule that looks roughly as follows:
>
> %.bc: %.cmo
> (* link %.cmo and all .cmo files in the local directory that are a a
> dependency of %.cmo *)
>
> The problem is, however, that the other .cmo files aren't really
> dependencies of %.cmo, because .cmo-files depend only on .cmi files
> due to fully separate compilation.
So, what happens if you try to collect all the .cmi dependencies and
then replace the suffixes to .cmo? This would probably require a custom
.SCANNER rule to produce the dependencies, but such rule should be easy
to write - you could make the original .cmo the dependency of the
.SCANNER rule, so the rule would only have, again, to ask for all the
.cmi dependencies of the original .cmo and replace the suffixes - so you
should be able to write it with just a few lines of OMake code.
Aleksey
--
Aleksey Nogin, Research Scientist
Advanced Technologies Department, Information & System Sciences Lab
HRL Laboratories, LLC, Malibu, CA
More information about the Omake
mailing list