3 use ExtUtils::MakeMaker;
6 print 'Checking for valgrind >= 3.1.0 in PATH... ';
7 for (split /:/, $ENV{PATH}) {
8 my $vg = $_ . '/valgrind';
10 my $ver = qx/$vg --version/;
11 if ($ver =~ s/^valgrind-//) {
12 $ver = join '', map chr, split /\./, $ver;
26 my $BUILD_REQUIRES = {
27 'ExtUtils::MakeMaker' => 0,
32 my $tometa = ' >> $(DISTVNAME)/META.yml;';
33 my $build_req = 'echo "build_requires:" ' . $tometa;
34 foreach my $mod ( sort { lc $a cmp lc $b } keys %$BUILD_REQUIRES ) {
35 my $ver = $BUILD_REQUIRES->{$mod};
36 $build_req .= sprintf 'echo " %-30s %s" %s', "$mod:", $ver, $tometa;
41 my $supp = 'Test/Valgrind/perlTestValgrind.supp';
44 NAME => 'Test::Valgrind',
45 AUTHOR => 'Vincent Pit <perl@profvince.com>',
47 VERSION_FROM => 'lib/Test/Valgrind.pm',
48 ABSTRACT_FROM => 'lib/Test/Valgrind.pm',
49 PL_FILES => { './Gensupp.PL' => 'lib/' . $supp },
51 'lib/Test/Valgrind.pm'
52 => '$(INST_LIB)/Test/Valgrind.pm',
53 'lib/Test/Valgrind/Suppressions.pm'
54 => '$(INST_ARCHLIB)/Test/Valgrind/Suppressions.pm',
55 'lib/' . $supp => '$(INST_ARCHLIB)/' . $supp,
64 PREOP => 'pod2text lib/Test/Valgrind.pm > $(DISTVNAME)/README; '
66 COMPRESS => 'gzip -9f', SUFFIX => 'gz',
68 clean => { FILES => "Test-Valgrind-* lib/$supp *.gcov *.gcda *.gcno cover_db" },
70 1 while unlink 'lib/' . $supp;