File targets can't be directories
This is currently by design, but will need to be dealt with. Need to distinguish between cases where directories represent list targets (#8) to when they are something like an unpacked shapefile and pointing at a single file makes no sense.
For the first case, just need to implement list targets :). For the second case, need to recursively hash the whole directory I think. That has the potential to be very slow though, so probably worth holding off until different hash options are available.
Also need to keep in mind that all files inside this directory depend on that directory:
targets:
./some_dir:
command: fill_directory(target_name)
result:
command: compute_result("some_dir/some_file/in/dir.txt")
The result target would trigger the some_dir target.
Do you think it's possible to add this extension to the current code base without stirring it up too much?
It would be good to see if it could be made to work. This was always a huge frustration working with make, and I think it's a common use case. I think it could be incorporated into the current code without causing too much havoc
Also, rules may cause conflicts now:
targets:
./some_dir:
command: fill_directory(target_name)
./some_dir/subdir:
command: fill_directory(target_name)
I'd expect the two rules to be incompatible, because some_dir is fully described by the first rule. You still should be able to depend on files and dir under some_dir, though.