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
6 # Last modified 6/30/96 by:
7 # Luther Huffman, Strategic Computer Solutions, Inc., lutherh@stratcom.com
9 awk -f versnum ../patchlevel.h
11 builddir = `{ cd .. ; pwd }
12 if (~ $#* 0) platforms = $objtype
14 case -a ; platforms = (386 mips sparc 68020)
15 case * ; echo 'Usage: setup.rc [-a]' >[1=2] ; exit
17 sourcedir=/sys/src/cmd/perl/$p9pvers
19 sitelib=$privlib/site_perl
21 #Build source directory
22 if (test ! -d /sys/src/cmd/perl) mkdir /sys/src/cmd/perl
23 if (test ! -d $sourcedir) mkdir $sourcedir
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 *
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
37 archlib=/$i/lib/perl/$p9pvers
38 sitearch=$archlib/site_perl
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
50 #Populate library directories
51 {cd $builddir/lib ; tar c . } | {cd $privlib ; tar x }