Fix distclean for "pm_to_blib directly" extensions.
authorCraig A. Berry <craigberry@mac.com>
Sun, 21 Sep 2014 22:36:27 +0000 (17:36 -0500)
committerCraig A. Berry <craigberry@mac.com>
Mon, 22 Sep 2014 01:35:18 +0000 (20:35 -0500)
The values of the %pm hash already have ../../ prepended, so we
were trying to remove, for example, ../../../../lib/Exporter.pm
instead of ../../lib/Exporter.pm.

This fixes [perl #122820] wherein it was reported that a distclean
make left some build products under lib/.

make_ext.pl

index f19bf18..b855c63 100644 (file)
@@ -719,7 +719,7 @@ sub just_pm_to_blib {
             # (which it has to deal with, as cpan/foo/bar creates
             # lib/auto/foo/bar, but the EU::MM rule will only
             # rmdir lib/auto/foo/bar, leaving lib/auto/foo
-            _unlink("../../$_")
+            _unlink($_)
                 foreach sort values %pm;
         }
     }