std.Build.Step.WriteFile: fix handling of directories

and add file system watching integration.

`addDirectoryWatchInput` now returns a `bool` which helps remind the
caller to
1. call addDirectoryWatchInputFromPath on any derived paths
2. but only if the dependency is not already captured by a step
   dependency edge.

The make function now recursively walks all directories and adds the
found files to the cache hash rather than incorrectly only adding the
directory name to the cache hash.

closes #20571
a966eee090Andrew Kelley committed on 7/12/2024, 7:14:08 AMparentf285640
3 files changedLine totals unavailable