This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
integrate ansiperl to get makedef.pl tweak
[perl5.git] / win32 / makemain.pl
CommitLineData
0a753a76 1open (MINIMAIN, "<../miniperlmain.c") || die "failed to open miniperlmain.c" . $!;
2
3while (<MINIMAIN>) {
4 if (/Do not delete this line--writemain depends on it/) {
5 last;
6 }
7 else {
8 print $_;
9 }
10 };
11
12close(MINIMAIN);
13
14print "char *staticlinkmodules[]={\n";
15foreach (@ARGV) {
16 print "\t\"".$_."\",\n";
17 }
18print "\tNULL,\n";
19print "\t};\n";
20print "\n";
21foreach (@ARGV) {
22 print "EXTERN_C void boot_$_ _((CV* cv));\n"
23 }
24
25print <<EOP;
26
27static void
28xs_init()
29{
30 dXSUB_SYS;
31 char *file = __FILE__;
32EOP
33
34foreach (@ARGV) {
35 if (/DynaLoader/) {
36 print "\tnewXS(\"$_\:\:boot_$_\", boot_$_, file);\n";
37 }
38 else {
39 print "\tnewXS(\"$_\:\:bootstrap\", boot_$_, file);\n";
40 };
41 }
42
43print <<EOP;
44}
45EOP