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 Wed, 07 Sep 2011, Matt Thomas wrote:
> >> I would like to make "make clean" and "make cleandir" delete
> >> leftover files in the source directory as well as the obj
> >> directory. This should help with the case that the current
> >> build uses .OBJDIR != .CURDIR, but an earlier build with
> >> .OBJDIR = .CURDIR had left some output files in the source
> >> directory.
> >
> >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 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.
did you check this? my /usr/src is r/o:
phat-bass /usr/src> rm -f Makefile
rm: Makefile: Read-only file system
phat-bass /usr/src> echo $?
1
.mrg.
Home |
Main Index |
Thread Index |
Old Index