Subject: | clean_subdirs infinite loop if subdir already gone |
Date: | Thu, 23 Dec 2010 09:58:11 +1100 |
To: | bug-ExtUtils-MakeMaker [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
In ExtUtils::MakeMaker 6.57_06 on recent i386 debian 5.10.1, the
clean_subdirs rule goes into an infinite loop if the subdir it's trying
to clean is already gone.
The rule comes out for me as something like
clean_subdirs :
$(ABSPERLRUN) -e 'chdir '\''Foo-123'\''; system '\''$(MAKE) clean'\'' if -f '\''$(FIRST_MAKEFILE)'\'';' --
I think if the chdir fails because there's no such Foo-123 subdir any
more, then it remains in the toplevel dir, where there's still a
Makefile, so a further "make clean" is initiated, which repeats
clean_subdirs, etc.
I struck this when I'd accidentally untarred another dist in a working
dir. On manually removing that offending dir a "make clean" then went
into this loop.
I suppose if a subdir is already gone then that would count as success
for cleaning it. But perhaps other errors from chdir, like no perms to
visit the dir any more, or some system I/O error, might make the rule
fail, in the interests of not letting badness go undetected.