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