ack/first/mk_config

134 lines
2.8 KiB
Plaintext
Raw Normal View History

#!/bin/sh
1991-10-15 16:02:38 +00:00
set -e
create_dir $CONFIG
create_dir $CONFIG/bin
echo "#!/bin/sh" > $CONFIG/bin/ack_sys
echo "echo $SYSNAME" >> $CONFIG/bin/ack_sys
chmod +x $CONFIG/bin/ack_sys
1991-10-15 16:02:38 +00:00
cd $SRC_HOME
1997-07-01 12:05:54 +00:00
find . -type d -perm -555 -print > $CONFIG/dir_list
1991-10-15 16:02:38 +00:00
cd $CONFIG
for i in mach/*/libsys
do
rm -rf $i
1991-10-22 10:55:19 +00:00
done
1991-10-15 16:02:38 +00:00
for i in `cat dir_list`
do
create_dir $i
1991-11-14 09:35:36 +00:00
rm -f $i/No*
if [ -f $i/Makefile ]
then
( cd $i ; if make clean ; then exit 0 ; else exit 0 ; fi ) > /dev/null 2>&1
fi
1991-10-15 16:02:38 +00:00
if [ -f $SRC_HOME/$i/proto.make ]
1991-11-14 09:35:36 +00:00
then mk_makefile $SRC_HOME/$i/proto.make > $i/Makefile
1991-10-15 16:02:38 +00:00
fi
if [ -f $SRC_HOME/$i/Action ]
then
1991-10-18 10:02:44 +00:00
cd $SRC_HOME/$i
cp Action* $CONFIG/$i
chmod +w $CONFIG/$i/Action*
cd $CONFIG
1991-10-15 16:02:38 +00:00
fi
done
cd $CONFIG
for i in lang/cem/cemcom.ansi lang/cem/cemcom lang/m2/comp
do
cp $SRC_HOME/$i/BigPars $CONFIG/$i/Parameters
1991-10-18 10:02:44 +00:00
chmod +w $CONFIG/$i/Parameters
1991-10-15 16:02:38 +00:00
done
for i in lang/pc/comp lang/cem/cpp.ansi
do
cp $SRC_HOME/$i/Parameters $CONFIG/$i/Parameters
1991-10-18 10:02:44 +00:00
chmod +w $CONFIG/$i/Parameters
1991-10-15 16:02:38 +00:00
done
cd $CONFIG/mach
for i in *
do
if [ -d $i ]
then
if [ -d $i/as ]
then
cd $i/as
1991-11-14 09:35:36 +00:00
mk_makefile $SRC_HOME/mach/proto/as/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile
1991-10-15 16:02:38 +00:00
cd ../..
fi
if [ -d $i/top ]
then
cd $i/top
1991-11-14 09:35:36 +00:00
mk_makefile $SRC_HOME/mach/proto/top/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile
1991-10-15 16:02:38 +00:00
cd ../..
fi
if [ -d $i/cg ]
then
cd $i/cg
1991-11-14 09:35:36 +00:00
mk_makefile $SRC_HOME/mach/proto/cg/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile
1991-10-15 16:02:38 +00:00
cd ../..
fi
if [ -d $i/ncg ]
then
cd $i/ncg
1991-11-14 09:35:36 +00:00
mk_makefile $SRC_HOME/mach/proto/ncg/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile
1991-10-15 16:02:38 +00:00
if [ -f $SRC_HOME/mach/$i/ncg/table_dir ]
then
ed -s Makefile <<EOF
1991-10-15 16:02:38 +00:00
/^#TABLE_DEFINE/+1r $SRC_HOME/mach/$i/ncg/table_dir
w
q
EOF
fi
cd ../..
fi
1992-06-26 11:54:22 +00:00
if [ -f $SRC_HOME/mach/$i/mach_params ]
then :
else continue
fi
for j in libem libend libmon libfp libsys libdb
1991-10-15 16:02:38 +00:00
do
if [ -d $i/$j ]
then
cd $i/$j
1991-11-14 09:35:36 +00:00
mk_makefile $SRC_HOME/mach/proto/libg/proto.$j | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" > Makefile
1991-10-15 16:02:38 +00:00
cd ../..
fi
done
for j in libbsd4_1a libbsd4_2 libsysV_2
do
if [ -d $i/$j ]
then
cd $i/$j
1991-11-14 09:35:36 +00:00
mk_makefile $SRC_HOME/mach/proto/libg/proto.libsys | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" -e "s/libsys/$j/g" > Makefile
1991-10-15 16:02:38 +00:00
cd ../..
fi
done
for j in libcc libcc.ansi libm2 libpc libbc liboc libf77
do
create_dir $i/$j
rm -f $i/$j/No*
1991-10-15 16:02:38 +00:00
cd $i/$j
1991-11-14 09:35:36 +00:00
mk_makefile $SRC_HOME/mach/proto/libg/proto.$j | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" > Makefile
1991-10-15 16:02:38 +00:00
cd ../..
done
if [ $i = vax4 ]
then :
elif [ -d $i/libsys ]
then :
else
create_dir $i/libsys
rm -f $i/libsys/No*
1991-10-15 16:02:38 +00:00
cd $i/libsys
1991-11-14 09:35:36 +00:00
mk_makefile $SRC_HOME/mach/proto/libg/proto.sysmon | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" > Makefile
1991-10-15 16:02:38 +00:00
cd ../..
fi
fi
done