Remove cruft from B's Makefile.PL
authorNicholas Clark <nick@ccl4.org>
Fri, 22 Oct 2010 20:10:15 +0000 (21:10 +0100)
committerNicholas Clark <nick@ccl4.org>
Fri, 22 Oct 2010 20:10:15 +0000 (21:10 +0100)
$noecho is unused since 70c68212ed57a5a0 (in 2005)
$e and $exeout_flag are unused since e8edd1e67bd80dbb (in 1999)
All the clean FILES apart from 'defsubs.h' are vestigial or duplicate defaults.
The rule for LIBS created by post_constants() seems superfluous.

ext/B/Makefile.PL

index 123c624..594e71e 100644 (file)
@@ -1,40 +1,23 @@
 use ExtUtils::MakeMaker;
-use Config;
 use File::Spec;
-
-my $e = $Config{'exe_ext'};
-my $o = $Config{'obj_ext'};
-my $exeout_flag = '-o ';
 my $core = grep { $_ eq 'PERL_CORE=1' } @ARGV;
-if ($^O eq 'MSWin32') {
-    if ($Config{'cc'} =~ /^cl/i) {
-       $exeout_flag = '-Fe';
-    }
-    elsif ($Config{'cc'} =~ /^bcc/i) {
-       $exeout_flag = '-e';
-    }
-}
 
 WriteMakefile(
     NAME           => "B",
     VERSION_FROM    => "B.pm",
     PL_FILES       => { 'defsubs_h.PL' => 'defsubs.h' },
     clean          => {
-       FILES       => "perl$e *$o B.c defsubs.h *~"
+       FILES       => "defsubs.h"
     }
 );
 
 package MY;
-
-sub post_constants {
-    "\nLIBS = $Config::Config{libs}\n"
-}
-
 sub headerpath {
     if ($core) {
        return File::Spec->catdir(File::Spec->updir,
                                   File::Spec->updir);
     } else {
+       require Config;
        return File::Spec->catdir($Config::Config{archlibexp}, "CORE");
     }
 }
@@ -42,7 +25,6 @@ sub headerpath {
 sub MY::postamble {
     my $headerpath = headerpath();
     my @headers = map { File::Spec->catfile($headerpath, $_) } qw(op.h cop.h);
-    my $noecho = shift->{NOECHO};
 
 "
 B\$(OBJ_EXT) : defsubs.h