X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=Makefile.PL;h=1d37fb9cc8b427147f5454fbea4ed6a39c890012;hb=8e236cf7f5ac06829edb65527fcdf12716ecd159;hp=62522ed70ce9a569008359466ec6adbced371ca4;hpb=41a4b907f4846f2d35b170f517fb83ceb13f298c;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/Makefile.PL b/Makefile.PL index 62522ed..1d37fb9 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -3,9 +3,10 @@ use warnings; use ExtUtils::MakeMaker; my $has_vg = 0; +my $vg; print 'Checking for valgrind >= 3.1.0 in PATH... '; for (split /:/, $ENV{PATH}) { - my $vg = $_ . '/valgrind'; + $vg = $_ . '/valgrind'; if (-x $vg) { my $ver = qx/$vg --version/; if ($ver =~ s/^valgrind-//) { @@ -38,7 +39,17 @@ sub build_req { return $build_req; } -my $supp = 'Test/Valgrind/perlTestValgrind.supp'; +my $supp = 'lib/Test/Valgrind/Suppressions'; +open my $tpl, '<', $supp . '.tpl' or die "open($supp.tpl): $!"; +open my $out, '>', $supp . '.pm' or die "open($supp.pm): $!"; +while (<$tpl>) { + s/(VG_PATH\s*=>\s*)undef/$1'$vg'/g; + print $out $_; +} +close $out; +close $tpl; + +$supp = 'Test/Valgrind/perlTestValgrind.supp'; WriteMakefile( NAME => 'Test::Valgrind', @@ -55,10 +66,11 @@ WriteMakefile( 'lib/' . $supp => '$(INST_ARCHLIB)/' . $supp, }, PREREQ_PM => { - 'Carp' => 0, - 'Exporter' => 0, - 'POSIX' => 0, - 'Test::More' => 0, + 'Carp' => 0, + 'Exporter' => 0, + 'POSIX' => 0, + 'Perl::Destruct::Level' => 0, + 'Test::More' => 0, }, dist => { PREOP => 'pod2text lib/Test/Valgrind.pm > $(DISTVNAME)/README; '