This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Digest-SHA-5.38.
[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#
0d0f8426 8# $Revision: 10 $
adfe19db 9# $Author: mhx $
0d0f8426 10# $Date: 2006/01/14 23:02:12 +0100 $
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
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
0d0f8426
MHM
54$ENV{SKIP_PPPHTEST} = 1;
55
adfe19db
MHM
56for (@perls) {
57 my $todo = do { my $v = $_->{todo}; $v =~ s/\D+//g; $v };
58 -e "$outdir/$todo" and next;
59 my @args = ('--perl', $_->{path}, '--todo', "$outdir/$todo", '--version', "$_->{todo}");
60 push @args, '--base' if $opt{base};
61 system 'devel/mktodo.pl', @args and die "system(@args): [$!] [$?]\n";
62}