summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-12-22 18:07:49 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-12-24 09:25:16 -0800
commitada44f8c3c4de3fe8e773d68e8d77390202c4e2d (patch)
tree35985be90543f041e211ae7c260e7dd7b2458f18 /regen
parent2b3fe414d20841236a88fd8181ecc26724c5423e (diff)
downloadperl-ada44f8c3c4de3fe8e773d68e8d77390202c4e2d.tar.gz
Give feature.pm the bundle hints
It’s going to need them, in order to determine which list of features is currently enabled.
Diffstat (limited to 'regen')
-rwxr-xr-xregen/feature.pl13
1 files changed, 12 insertions, 1 deletions
diff --git a/regen/feature.pl b/regen/feature.pl
index 4f439e93e5..a6896fe030 100755
--- a/regen/feature.pl
+++ b/regen/feature.pl
@@ -86,13 +86,14 @@ for my $bund (
}
my $HintShift;
+my $HintMask;
open "perl.h", "perl.h" or die "$0 cannot open perl.h: $!";
perlh: {
while (readline "perl.h") {
next unless /#define\s+HINT_FEATURE_MASK/;
/(0x[A-Fa-f0-9]+)/ or die "No hex number in:\n\n$_\n ";
- my $hex = $1;
+ my $hex = $HintMask = $1;
my $bits = sprintf "%b", oct $1;
$bits =~ /^0*1+(0*)\z/
or die "Non-contiguous bits in $bits (binary for $hex):\n\n$_\n ";
@@ -108,6 +109,9 @@ perlh: {
}
close "perl.h";
+my @HintedBundles =
+ ('default', grep !/[^\d.]/, sort values %UniqueBundles);
+
###########################################################################
# Open files to be generated
@@ -166,6 +170,13 @@ for (sort keys %Aliases) {
qq'\$feature_bundle{"$_"} = \$feature_bundle{"$Aliases{$_}"};\n';
};
+print $pm <<EOPM;
+
+my \$hint_shift = $HintShift;
+my \$hint_mask = $HintMask;
+my \@hint_bundles = qw( @HintedBundles );
+EOPM
+
while (<DATA>) {
last if /^PODTURES$/ ;