summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-03-19 11:23:58 -0600
committerKarl Williamson <khw@cpan.org>2015-03-19 16:18:00 -0600
commit0c36c41be6ceb31ab6c2cb9eaebf3d1fd7746e21 (patch)
treed5850f492b6dc81db87c81647507b55bfbbf8f64 /regen
parentaf9bd4b5d0228d8d1bc08c845b796b642a2596d9 (diff)
downloadperl-0c36c41be6ceb31ab6c2cb9eaebf3d1fd7746e21.tar.gz
regen/regcharclass.pl: Need to rebuild when source files change
Like regen/mk_invlists.pl, if any of various Unicode-related files change, we can't rely on the generated file remaining unchanged.
Diffstat (limited to 'regen')
-rwxr-xr-xregen/regcharclass.pl21
1 files changed, 20 insertions, 1 deletions
diff --git a/regen/regcharclass.pl b/regen/regcharclass.pl
index 9a83e54331..0e12d8e2ee 100755
--- a/regen/regcharclass.pl
+++ b/regen/regcharclass.pl
@@ -1456,7 +1456,26 @@ EOF
if($path eq '-') {
print $out_fh "/* ex: set ro: */\n";
} else {
- read_only_bottom_close_and_rename($out_fh, [$0])
+ # Some of the sources for these macros come from Unicode tables
+ my $sources_list = "lib/unicore/mktables.lst";
+ my @sources = ($0, qw(lib/unicore/mktables lib/Unicode/UCD.pm));
+ {
+ # Depend on mktables’ own sources. It’s a shorter list of files than
+ # those that Unicode::UCD uses.
+ if (! open my $mktables_list, $sources_list) {
+
+ # This should force a rebuild once $sources_list exists
+ push @sources, $sources_list;
+ }
+ else {
+ while(<$mktables_list>) {
+ last if /===/;
+ chomp;
+ push @sources, "lib/unicore/$_" if /^[^#]/;
+ }
+ }
+ }
+ read_only_bottom_close_and_rename($out_fh, \@sources)
}
}