automake
[Top][All Lists]
Advanced

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

robustifying remove_distdir?


From: David Fang
Subject: robustifying remove_distdir?
Date: Fri, 30 Jun 2006 15:47:57 -0400 (EDT)

Hi,
        I'm have a strange problem with automake-1.9.5, where
"make dist" is dying at the very end on $(am__remove_distdir) because
the "rm -rf" fails.

{ test ! -d myproj || { find myproj -type d ! -perm -200 -exec chmod u+w {} ';' 
&&
rm -fr myproj; }; }
rm: cannot remove directory `myproj/test/parser/connect': Directory not empty
rm: cannot remove directory `myproj/test/parser/flow': Directory not empty
rm: cannot remove directory `myproj/test/parser/param': Directory not empty
rm: cannot remove directory `myproj/test/parser/process': Directory not empty

Where:
am__remove_distdir = \
  { test ! -d $(distdir) \
    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
         && rm -fr $(distdir); }; }

Looking inside the remnants of the distdir, I find that files named
towards the end of the alphabetical ordering failed to be removed, likely
an artifact of the shell or file system?  (Yes, there are *hundreds* of
files in those dist-directories.) This has happened to me occasionally on
FreeBSD, linux, and Darwin (nondeterminstically).  By hand, one ends up
"rm -rf"-ing several times until removal succeeds.

Is there a way of making the "rm -rf" more robust?  Maybe with some sort
of "while distdir exists, try removing" loop?


David Fang
Computer Systems Laboratory
Electrical & Computer Engineering
Cornell University
http://www.csl.cornell.edu/~fang/
        -- (2400 baud? Netscape 3.0?? lynx??? No problem!)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]