[Omake] preprocessing and profiling in omake
Aleksey Nogin
anogin at hrl.com
Wed Sep 26 09:39:23 PDT 2007
Sean,
It would probably be a bit easier to do one of the following:
- Use camlp4 for profiling. It's Camlp4Filters/Camlp4Profiler in 3.10
- Use foo.ppo instead of foo_pp.ml. Note that you can probably also
use binary AST dumps (pr_dump in old camlp4), instead of pretty-printed
.ml, which would be faster.
The issue with introducing a rule like
%.cmo: %_pp.cmo
ln-or-cp $< $@
is that it will make it very easy to put OMake into an infinite loop
(foo.cmo, foo_pp.cmo, foo_pp_pp.cmo) ...
Aleksey
On 26.09.2007 07:33, Sean Li wrote:
> I'm having difficulty trying to combine preprocessing and profiling in
> Omake. ocamlcp does not take the -pp option so I need to use camlp4o to
> create a new foo_pp.ml file from foo.ml <http://foo.ml> without need for
> preprocessing, call ocamlcp on this, and use the subsequent compiled
> files. However, because I might have files that depend on other files
> that might need preprocessing and profiling, I cannot just compile the
> new .ml file since its basename is not the same.
>
> I have tried adding a foo_pp.cmo dependencies where I have also created
> a rule, %_pp.ml that pipes the camlp4o output to the new file. However,
> I'm stuck at the last step where I need to override the actual build
> rule of foo.cmo to make it move foo_pp.cmo to foo.cmo. Any help would
> be greatly appreciated.
--
Aleksey Nogin, Research Scientist
Advanced Technologies Department, Information & System Sciences Lab
HRL Laboratories, LLC, Malibu, CA
More information about the Omake
mailing list