blob: 037ecfb25c0dddee7f342842da3e3a17da98d7e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#!/bin/rc
# This is an rc shell script which unpacks the perl distribution, builds
# directories, and puts files where they belong.
# To use, just run it from within the plan9 subdirectory with the appropriate
# permissions.
# Last modified 6/30/96 by:
# Luther Huffman, Strategic Computer Solutions, Inc., lutherh@stratcom.com
awk -f versnum ../patchlevel.h
. buildinfo
builddir = `{ cd .. ; pwd }
if(flag a) platforms = (386 mips sparc 68020)
if not platforms = $objtype
sourcedir=/sys/src/cmd/perl/$p9pvers
privlib=/sys/lib/perl
sitelib=$privlib/site_perl
#Build source directory
if (test ! -d /sys/src/cmd/perl) mkdir /sys/src/cmd/perl
if (test ! -d $sourcedir) mkdir $sourcedir
#Populate source directory
echo Building source directories ...
{cd $builddir ; tar c .} | { cd $sourcedir ; tar x}
cp $builddir/plan9/plan9.c $builddir/plan9/plan9ish.h $builddir/plan9/mkfile $sourcedir
cd $sourcedir/lib ; rm -rf *
#Build library directories
echo Building library directories ...
if (test ! -d $privlib) mkdir $privlib
if (test ! -d $privlib/auto) mkdir $privlib/auto
if (test ! -d $sitelib) mkdir $sitelib
for(i in $platforms){
archlib=/$i/lib/perl/$p9pvers
sitearch=$archlib/site_perl
corelib=$archlib/CORE
arpalib=$corelib/arpa
if (test ! -d /$i/lib/perl) mkdir /$i/lib/perl
if (test ! -d $archlib) mkdir $archlib
if (test ! -d $sitearch) mkdir $sitearch
if (test ! -d $corelib) mkdir $corelib
if (test ! -d $arpalib) mkdir $arpalib
cp $builddir/*.h $builddir/plan9/*.h $corelib
cp $builddir/plan9/arpa/*.h $arpalib
}
#Populate library directories
{cd $builddir/lib ; tar c . } | {cd $privlib ; tar x }
|