annotate perl-5.22.2/win32/create_perllibst_h.pl @ 8045:a16537d2fe07

<xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
author HackBot
date Sat, 14 May 2016 14:54:38 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8045
a16537d2fe07 <xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
HackBot
parents:
diff changeset
1 #!perl -w
a16537d2fe07 <xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
HackBot
parents:
diff changeset
2 use strict;
a16537d2fe07 <xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
HackBot
parents:
diff changeset
3
a16537d2fe07 <xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
HackBot
parents:
diff changeset
4 # creates perllibst.h file for inclusion from perllib.c
a16537d2fe07 <xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
HackBot
parents:
diff changeset
5
a16537d2fe07 <xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
HackBot
parents:
diff changeset
6 use Config;
a16537d2fe07 <xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
HackBot
parents:
diff changeset
7
a16537d2fe07 <xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
HackBot
parents:
diff changeset
8 my @statics = split /\s+/, $Config{static_ext};
a16537d2fe07 <xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
HackBot
parents:
diff changeset
9 open my $fh, '>', 'perllibst.h' or die "Failed to write to perllibst.h:$!";
a16537d2fe07 <xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
HackBot
parents:
diff changeset
10
a16537d2fe07 <xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
HackBot
parents:
diff changeset
11 my @statics1 = map {local $_=$_;s/\//__/g;$_} @statics;
a16537d2fe07 <xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
HackBot
parents:
diff changeset
12 my @statics2 = map {local $_=$_;s/\//::/g;$_} @statics;
a16537d2fe07 <xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
HackBot
parents:
diff changeset
13 print $fh "/*DO NOT EDIT\n this file is included from perllib.c to init static extensions */\n";
a16537d2fe07 <xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
HackBot
parents:
diff changeset
14 print $fh "#ifdef STATIC1\n",(map {" \"$_\",\n"} @statics),"#undef STATIC1\n#endif\n";
a16537d2fe07 <xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
HackBot
parents:
diff changeset
15 print $fh "#ifdef STATIC2\n",(map {" EXTERN_C void boot_$_ (pTHX_ CV* cv);\n"} @statics1),"#undef STATIC2\n#endif\n";
a16537d2fe07 <xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
HackBot
parents:
diff changeset
16 print $fh "#ifdef STATIC3\n",(map {" newXS(\"$statics2[$_]::bootstrap\", boot_$statics1[$_], file);\n"} 0 .. $#statics),"#undef STATIC3\n#endif\n";
a16537d2fe07 <xfix> tar xf perl-5.22.2.tar.gz # Ah, whatever, I\'m doing it anyway
HackBot
parents:
diff changeset
17 close $fh;