[Omake] Augmenting rules

Hugo Ferreira hmf at inescporto.pt
Fri Mar 23 03:16:46 PDT 2007


Hello,

I have created a rule that allows *.ml sources to be preprocessed and 
this conversion then printed out in the original (*.ppo) and revised 
(*.ppr)  syntax. For example:

%.ppo: %.ml
	section
		CAMLP4 = $(CAMLP4)o
		OCAMLPPFLAGS = -I . pr_o.cmo pa_logic.cmo
		OCAMLDEPFLAGS += $(OCAMLPPFLAGS)
		$(CAMLP4) $(OCAMLPPFLAGS) $*.ml -o $*.ppo

Now I would like to use these output as an input to the compilation. So 
that I could use:

.DEFAULT: test.ppo

FILES = test
PROGRAM = test
OCamlProgram($(PROGRAM), $(FILES))
OCamlLibrary(lib$(PROGRAM), $(FILES))
.DEFAULT: $(PROGRAM).run

Is their a simple way to "augment" all existing rules of "*.ml" so that 
"*.ppo" and "*.ppr" are processed in the exact same manner including 
dependency checks?

TIA.
Hugo F.



More information about the Omake mailing list