From: Nicholas Clark Date: Fri, 22 Oct 2010 20:10:15 +0000 (+0100) Subject: Remove cruft from B's Makefile.PL X-Git-Tag: accepted/trunk/20130322.191538~7222 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a46fe99d0b8e1b85f7c17c5c73894e520adbf9e;p=platform%2Fupstream%2Fperl.git Remove cruft from B's Makefile.PL $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. --- diff --git a/ext/B/Makefile.PL b/ext/B/Makefile.PL index 123c624..594e71e 100644 --- a/ext/B/Makefile.PL +++ b/ext/B/Makefile.PL @@ -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