perl 5.003_01: [changes beteween cumulative patches and tarball release]
[p5sagit/p5-mst-13.2.git] / plan9 / mkfile
CommitLineData
396e9e6f 1Content-type: text/plain; charset="us-ascii"
2Content-disposition: attachment; filename="mkfile"
3
4APE=/sys/src/ape
5< $APE/config
6<plan9/buildinfo
7sourcedir = /sys/src/cmd/perl/$p9pvers
8archname = plan9_$objtype
9privlib=/sys/lib/perl
10archlib = /$objtype/lib/perl/$p9pvers
11sitelib = $privlib/site_perl
12sitearch = $archlib/site_perl
13
14CFLAGS = -B -D_POSIX_SOURCE -D_BSD_EXTENSION -DNO_EMBED
15LDFLAGS = -B
16
17CCCMD = $CC -c $CFLAGS
18
19perllib = $archlib/CORE/libperl.a
20
21perlshr = $archlib/CORE/libperlshr.a
22
23installman1dir = /sys/man/1
24installman3dir = /sys/man/2
25
26podnames = perl perlbook perlbot perlcall perldata perldebug perldiag perldsc perlembed perlform perlfunc perlguts perlipc perllol perlmod perlobj perlop perlovl perlpod perlre perlref perlrun perlsec perlstyle perlsub perlsyn perltie perltoc perltrap perlvar perlxs perlxstut
27
28libpods = ${podnames:%=pod/%.pod}
29
30perlpods = $libpods
31
32extensions = IO Socket Opcode DynaLoader Fcntl FileHandle POSIX
33ext_xs = IO.xs Socket.xs Opcode.xs dl_none.xs Fcntl.xs FileHandle.xs POSIX.xs
34ext_c = ${ext_xs:%.xs=%.c}
35ext_obj = ${ext_xs:%.xs=%.$O}
36
37obj = 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
38
39OBJS = perl.$O $obj
40
41testlist = base/*.t comp/*.t cmd/*.t io/*.t op/*.t
42
43install:V: perl preplibrary
44 cp perl /$objtype/bin/perl
45 cp plan9/aperl /rc/bin/aperl
46
47perl: config.h miniperlmain.$O miniperl $archlib/Config.pm perlmain.$O $perlshr
48 $LD $CFLAGS -o perl perlmain.$O $perllib $perlshr
49
50miniperl: config.h $perllib miniperlmain.$O
51 $LD $CFLAGS -o miniperl miniperlmain.$O $perllib
52
53preplibrary:V: miniperl $archlib/Config.pm
54 cd $privlib
55 for (file in *.pm */*.pm $archlib/Config.pm) $sourcedir/miniperl -e 'use AutoSplit; autosplit(@ARGV)' $file $privlib/auto
56
57$perllib(%):N: %
58$perllib: ${OBJS:%=$perllib(%)}
59 ar rv $perllib $OBJS
60 $RANLIB $perllib
61
62miniperlmain.$O: config.h
63 $CCCMD miniperlmain.c
64
65perlmain.$O: config.h perlmain.c
66 $CCCMD perlmain.c
67
68perlmain.c: miniperl vms/writemain.pl
69 ./miniperl vms/writemain.pl $extensions
70
71config.h: config.plan9 plan9/fndvers
72 plan9/fndvers config.h
73 cp config.h $archlib/CORE
74
75$perlshr(%):N: %
76$perlshr: ${ext_obj:%=$perlshr(%)}
77 ar rv $perlshr $ext_obj
78 $RANLIB $perlshr
79
80IO.c: miniperl ext/IO/IO.xs
81 ./miniperl $privlib/ExtUtils/xsubpp -noprototypes -typemap $privlib/ExtUtils/typemap ext/IO/IO.xs > $target
82 cp ext/IO/*.pm $privlib
83 if (test !-d $privlib/IO) mkdir $privlib/IO
84 cp ext/IO/lib/IO/*.pm $privlib/IO
85
86Socket.$O: config.h Socket.c
87 $CCCMD -I plan9 Socket.c
88
89Socket.c: miniperl ext/Socket/Socket.xs
90 ./miniperl $privlib/ExtUtils/xsubpp -noprototypes -typemap $privlib/ExtUtils/typemap ext/Socket/Socket.xs > $target
91 cp ext/Socket/Socket.pm $privlib
92
93Opcode.c: miniperl ext/Opcode/Opcode.xs
94 ./miniperl $privlib/ExtUtils/xsubpp -noprototypes -typemap $privlib/ExtUtils/typemap ext/Opcode/Opcode.xs > $target
95 cp ext/Opcode/*.pm $privlib
96
97Fcntl.c: miniperl ext/Fcntl/Fcntl.xs
98 ./miniperl $privlib/ExtUtils/xsubpp -noprototypes -typemap $privlib/ExtUtils/typemap ext/Fcntl/Fcntl.xs > $target
99 cp ext/Fcntl/Fcntl.pm $privlib
100
101FileHandle.c: miniperl ext/FileHandle/FileHandle.xs
102 ./miniperl $privlib/ExtUtils/xsubpp -noprototypes -typemap $privlib/ExtUtils/typemap ext/FileHandle/FileHandle.xs > $target
103 cp ext/FileHandle/FileHandle.pm $privlib
104
105POSIX.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
109dl_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
113test: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
121plan9.$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
131config.sh: miniperl config.h
132 ./miniperl ./plan9/genconfig.pl
133
134installall:V:
135 for (objtype in 386 mips 68020 sparc) mk install
136
137man:V: $perlpods pod/pod2man.PL perl
138 perl pod/pod2man.PL
139 for (i in $podnames) pod/pod2man pod/$i.pod > $installman3dir/$i
140 pod/pod2man plan9/perlplan9.pod > $installman3dir/perlplan9
141
142nuke:V:
143 rm -f *.$O $extensions^.pm config.sh $perllib config.h $perlshr perlmain.c perl miniperl $archlib/Config.pm $ext_c
144
145clean:V:
146 rm -f *.$O config.sh miniperl t/perl
147
148deleteman:V:
149 rm -f $installman1dir/perl* $installman3dir/perl*