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