Add a command-line flag --autoclean which goes through all file in the output directory and checks if their path would match a build recipe. Then deletes the file. Then finally deletes .werk-cache.
Needed clarifications:
- Should files listed in
.werk-cache, but which don't match a build recipe (i.e. they come from a previous build) also be deleted?
- Should depfiles be deleted as well? Doing so would require evaluating the build recipe bodies in addition to checking if the pattern is a match.
Add a command-line flag
--autocleanwhich goes through all file in the output directory and checks if their path would match a build recipe. Then deletes the file. Then finally deletes.werk-cache.Needed clarifications:
.werk-cache, but which don't match a build recipe (i.e. they come from a previous build) also be deleted?