1986-10-22 15:38:24 +00:00
|
|
|
: create a directory Xsrc with name clashes resolved
|
|
|
|
: and run make in that directory
|
|
|
|
|
1986-09-25 19:39:06 +00:00
|
|
|
case $# in
|
|
|
|
1)
|
|
|
|
;;
|
|
|
|
*) echo "$0: one argument expected" 1>&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
1986-11-26 16:40:45 +00:00
|
|
|
currdir=`pwd`
|
1986-09-25 19:39:06 +00:00
|
|
|
case $1 in
|
1986-11-26 16:40:45 +00:00
|
|
|
main) target=$currdir/$1
|
|
|
|
;;
|
1988-09-20 13:31:57 +00:00
|
|
|
omain) target=$currdir/$1
|
|
|
|
options=-DPEEPHOLE
|
|
|
|
;;
|
1986-11-26 16:40:45 +00:00
|
|
|
Xlint) target=$1
|
1986-09-25 19:39:06 +00:00
|
|
|
;;
|
|
|
|
*) echo "$0: $1: Illegal argument" 1>&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
if test -d ../Xsrc
|
|
|
|
then
|
|
|
|
:
|
|
|
|
else mkdir ../Xsrc
|
|
|
|
fi
|
1987-07-01 13:15:52 +00:00
|
|
|
make EMHOME=$EMHOME longnames
|
1986-10-22 15:38:24 +00:00
|
|
|
: remove code generating routines from the clashes list as they are defines.
|
|
|
|
: code generating routine names start with C_
|
1986-11-17 11:41:28 +00:00
|
|
|
sed '/^C_/d' < longnames > tmp$$
|
1986-10-22 15:38:24 +00:00
|
|
|
cclash -c -l7 tmp$$ > ../Xsrc/Xclashes
|
1986-10-06 20:36:30 +00:00
|
|
|
rm -f tmp$$
|
1986-10-20 17:40:41 +00:00
|
|
|
PW=`pwd`
|
1986-09-25 19:39:06 +00:00
|
|
|
cd ../Xsrc
|
|
|
|
if cmp -s Xclashes clashes
|
|
|
|
then
|
|
|
|
:
|
|
|
|
else
|
|
|
|
mv Xclashes clashes
|
|
|
|
fi
|
|
|
|
rm -f Makefile
|
1986-10-22 15:38:24 +00:00
|
|
|
ed - $PW/Makefile <<'EOF'
|
|
|
|
/^#EXCLEXCL/,/^#INCLINCL/d
|
|
|
|
w Makefile
|
|
|
|
q
|
|
|
|
EOF
|
1986-10-20 17:40:41 +00:00
|
|
|
for i in `cat $PW/Cfiles`
|
1986-09-25 19:39:06 +00:00
|
|
|
do
|
|
|
|
cat >> Makefile <<EOF
|
1986-10-22 15:38:24 +00:00
|
|
|
|
1986-10-20 17:40:41 +00:00
|
|
|
$i: clashes $PW/$i
|
1986-12-10 15:13:04 +00:00
|
|
|
\$(CID) -Fclashes < $PW/$i > $i
|
1986-09-25 19:39:06 +00:00
|
|
|
EOF
|
|
|
|
done
|
1988-09-20 13:31:57 +00:00
|
|
|
make EMHOME=$EMHOME CURRDIR=$currdir COPTIONS=$options $target
|