rootusr5_3.sp 2.13 KB
#!/bin/ksh
#
# IRIX 6.X 用 rootusr5_3
#
# rootusr5_3 との違いは、$ROOT/usr/include を /usr/include では
# なく、$TOOLROOT/usr/include にリンクすることである。TOOLROOT を
# 例えば /hosts/cocaine 等、他の IRIX 5.3 マシンに設定しておくこと
# で、/usr/bin/cc などのツール類は、5.3 のものを使用することができる。
#

# get the environment variables
. ./CHANGEME

# prompt user to make sure we don't do something bad
echo
echo
echo About to make symbolic links
echo from $TOOLROOT/usr/include/... to $ROOT/usr/include/...
echo and  $TOOLROOT/usr/lib/... to $ROOT/usr/lib/...
echo
echo If this is the correct tree, type yes to continue, no to quit
read REPLY

if test $REPLY != "yes"
then
        echo QUIT!!!
        exit 0
fi

# clean up what was there

rm -rf $ROOT/usr

LIST="$TOOLROOT/usr/include $TOOLROOT/usr/lib"

for d in $LIST;
do
#	echo find $d -name '*' -exec $TREE_BINS/mkdir_ln $ROOT {} \;
	find $d -name '*' -exec $TREE_BINS/mkdir_ln.sp $ROOT $TOOLROOT {} \;
done

rm -rf $ROOT/lib
rm -rf $ROOT/var

mkdir -p $ROOT/usr/include/make
mkdir -p $ROOT/usr/include/cmplrs
mkdir -p $ROOT/usr/lib/doc
mkdir -p $ROOT/lib
mkdir -p $ROOT/var/arch/lib
mkdir -p $ROOT/var/arch/libcl

TOOLLIB=$TOOLROOT/disk2/nightly/mdev2

cp $TOOLLIB/lib/libc.so.1 $ROOT/lib/.
cp $TOOLLIB/var/arch/lib/libgl.so $ROOT/var/arch/lib/.
cp $TOOLLIB/var/arch/libcl/awareaudio.so $ROOT/var/arch/libcl/.

unlink $ROOT/usr/lib/libc.so.1
unlink $ROOT/usr/lib/libgl.so
unlink $ROOT/usr/lib/libawareaudio.so

ln -s ../../lib/libc.so.1 $ROOT/usr/lib/libc.so.1
ln -s ../../var/arch/lib/libgl.so $ROOT/usr/lib/libgl.so
ln -s ../../var/arch/libcl/awareaudio.so $ROOT/usr/lib/libawareaudio.so

LIST="\
     libXlate.h \
     make/4DACE1defs make/ismcommondefs make/ismcommonrules \
     make/kcommondefs make/kcommonrules make/mandefs \
     make/manrules make/startversion \
     cmplrs/events.h cmplrs/leb128.h"

for f in $LIST;
do
    rm -f $ROOT/usr/include/$f
    cp $PREXTRA/usr/include/$f $ROOT/usr/include/$f
done

rm -rf $ROOT/usr/lib/doc; cp -r $PREXTRA/usr/lib/doc $ROOT/usr/lib/doc

#
# makerom を動作させるために u64check をコピー
#

mkdir -p $ROOT/usr/sbin
ln -s /usr/sbin/u64check $ROOT/usr/sbin/u64check