Joel VanderWerf wrote: > Is it possible to have a rule which has a prerequisite specified by a > proc and also a FileList? I can use several procs, as a workaround: > > generic_files = [proc {"foo"}, proc {"bar"}, proc {"baz"}] > rule /^site_\w+/ => [ > proc {|fn| site_cfg_file(fn)}, > *generic_files > ] do ... end > > > But it would be nice to use a FileList. However, when I try > > generic_files = FileList["foo", "bar", "baz"] > > rake says it doesn't know how to build the task. > > Is there a better way of doing this? Actually that should work. If rake is reporting that it cannot build your task, then probably one of the prerequisites cannot be built. Remember, your rule says that you can build a site_XXX file if the following file (or rules to build the following files) exist: site_cfg_file(fn), "foo", "bar" and "baz". I would check to see if "foo", "bar" and "baz" all exist. -- -- Jim Weirich -- Posted via http://www.ruby-forum.com/.