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(flag a) platforms = (386 mips sparc 68020)
13 if not platforms = $objtype
14 sourcedir=/sys/src/cmd/perl/$p9pvers
16 sitelib=$privlib/site_perl
18 #Build source directory
19 if (test ! -d /sys/src/cmd/perl) mkdir /sys/src/cmd/perl
20 if (test ! -d $sourcedir) mkdir $sourcedir
22 #Populate source directory
23 echo Building source directories ...
24 {cd $builddir ; tar c .} | { cd $sourcedir ; tar x}
25 cp $builddir/plan9/plan9.c $builddir/plan9/plan9ish.h $builddir/plan9/mkfile $sourcedir
26 cd $sourcedir/lib ; rm -rf *
28 #Build library directories
29 echo Building library directories ...
30 if (test ! -d $privlib) mkdir $privlib
31 if (test ! -d $privlib/auto) mkdir $privlib/auto
32 if (test ! -d $sitelib) mkdir $sitelib
34 archlib=/$i/lib/perl/$p9pvers
35 sitearch=$archlib/site_perl
38 if (test ! -d /$i/lib/perl) mkdir /$i/lib/perl
39 if (test ! -d $archlib) mkdir $archlib
40 if (test ! -d $sitearch) mkdir $sitearch
41 if (test ! -d $corelib) mkdir $corelib
42 if (test ! -d $arpalib) mkdir $arpalib
43 cp $builddir/*.h $builddir/plan9/*.h $corelib
44 cp $builddir/plan9/arpa/*.h $arpalib
47 #Populate library directories
48 {cd $builddir/lib ; tar c . } | {cd $privlib ; tar x }