2 require 5.003; # keep this compatible, an old perl is all we may have before
5 # The idea is to move the regen_headers target out of the Makefile so that
6 # it is possible to rebuild the headers before the Makefile is available.
7 # (and the Makefile is unavailable until after Configure is run, and we may
8 # wish to make a clean source tree but with current headers without running
14 # keep warnings.pl in sync with the CPAN distribution by not requiring core
16 # safer_unlink ("warnings.h", "lib/warnings.pm");
19 'autodoc.pl' => [qw[pod/perlapi.pod pod/perlintern.pod]],
20 'embed.pl' => [qw[proto.h embed.h embedvar.h global.sym
21 perlapi.h perlapi.c]],
22 'keywords.pl' => [qw[keywords.h]],
23 'opcode.pl' => [qw[opcode.h opnames.h pp_proto.h pp.sym]],
24 'regcomp.pl' => [qw[regnodes.h]],
25 'warnings.pl' => [qw[warnings.h lib/warnings.pm]],
26 'reentr.pl' => [qw[reentr.c reentr.h]],
27 'overload.pl' => [qw[overload.h]],
33 for my $f (@{ $gen{$pl} }) {
37 $cksum{$f} = unpack("%32C*", <FH>);
46 foreach my $pl (qw (keywords.pl opcode.pl embed.pl
47 regcomp.pl warnings.pl autodoc.pl reentr.pl)) {
48 my @command = ($^X, $pl, @ARGV);
51 %cksum0 = do_cksum($pl) unless $pl eq 'warnings.pl'; # the files were removed
53 next if $pl eq 'warnings.pl'; # the files were removed
54 my %cksum1 = do_cksum($pl);
56 for my $f (@{ $gen{$pl} }) {
58 if !defined($cksum0{$f}) ||
59 !defined($cksum1{$f}) ||
60 $cksum0{$f} ne $cksum1{$f};
62 print "Changed: @chg\n" if @chg;