On 07/27/2011 08:55 AM, Alexandre Raymond wrote:
There are many more object files that are built conditionally. Why is
it okay not to delete them?
Perhaps they should be deleted too...
The GNU Make manual says the following about "distclean":
http://www.gnu.org/s/hello/manual/make/Standard-Targets.html
"Delete all files in the current directory (or created by this
makefile) that are created by configuring or building the program. If
you have unpacked the source and built the program without creating
any other files, ‘make distclean’ should leave only the files that
were in the distribution. However, there is no need to delete parent
directories that were created with ‘mkdir -p’, since they could have
existed anyway. "
Now, if everyone agrees that "distclean" is fine as it is, I won't
insist on anything.
I'm with you in that distclean to me reads as "make clean for
re-distribution". i.e. a pristine source tree.
But I do agree that if we want to implement it in that fashion there
would be a bit more work to do.
If you unwisely messed up your source tree by building in it, a simple
and reliable way out is to git-clone yourself a new one. Or if you
insist on recovering in-place, remove files outside .git that aren't in
git.
Indeed.
Alexandre