[Omake] -exists and dependencies
Aleksey Nogin
nogin at metaprl.org
Mon Sep 24 11:30:00 PDT 2007
On 24.09.2007 10:26, Mike Furr wrote:
> Aleksey Nogin wrote:
>> So the second dependency of test.cmx is a "exists" property of test.mli
>> (if test.cmx is built in absence of test.mli and later test.mli is
>> created, the "exists" dependency changes and the test.cmx is no longer
>> considered up-to-date). Obviously, the "exists" property always exists.
>
> Ok, but this is not what the documentation says the functions does:
>
> "The file-exists function checks whether the files listed exist."
Right, but you are not listing any files here! Basically you are asking
if the "virtual" file "exists property of test.mli" exists. Well, it
sort of does... Note that in the rule
foo: test.cmx
... $(dependencies-all test.cmx) ...
all the dependencies of test.cmx must already be built. So, calling
filter-exists on it is misleading - what you really want is to filter
the "normal" file dependencies, while filtering out all the other
"virtual" dependencies (phony, scanner, "exists", etc). The
"file-exists" test is simply not the same as "file-is-normal" that you
actually need (but is currently missing in OMake).
Aleksey
More information about the Omake
mailing list