source: trunk/third/perl/win32/makemain.pl @ 10724

Revision 10724, 702 bytes checked in by ghudson, 27 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r10723, which included commits to RCS files with non-trunk default branches.
Line 
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
Note: See TracBrowser for help on using the repository browser.