X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/f59197b8fdbaa71c7272046f0f35dedd3aa04708..9251f2089dccabc78a6275b4cc921934ef53a869:/dist/Devel-PPPort/devel/mktodo.pl diff --git a/dist/Devel-PPPort/devel/mktodo.pl b/dist/Devel-PPPort/devel/mktodo.pl index d3aeab2..32c284b 100644 --- a/dist/Devel-PPPort/devel/mktodo.pl +++ b/dist/Devel-PPPort/devel/mktodo.pl @@ -213,6 +213,9 @@ if ($opt{check}) { my $r = run(qw(make test)); + # This regenerated apicheck.c + dump_apicheck() if $opt{debug}; + $r->{didnotrun} and die "couldn't run make test: $!\n" . join('', @{$r->{stdout}})."\n---\n".join('', @{$r->{stderr}}); @@ -265,6 +268,23 @@ sub regen_apicheck unlink qw(apicheck.c apicheck.o); runtool({ out => '/dev/null' }, $fullperl, 'apicheck_c.PL', map { "--api=$_" } @_) or die "cannot regenerate apicheck.c\n"; + dump_apicheck() if $opt{debug}; +} + +sub dump_apicheck +{ + my $apicheck = "apicheck.c"; + my $f = new IO::File $apicheck or die "cannot open $apicheck: $!\n"; + my @lines = <$f>; + print STDERR __FILE__, ": ", __LINE__, ": $apicheck (", + scalar @lines, + " lines) for $fullperl"; + print STDERR " and '" if @_; + print STDERR join "', '", @_; + print STDERR "'" if @_; + print STDERR ":\n"; + my $n = 1; + print STDERR $n++, " ", $_ for @lines; } sub load_todo