[Omake] Passing full target paths to compilers

Aleksey Nogin nogin at cs.caltech.edu
Sat Jun 10 11:37:27 PDT 2006


On 10.06.2006 06:43, Benjamin Pierce wrote:

> Since my project involves OCaml files in several directories, I want  to 
> invoke the OCaml compiler with the full absolute pathname of each  
> source .ml file, so that error messages will be printed in a way that  
> emacs can interpret, no matter where I do the compilation from. 

Are full paths really necessary for that? OMake understands make's "-w" 
command-line option, and I was under impression that this is sufficient 
(I do not use emacs myself, so I am not 100% sure).

> (I tried the obvious one -- changing
> 
>    OCamlProgram($(RESULT), $(rootname $(SOURCES)))
> 
> to
> 
>    OCamlProgram($(RESULT), $(absname $(rootname $(SOURCES))))
> 
> but this seems to have no effect.)
> 
Right:
- This call does not create the %.cmx: %.ml rules (it just takes 
advantage of the already existing rules), so adding an explicit absname 
would not affect the compilation step

- By default, OCamlProgram _sorts_ the .cmx/.cmo files (according to the 
dependencies order) to help satisfy OCaml's link ordering requirement, 
and the inputs and outputs of the sorting process are interpreted as files.

-- 
Aleksey Nogin

Home Page: http://nogin.org/
E-Mail: nogin at cs.caltech.edu (office), aleksey at nogin.org (personal)
Office: Moore 04, tel: (626) 395-2200


More information about the Omake mailing list