This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
make require report too many open files error
[perl5.git] / ext / Devel / PPPort / devel / mktodo
CommitLineData
adfe19db
MHM
1#!/usr/bin/perl -w
2################################################################################
3#
4# mktodo -- generate baseline and todo files by running mktodo.pl
5#
6################################################################################
7#
0c96388f 8# $Revision: 12 $
adfe19db 9# $Author: mhx $
0c96388f 10# $Date: 2006/05/25 17:22:31 +0200 $
adfe19db
MHM
11#
12################################################################################
13#
0d0f8426 14# Version 3.x, Copyright (C) 2004-2006, Marcus Holland-Moritz.
adfe19db
MHM
15# Version 2.x, Copyright (C) 2001, Paul Marquess.
16# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
17#
18# This program is free software; you can redistribute it and/or
19# modify it under the same terms as Perl itself.
20#
21################################################################################
22
23use strict;
24use Getopt::Long;
25
0c96388f
MHM
26require 'devel/devtools.pl';
27
28our %opt = (
29 base => 0,
30 verbose => 0,
adfe19db
MHM
31);
32
33GetOptions(\%opt, qw(
34 base
0c96388f 35 verbose
adfe19db
MHM
36 )) or die;
37
0c96388f
MHM
38identify();
39
adfe19db
MHM
40# my $outdir = $opt{base} ? 'parts/base' : 'parts/todo';
41my $outdir = 'parts/todo';
42
43# for (glob "$outdir/*") {
44# unlink or die "$_: $!\n";
45# }
46
47my $install = '/tmp/perl/install/default';
48# my $install = '/tmp/perl/install/thread';
49
50my @perls = sort { $b->{version} <=> $a->{version} }
51 map { { version => `$_ -e 'printf "%.6f", \$]'`, path => $_ } }
52 ('bleadperl', glob "$install/*/bin/perl5.*");
53
54for (1 .. $#perls) {
55 $perls[$_]{todo} = $perls[$_-1]{version};
56}
57
58shift @perls;
59
60for (@perls) {
61 my $todo = do { my $v = $_->{todo}; $v =~ s/\D+//g; $v };
62 -e "$outdir/$todo" and next;
63 my @args = ('--perl', $_->{path}, '--todo', "$outdir/$todo", '--version', "$_->{todo}");
64 push @args, '--base' if $opt{base};
0c96388f
MHM
65 push @args, '--verbose' if $opt{verbose};
66 runperl('devel/mktodo.pl', @args) or die "error running mktodo.pl [$!] [$?]\n";
adfe19db 67}
0c96388f 68