Commit | Line | Data |
396e9e6f |
1 | APE=/sys/src/ape |
2 | < $APE/config |
3 | <plan9/buildinfo |
4 | sourcedir = /sys/src/cmd/perl/$p9pvers |
5 | archname = plan9_$objtype |
6 | privlib=/sys/lib/perl |
7 | archlib = /$objtype/lib/perl/$p9pvers |
8 | sitelib = $privlib/site_perl |
9 | sitearch = $archlib/site_perl |
10 | |
16da7c01 |
11 | CFLAGS = -B -D_POSIX_SOURCE -D_BSD_EXTENSION -DMY_UV_MAX=0x7fffffffUL |
396e9e6f |
12 | LDFLAGS = -B |
13 | |
14 | CCCMD = $CC -c $CFLAGS |
15 | |
16 | perllib = $archlib/CORE/libperl.a |
17 | |
18 | perlshr = $archlib/CORE/libperlshr.a |
19 | |
20 | installman1dir = /sys/man/1 |
21 | installman3dir = /sys/man/2 |
22 | |
fcfd4d79 |
23 | podnames = perl perlbook perlboot perlbot perldata perldebtut perldiag perldsc perlform perlfunc perlipc perllol perlmod perlmodlib perlmodinstall perlnewmod perlop perlopentut perlpod perlrequick perlretut perlref perlreftut perlrun perlsec perlstyle perlsub perlsyn perltie perltoc perltooc perltoot perltrap perlutil perlvar |
a83b6f46 |
24 | faqpodnames = perlfaq perlfaq1 perlfaq2 perlfaq3 perlfaq4 perlfaq5 perlfaq6 perlfaq7 perlfaq8 perlfaq9 |
25 | advpodnames = perlapi perlapio perlcall perlclib perlcompile perldebguts perldbmfilter perldebug perldelta perldiag perlebcdic perlembed perlfilter perlfor perlguts perlhack perlhist perlintern perliol perlnumber perlobj perlre perlthrtut perltodo perlunicode perlxs perlxs perlxstut |
fcfd4d79 |
26 | archpodnames = perlaix perlamiga perlapollo perlbeos perlbs2000 perlce perlcygwin perldgux perldos perlepoc perlhpux perlhurd perlmachten perlmacos perlmint perlmpeix perlnetware perlos2 perlos390 perlplan9 perlqnx perlsolaris perltru64 perlvmesa perlvms perlvos perlwin32 |
396e9e6f |
27 | |
28 | libpods = ${podnames:%=pod/%.pod} |
29 | |
30 | perlpods = $libpods |
31 | |
774d564b |
32 | extensions = IO Socket Opcode DynaLoader Fcntl POSIX |
33 | ext_xs = IO.xs Socket.xs Opcode.xs dl_none.xs Fcntl.xs POSIX.xs |
396e9e6f |
34 | ext_c = ${ext_xs:%.xs=%.c} |
35 | ext_obj = ${ext_xs:%.xs=%.$O} |
36 | |
bb14ff96 |
37 | obj = gv.$O toke.$O perly.$O op.$O regcomp.$O dump.$O util.$O mg.$O hv.$O av.$O run.$O pp_hot.$O sv.$O pp.$O scope.$O pp_ctl.$O pp_sys.$O doop.$O doio.$O regexec.$O taint.$O deb.$O globals.$O plan9.$O universal.$O perlio.$O |
396e9e6f |
38 | |
39 | OBJS = perl.$O $obj |
40 | |
41 | testlist = base/*.t comp/*.t cmd/*.t io/*.t op/*.t |
42 | |
43 | install:V: perl preplibrary |
44 | cp perl /$objtype/bin/perl |
eeb010ab |
45 | cp plan9/aperl /rc/bin/Perl |
16da7c01 |
46 | mk man |
396e9e6f |
47 | |
48 | perl: config.h miniperlmain.$O miniperl $archlib/Config.pm perlmain.$O $perlshr |
49 | $LD $CFLAGS -o perl perlmain.$O $perllib $perlshr |
50 | |
51 | miniperl: config.h $perllib miniperlmain.$O |
52 | $LD $CFLAGS -o miniperl miniperlmain.$O $perllib |
53 | |
54 | preplibrary:V: miniperl $archlib/Config.pm |
55 | cd $privlib |
56 | for (file in *.pm */*.pm $archlib/Config.pm) $sourcedir/miniperl -e 'use AutoSplit; autosplit(@ARGV)' $file $privlib/auto |
57 | |
58 | $perllib(%):N: % |
59 | $perllib: ${OBJS:%=$perllib(%)} |
60 | ar rv $perllib $OBJS |
61 | $RANLIB $perllib |
62 | |
63 | miniperlmain.$O: config.h |
64 | $CCCMD miniperlmain.c |
65 | |
66 | perlmain.$O: config.h perlmain.c |
67 | $CCCMD perlmain.c |
68 | |
69 | perlmain.c: miniperl vms/writemain.pl |
70 | ./miniperl vms/writemain.pl $extensions |
71 | |
bb14ff96 |
72 | config.h: plan9/fndvers |
760ac839 |
73 | plan9/fndvers |
396e9e6f |
74 | cp config.h $archlib/CORE |
75 | |
76 | $perlshr(%):N: % |
77 | $perlshr: ${ext_obj:%=$perlshr(%)} |
78 | ar rv $perlshr $ext_obj |
79 | $RANLIB $perlshr |
80 | |
81 | IO.c: miniperl ext/IO/IO.xs |
82 | ./miniperl $privlib/ExtUtils/xsubpp -noprototypes -typemap $privlib/ExtUtils/typemap ext/IO/IO.xs > $target |
83 | cp ext/IO/*.pm $privlib |
760ac839 |
84 | if (test !-d $privlib/IO) { |
85 | mkdir $privlib/IO |
396e9e6f |
86 | cp ext/IO/lib/IO/*.pm $privlib/IO |
760ac839 |
87 | } |
396e9e6f |
88 | |
89 | Socket.$O: config.h Socket.c |
90 | $CCCMD -I plan9 Socket.c |
91 | |
92 | Socket.c: miniperl ext/Socket/Socket.xs |
93 | ./miniperl $privlib/ExtUtils/xsubpp -noprototypes -typemap $privlib/ExtUtils/typemap ext/Socket/Socket.xs > $target |
94 | cp ext/Socket/Socket.pm $privlib |
95 | |
96 | Opcode.c: miniperl ext/Opcode/Opcode.xs |
97 | ./miniperl $privlib/ExtUtils/xsubpp -noprototypes -typemap $privlib/ExtUtils/typemap ext/Opcode/Opcode.xs > $target |
98 | cp ext/Opcode/*.pm $privlib |
99 | |
100 | Fcntl.c: miniperl ext/Fcntl/Fcntl.xs |
101 | ./miniperl $privlib/ExtUtils/xsubpp -noprototypes -typemap $privlib/ExtUtils/typemap ext/Fcntl/Fcntl.xs > $target |
102 | cp ext/Fcntl/Fcntl.pm $privlib |
103 | |
396e9e6f |
104 | POSIX.c: miniperl ext/POSIX/POSIX.xs |
105 | ./miniperl $privlib/ExtUtils/xsubpp -noprototypes -typemap $privlib/ExtUtils/typemap ext/POSIX/POSIX.xs > $target |
106 | cp ext/POSIX/POSIX.pm $privlib |
107 | |
108 | dl_none.c: miniperl ext/DynaLoader/dl_none.xs |
109 | ./miniperl $privlib/ExtUtils/xsubpp -noprototypes -typemap $privlib/ExtUtils/typemap ext/DynaLoader/dl_none.xs > $target |
110 | cp ext/DynaLoader/DynaLoader.pm $privlib |
111 | |
112 | test:V: |
113 | bind -b $privlib $sourcedir/lib |
114 | bind -b $archlib $sourcedir/lib |
115 | cd $sourcedir/t |
116 | rm -f perl |
117 | cp /$objtype/bin/perl $sourcedir/t |
118 | perl TEST `{ ls */*.t | comm -23 - ../plan9/exclude } |
119 | |
120 | plan9.$O: config.h ./plan9/plan9.c |
121 | cp ./plan9/plan9.c ./plan9.c |
122 | $CCCMD plan9.c |
123 | |
124 | %.$O: config.h %.c |
125 | $CCCMD $stem.c |
126 | |
127 | $archlib/Config.pm: miniperl config.sh |
128 | ./miniperl configpm $archlib/Config.pm |
129 | |
130 | config.sh: miniperl config.h |
131 | ./miniperl ./plan9/genconfig.pl |
132 | |
133 | installall:V: |
134 | for (objtype in 386 mips 68020 sparc) mk install |
135 | |
136 | man:V: $perlpods pod/pod2man.PL perl |
137 | perl pod/pod2man.PL |
138 | for (i in $podnames) pod/pod2man pod/$i.pod > $installman3dir/$i |
a83b6f46 |
139 | for (i in $faqpodnames) pod/pod2man pod/$i.pod > $installman3dir/$i |
140 | for (i in $advpodnames) pod/pod2man pod/$i.pod > $installman3dir/$i |
141 | for (i in $archpodnames) pod/pod2man pod/$i.pod > $installman3dir/$i |
396e9e6f |
142 | |
760ac839 |
143 | nuke clean:V: |
396e9e6f |
144 | rm -f *.$O $extensions^.pm config.sh $perllib config.h $perlshr perlmain.c perl miniperl $archlib/Config.pm $ext_c |
760ac839 |
145 | rm -rf $privlib/IO |
396e9e6f |
146 | |
147 | deleteman:V: |
148 | rm -f $installman1dir/perl* $installman3dir/perl* |