This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Devel::PPPort 3.00.
[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#
8# $Revision: 7 $
9# $Author: mhx $
10# $Date: 2004/08/13 12:50:23 +0200 $
11#
12################################################################################
13#
14# Version 3.x, Copyright (C) 2004, Marcus Holland-Moritz.
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
26my %opt = (
27 base => 0,
28);
29
30GetOptions(\%opt, qw(
31 base
32 )) or die;
33
34# my $outdir = $opt{base} ? 'parts/base' : 'parts/todo';
35my $outdir = 'parts/todo';
36
37# for (glob "$outdir/*") {
38# unlink or die "$_: $!\n";
39# }
40
41my $install = '/tmp/perl/install/default';
42# my $install = '/tmp/perl/install/thread';
43
44my @perls = sort { $b->{version} <=> $a->{version} }
45 map { { version => `$_ -e 'printf "%.6f", \$]'`, path => $_ } }
46 ('bleadperl', glob "$install/*/bin/perl5.*");
47
48for (1 .. $#perls) {
49 $perls[$_]{todo} = $perls[$_-1]{version};
50}
51
52shift @perls;
53
54for (@perls) {
55 my $todo = do { my $v = $_->{todo}; $v =~ s/\D+//g; $v };
56 -e "$outdir/$todo" and next;
57 my @args = ('--perl', $_->{path}, '--todo', "$outdir/$todo", '--version', "$_->{todo}");
58 push @args, '--base' if $opt{base};
59 system 'devel/mktodo.pl', @args and die "system(@args): [$!] [$?]\n";
60}