ack/lang/cem/cemcom/Resolve

68 lines
1.1 KiB
Plaintext
Raw Normal View History

1987-02-10 09:27:44 +00:00
: create a directory Xsrc with name clashes resolved
: and run make in that directory
: '$Header$'
case $# in
1)
;;
*) echo "$0: one argument expected" 1>&2
exit 1
;;
esac
PW=`pwd`
options=
1987-02-10 09:27:44 +00:00
case $1 in
main|emain|lnt)
1987-02-10 09:27:44 +00:00
target=$PW/$1
;;
omain)
target=$PW/$1
options=-DPEEPHOLE
;;
cemain)
target=$PW/$1
options=-DCODE_EXPANDER
;;
1987-02-10 09:27:44 +00:00
Xlint)
target=$1
;;
*) echo "$0: $1: Illegal argument" 1>&2
exit 1
;;
esac
if test -d ../Xsrc
then
:
else mkdir ../Xsrc
fi
1987-06-30 18:30:45 +00:00
make EMHOME=$EMHOME longnames
1987-02-10 09:27:44 +00:00
: remove code generating routines from the clashes list as they are defines.
: code generating routine names start with C_
sed '/^C_/d' < longnames > tmp$$
cclash -c -l7 tmp$$ > ../Xsrc/Xclashes
rm -f tmp$$
cd ../Xsrc
if cmp -s Xclashes clashes
then
:
else
mv Xclashes clashes
fi
1988-08-08 18:03:12 +00:00
rm -f Makefile
1987-02-10 09:27:44 +00:00
for i in `cat $PW/Cfiles`
do
1988-08-08 18:03:12 +00:00
cat >> Makefile <<EOF
1987-02-10 09:27:44 +00:00
$i: clashes $PW/$i
cid -Fclashes < $PW/$i > $i
EOF
done
1987-06-30 18:30:45 +00:00
make EMHOME=$EMHOME `cat $PW/Cfiles`
1988-08-08 18:03:12 +00:00
rm -f Makefile
ed - $PW/Makefile <<'EOF'
1987-03-18 09:35:31 +00:00
/^#EXCLEXCL/,/^#INCLINCL/d
1988-08-08 18:03:12 +00:00
w Makefile
1987-03-18 09:35:31 +00:00
q
EOF
make EMHOME=$EMHOME COPTIONS=$options MACH=$mach CURRDIR=$PW/ $target