[Omake] race condition in omake?

Aleksey Nogin nogin at metaprl.org
Thu Dec 21 14:20:19 PST 2006


On 21.12.2006 12:14, Nathaniel Gray wrote:

> Also, I don't know if omake's dependency analysis engine has a way of 
> coping with the idea of files being *removed* rather than created. 

No, the assumption is that the build state is "monotone" - the target 
files are created once by the appropriate rules and then are never 
changed. There are some exceptions to that (The side-effects that are 
not also targets - that is not anybody's dependencies - can be affected 
by several different rules and OMake would not mind; it would just make 
sure that these rules do not ever run simultaneously), but the deletion 
is not something OMake understands.

If we really wanted to support the "omake clean main" model (without 
modifying OMake in a major way), then we'd have to augment every rule of 
the form

clean:
   rm -f *.cmi

with something like

if $(mem clean, $(TARGETS))
    %.cmi: clean
    export

but this is a huge hack and will only work right if the "clean" target 
is given on the command line literally (but would break if, for example, 
we create a realclean target that depends on clean and that use 
realclean in the command line).

Aleksey


More information about the Omake mailing list