X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FB%2FMakefile.PL;h=d39d3b5f9c5e9c9b65f2f70fddb5952594115ca1;hb=7dadce444419cb5cc2a17faf09d9ea75a7e4b67b;hp=cb9696bf41645f4be98a537b0a0622033492c271;hpb=146174a91a192983720a158796dc066226ad0e55;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/B/Makefile.PL b/ext/B/Makefile.PL index cb9696b..d39d3b5 100644 --- a/ext/B/Makefile.PL +++ b/ext/B/Makefile.PL @@ -1,5 +1,6 @@ use ExtUtils::MakeMaker; use Config; +use File::Spec; my $e = $Config{'exe_ext'}; my $o = $Config{'obj_ext'}; @@ -14,14 +15,14 @@ if ($^O eq 'MSWin32') { } WriteMakefile( - NAME => "B", - VERSION => "a5", - PL_FILES => { 'defsubs_h.PL' => 'defsubs.h' }, - MAN3PODS => {}, - clean => { - FILES => "perl$e *$o B.c defsubs.h *~" + NAME => "B", + VERSION_FROM => "B.pm", + PL_FILES => { 'defsubs_h.PL' => 'defsubs.h' }, + MAN3PODS => {}, + clean => { + FILES => "perl$e *$o B.c defsubs.h *~" } -); +); package MY; @@ -29,8 +30,19 @@ sub post_constants { "\nLIBS = $Config::Config{libs}\n" } -sub postamble { -' -B$(OBJ_EXT) : defsubs.h -' +sub upupfile { + File::Spec->catfile(File::Spec->updir, + File::Spec->updir, $_[0]); +} + +sub MY::postamble { + my $op_h = upupfile('op.h'); + my $cop_h = upupfile('cop.h'); + my $noecho = shift->{NOECHO}; +" +B\$(OBJ_EXT) : defsubs.h + +defsubs.h :: $op_h $cop_h + $noecho \$(NOOP) +" }