This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Avoid make distclean failing if t/tmp* matches a directory.
authorNicholas Clark <nick@ccl4.org>
Mon, 16 May 2011 11:17:21 +0000 (12:17 +0100)
committerNicholas Clark <nick@ccl4.org>
Thu, 19 May 2011 08:25:21 +0000 (09:25 +0100)
Some of the tests in t/ make directories with names generated by the test.pl
tempfile(), and if they exit abnormally without deleting them, this would cause
distclean to fail. So change `rm -f t/tmp*` to `rm -rf t/tmp*`

Remove other cruft from the same line in the Makefile.
t/misctmp* hasn't been generated since 7a7e49369367a634.
t/forktmp* hasn't been generated since 1c25d394345c1b97.
t/io/fs.t has deleted t/c itself since 44a8e56aa037ed0f.
(Whilst it might abort and fail to delete it, there's no special treatment
in the Makefile for the other file that it creates, "t/TEST$$")

Cross/Makefile-cross-SH
Makefile.SH

index 756538d..e555ba7 100644 (file)
@@ -991,7 +991,8 @@ _cleaner1:
 _cleaner2:
        -rm -f core.*perl.*.? t/core.perl.*.? .?*.c
        rm -f core *perl.core t/core t/*perl.core core.* t/core.*
-       rm -f t/misctmp* t/forktmp* t/tmp* t/c t/perl$(EXE_EXT) t/rantests
+       rm -f t/perl$(EXE_EXT) t/rantests
+       rm -rf t/tmp*
        rm -f so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR)
        rm -rf $(addedbyconf)
        rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old makefile.old
index 5be2863..217a035 100755 (executable)
@@ -1259,7 +1259,8 @@ _cleaner1:
 _cleaner2:
        -rm -f core.*perl.*.? t/core.perl.*.? .?*.c
        rm -f core *perl.core t/core t/*perl.core core.* t/core.*
-       rm -f t/misctmp* t/forktmp* t/tmp* t/c t/$(PERL_EXE) t/rantests
+       rm -f t/$(PERL_EXE) t/rantests
+       rm -rf t/tmp*
        rm -f so_locations $(LIBPERL_NONSHR) $(MINIPERL_NONSHR)
        rm -rf $(addedbyconf)
        rm -f $(FIRSTMAKEFILE) $(FIRSTMAKEFILE).old makefile.old