2 ################################################################################
4 # mktodo -- generate baseline and todo files by running mktodo.pl
6 # It calls plain 'mktodo' on each perl version it finds based on the input
9 ################################################################################
11 # Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
12 # Version 2.x, Copyright (C) 2001, Paul Marquess.
13 # Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
15 # This program is free software; you can redistribute it and/or
16 # modify it under the same terms as Perl itself.
18 ################################################################################
23 require './devel/devtools.pl';
26 base => 0, # If specified, this will generate base files, not todo ones
27 check => 1, # Do extra checking
29 install => '/tmp/perl/install/default',
30 blead => 'bleadperl-debug',
33 # The way this works, is it expects to find perl binaries for a bunch of
34 # different versions in a given directory. This defaults to the 'install' one
35 # listed above, but is overriddable by the --install parameter. Comma
36 # separating --install allows multiple source directories.
37 # It also uses blead, again with an overridable default.
39 # It first verifies that the test file works properly for blead.
41 # Then it goes through the list of perl binaries sorted in decreasing order of
42 # version number. If something works in version n, but not in version n-1,
43 # that means it was introduced (or perhaps fixed) in version n, and adds that
44 # thing to the version n list.
46 # After everything is done, we have lists of what got added when. The --base
47 # parameter tells it to not use ppport.h when computing this. Thus we get
48 # what the official perls added when. Without this parameter, we do use
49 # ppport.h, so we get, as patched by ppport.h, what gets added when
51 GetOptions(\%opt, qw( base check! verbose install=s blead=s blead-version=s )) or die;
55 my $outdir = 'parts/todo';
57 my $perls_ref = get_and_sort_perls(\%opt);
59 # Go through all the perls, creating a todo file for it.
61 my $todo = do { my $v = $_->{todo}; $v =~ s/\D+//g; $v };
62 my @args = ('--perl', $_->{path}, '--version', "$_->{todo}");
64 push @args, '--blead' if $_ == $perls_ref->[0]; # First one is blead
65 push @args, '--todo', $_->{'todo'};
66 push @args, '--base' if $opt{base};
67 push @args, '--verbose' if $opt{verbose};
68 push @args, '--nocheck' unless $opt{check};
69 runperl('devel/mktodo.pl', @args) or die "error running mktodo.pl [$!] [$?]\n";