On Sep 27, 2012, at 10:53 AM, Nicolas Desprès <
nicolas...@gmail.com> wrote:
> […] It prints what you can pass as argument to ninja. It is mainly useful for implementing shell completion.
I see (that it was written with that in mind). In this case, I suggest a variant of ‘all’, e.g.:
ninja -t targets callable # for shell completion
ninja -t targets all # return *all* targets
> […] If you want to remove all generated files you can use ninja -t clean or just remove the build directory.
I think you missed my explanation of what I was doing, quoting myself:
> I recently updated my meta build system so that when build.ninja
> is regenerated it removes all files which were created using the
> old build file, but which no longer have a target using the new
> build file.
So imagine you have a source tree and you rename “image.tiff” to “image.png”.
After this, build.ninja is automatically updated to now copy “image.png” to the build directory and “ninja -t clean” will _not_ remove “image.tiff” from the build directory (as that is now unknown).
Sure, you _could_ remove the entire build directory after such change, but these changes can happen while switching branches, or you just might forget. For example if I remove a framework from my source tree I may forget that some header file was generated from this framework (placed into the build directory) and some other source, which hasn’t been removed, includes this generated file — my build will continue to work until I remove the entire build directory (something I am unlikely to do), hence why it is important that the build system catches these things.