[Omake] depending on the contents of a directory
Mike Furr
furr at cs.umd.edu
Sun Aug 26 08:32:37 PDT 2007
Aleksey Nogin wrote:
> Unfortunately, even in 0.9.8.5 there is still no syntax to access a
> field of an anonymous object.
>
> You need to do something like
>
> TEST_DIR = $(dir [...])
> mtime(d) =
> s = $(stat $d)
> return $(s.mtime)
Ugh, that's unfortunate. :-(
> ... :value: $(mtime $(TEST_DIR))
>
> Alternatively, you can add a regular dependency on $(glob
> $(TEST_DIR)/*), which would be more precise, but less efficient.
Thanks for your suggestions Aleksey. However, it appears that neither
of these are doing quite what I had hoped for (although the glob
solution is sufficient at this point). In particular, the result of the
glob and mtime and never recomputed. So, if I have "omake -P" running,
it won't notice any new or removed files from the directory. This isn't
really a big problem, but it would be nice to have so that I wouldn't
ever have to restart omake :-D. I also tried adding a regular
dependency on $(TEST_DIR), but this didn't seem to work (but seems like
the most likely candidate to have these semantics, since directories are
just files). Is there a way to achieve this?
Thanks again,
-Mike
More information about the Omake
mailing list