tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Changing "make clean" and "make cleandir"



On Thu, 08 Sep 2011, Alan Barrett wrote:
Have you tried it on a read-only source tree?

Does it appropriately fail when it can't remove a file it should have?

The current draft just does "rm -f". If the source tree is read-only but contains files that should be removed, it will silently fail to remove those files.

I hadn't actually tested that. When I do test it, what happens on NetBSD is that "rm -f file_that_exists" complains about a read-only file system, and causes the "make cleandir" to fail.

I can add code to test whether any files remain after the "rm -f", and to fail if so. Checking for empty output from ls should do it.

I still think that this may be worthwhile, in case the build host has a "rm" command that behaves differently.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index