ack/first/mk_config

131 lines
2.7 KiB
Plaintext
Raw Normal View History

1991-10-15 16:02:38 +00:00
set -e
1991-10-16 13:33:38 +00:00
MACROS=$1
1991-10-15 16:02:38 +00:00
if [ -f $MACROS ]
then :
else echo "$0: $MACROS not found" 1>&2
exit 3
fi
create_dir $CONFIG
cd $SRC_HOME
find . -type d -print > $CONFIG/dir_list
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
rm -f $i/NoAction
1991-10-15 16:02:38 +00:00
if [ -f $SRC_HOME/$i/proto.make ]
then mk_makefile $MACROS $SRC_HOME/$i/proto.make > $i/Makefile
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 $SRC_HOME/util/ceg/util
for i in make_*
do
mk_makefile $MACROS $i > $CONFIG/util/ceg/util/$i
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
mk_makefile $MACROS $SRC_HOME/mach/proto/as/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile
cd ../..
fi
if [ -d $i/top ]
then
cd $i/top
mk_makefile $MACROS $SRC_HOME/mach/proto/top/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile
cd ../..
fi
if [ -d $i/cg ]
then
cd $i/cg
mk_makefile $MACROS $SRC_HOME/mach/proto/cg/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile
cd ../..
fi
if [ -d $i/ncg ]
then
cd $i/ncg
mk_makefile $MACROS $SRC_HOME/mach/proto/ncg/proto.make | sed -e "/#MACH_DEFINE/,/^MACH/s/=.*/= $i/" > Makefile
if [ -f $SRC_HOME/mach/$i/ncg/table_dir ]
then
ed - Makefile <<EOF
/^#TABLE_DEFINE/+1r $SRC_HOME/mach/$i/ncg/table_dir
w
q
EOF
fi
cd ../..
fi
for j in libem libend libmon libfp libsys libdb
do
if [ -d $i/$j ]
then
cd $i/$j
mk_makefile $MACROS $SRC_HOME/mach/proto/libg/proto.$j | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" > Makefile
cd ../..
fi
done
for j in libbsd4_1a libbsd4_2 libsysV_2
do
if [ -d $i/$j ]
then
cd $i/$j
mk_makefile $MACROS $SRC_HOME/mach/proto/libg/proto.libsys | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" -e "s/libsys/$j/g" > Makefile
cd ../..
fi
done
for j in libcc libcc.ansi libm2 libpc libbc liboc libf77
do
create_dir $i/$j
cd $i/$j
mk_makefile $MACROS $SRC_HOME/mach/proto/libg/proto.$j | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" > Makefile
cd ../..
done
if [ $i = vax4 ]
then :
elif [ -d $i/libsys ]
then :
else
create_dir $i/libsys
cd $i/libsys
mk_makefile $MACROS $SRC_HOME/mach/proto/libg/proto.sysmon | sed -e "/#MACH_PARAMS/r $SRC_HOME/mach/$i/mach_params" > Makefile
cd ../..
fi
fi
done