do not write over distribution files

This commit is contained in:
ceriel 1988-07-26 19:22:11 +00:00
parent 84acaa1163
commit 0c0ff5f64b
3 changed files with 51 additions and 25 deletions

View file

@ -4,4 +4,6 @@ first
did_first did_first
myecho.c myecho.c
fixlexlib fixlexlib
cc.xenix cc.xenix.src
local.h.src
em_path.h.src

View file

@ -34,7 +34,7 @@ echo "/tmp and /usr/tmp ok"
echo setting ACK HOME Directory in ../h/em_path.h ... echo setting ACK HOME Directory in ../h/em_path.h ...
rm -f em_path.h rm -f em_path.h
HM=`cd ..; pwd` HM=`cd ..; pwd`
sed -e "/^#define[ ]*EM_DIR/s@\".*\"@\"$HM\"@" <../h/em_path.h >em_path.h sed -e "/^#define[ ]*EM_DIR/s@\".*\"@\"$HM\"@" <em_path.h.src >em_path.h
if cmp ../h/em_path.h em_path.h >/dev/null 2>&1 if cmp ../h/em_path.h em_path.h >/dev/null 2>&1
then then
: Don't touch ../h/em_path.h, it's already correct : Don't touch ../h/em_path.h, it's already correct
@ -118,6 +118,8 @@ fi
: "Take action according to the system used" : "Take action according to the system used"
: 'Prevent the use of the system assembler on for certain systems' : 'Prevent the use of the system assembler on for certain systems'
: 'prevent the use of ranlib on pdp 11s' : 'prevent the use of ranlib on pdp 11s'
cp ../lib/vax4/descr.src ../lib/vax4/descr
cp ../lib/descr/fe.src ../lib/descr/fe
echo "take some actions according to system used ..." echo "take some actions according to system used ..."
case `ack_sys` in case `ack_sys` in
pdp_*) RMD="vax4" pdp_*) RMD="vax4"
@ -134,7 +136,6 @@ do
echo "disabling use of local assembler and loader for $i" echo "disabling use of local assembler and loader for $i"
if grep '^name as$' descr >/dev/null 2>&1 if grep '^name as$' descr >/dev/null 2>&1
then then
cp descr descr.orig
ed - descr <<'ABC' ed - descr <<'ABC'
/^name as$/;/^end$/d /^name as$/;/^end$/d
/^name ld$/;/^end$/d /^name ld$/;/^end$/d
@ -146,7 +147,6 @@ ABC
done done
case `ack_sys` in case `ack_sys` in
vax_bsd4_2) ( cd ../lib/vax4 vax_bsd4_2) ( cd ../lib/vax4
cp descr descr.orig
ed - descr <<'ABC' ed - descr <<'ABC'
/CPP_F/s/$/ -D__BSD4_2/ /CPP_F/s/$/ -D__BSD4_2/
w w
@ -155,7 +155,6 @@ ABC
) )
;; ;;
vax_sysV_2) ( cd ../lib/vax4 vax_sysV_2) ( cd ../lib/vax4
cp descr descr.orig
ed - descr <<'ABC' ed - descr <<'ABC'
/CPP_F/s/$/ -D__USG/ /CPP_F/s/$/ -D__USG/
w w
@ -182,7 +181,7 @@ SMALL) ACM=i86 ; BM = 0 ; SYS=SYS_5 ;;
*) ACM=m68k2 ; SYS=SYS_5 ;; *) ACM=m68k2 ; SYS=SYS_5 ;;
esac esac
rm -f local.h rm -f local.h
sed -e /ACKM/s/'".*"'/'"'$ACM'"'/ -e /BIGMACH/s/'[01]'/$BM/ -e /SYSTEM/s/'^#[ ]*define[ ]*[a-zA-Z_][a-zA-Z0-9_]*'/"# define $SYS"/ < ../h/local.h >local.h sed -e /ACKM/s/'".*"'/'"'$ACM'"'/ -e /BIGMACH/s/'[01]'/$BM/ -e /SYSTEM/s/'^#[ ]*define[ ]*[a-zA-Z_][a-zA-Z0-9_]*'/"# define $SYS"/ < local.h.src >local.h
if cmp -s ../h/local.h local.h if cmp -s ../h/local.h local.h
then then
echo "../h/local.h already correct" echo "../h/local.h already correct"
@ -236,7 +235,7 @@ xenix3)
echo 'not recognize its own line directives.' echo 'not recognize its own line directives.'
echo 'You can remove this "cc" script from the EM bin directory' echo 'You can remove this "cc" script from the EM bin directory'
echo 'when installation is done.' echo 'when installation is done.'
cp cc.xenix cc.xenix.orig cp cc.xenix.src cc.xenix
ed - cc.xenix <<ABC ed - cc.xenix <<ABC
/EMHOME/s/=.*/=$HM/ /EMHOME/s/=.*/=$HM/
w w
@ -246,17 +245,17 @@ ABC
chmod +x ../bin/cc chmod +x ../bin/cc
echo "code-generators and peephole optimizer need more stack than the default." echo "code-generators and peephole optimizer need more stack than the default."
echo "adapting LDFLAGS in Makefiles" echo "adapting LDFLAGS in Makefiles"
for i in ../mach/*/*cg/Makefile for i in ../mach/*/*cg
do do
cp $i $i.orig cp $i/Makefile $i/makefile
ed - $i <<ABC ed - $i/makefile <<ABC
/LDFLAGS/s/$/ -F 3000/ /LDFLAGS/s/$/ -F 3000/
w w
q q
ABC ABC
done done
cp ../util/opt/Makefile ../util/opt/Makefile.orig cp ../util/opt/Makefile ../util/opt/makefile
ed - ../util/opt/Makefile <<ABC ed - ../util/opt/makefile <<ABC
/LDFLAGS/s/$/-F 2000/ /LDFLAGS/s/$/-F 2000/
w w
q q
@ -266,7 +265,13 @@ ABC
do do
if grep -s "name asopt" $i if grep -s "name asopt" $i
then then
cp $i $i.top if [ -f $i.top ]
then
:
else
mv $i $i.top
fi
cp $i.top $i
ed - $i <<ABC ed - $i <<ABC
/name asopt/;/^end/d /name asopt/;/^end/d
w w
@ -277,9 +282,9 @@ ABC
echo "the -l option in cc command puts library in wrong place." echo "the -l option in cc command puts library in wrong place."
echo "this is a problem with the lex library for the occam compiler." echo "this is a problem with the lex library for the occam compiler."
echo "changing Makefile for Occam compiler" echo "changing Makefile for Occam compiler"
cp ../lang/occam/comp/Makefile ../lang/occam/comp/Makefile.orig cp ../lang/occam/comp/Makefile ../lang/occam/comp/makefile
ed - ../lang/occam/comp/Makefile <<ABC ed - ../lang/occam/comp/makefile <<ABC
/LEXLIB/s.-l[a-z]*./lib/Slibl.a. /LEXLIB/s;-l.*;/lib/Slibl.a;
w w
q q
ABC ABC
@ -290,20 +295,20 @@ X0)
echo "set some installation pararmeters for small machines" echo "set some installation pararmeters for small machines"
( cd ../lang/cem/cemcom ( cd ../lang/cem/cemcom
cp SmallPars Parameters cp SmallPars Parameters
cp makefile makefile.orig cp Makefile makefile
ed - makefile <<ABC ed - makefile <<ABC
/MALLOC/s/=/=#/ /MALLOC/s/=/=#/
w w
q q
ABC ABC
cd ../../../util/cpp cd ../../../util/cpp
ed - Makefile <<ABC cp Makefile makefile
ed - makefile <<ABC
/MALLOC/s/=/=#/ /MALLOC/s/=/=#/
w w
q q
ABC ABC
cd ../../lib/descr cd ../../lib/descr
cp fe fe.orig
ed - fe << ABC ed - fe << ABC
/em_cemcom/i /em_cemcom/i
prep always prep always
@ -322,7 +327,13 @@ ABC
) )
done done
( cd ../modules/src/malloc ( cd ../modules/src/malloc
cp param.h param.h.orig if [ -f param.h.orig ]
then
:
else
mv param.h param.h.orig
fi
cp param.h.orig param.h
ed - param.h <<ABC ed - param.h <<ABC
/STORE/s/define/undef/ /STORE/s/define/undef/
w w
@ -331,8 +342,8 @@ ABC
) )
( cd ../lang/m2/comp ( cd ../lang/m2/comp
cp SmallPars Parameters cp SmallPars Parameters
cp Makefile Makefile.orig cp Makefile makefile
ed - Makefile <<ABC ed - makefile <<ABC
/MALLOC/s/=/=#/ /MALLOC/s/=/=#/
w w
q q
@ -342,7 +353,13 @@ ABC
: machines with word or pointer size not 2 : machines with word or pointer size not 2
for i in em24 em44 m68020 m68k2 m68k4 mantra ns sun2 sun3 vax4 for i in em24 em44 m68020 m68k2 m68k4 mantra ns sun2 sun3 vax4
do do
cp $i/Action $i/Action.orig if [ -f $i/Action.orig ]
then
:
else
mv $i/Action $i/Action.orig
fi
cp $i/Action.orig $i/Action
ed - $i/Action <<ABC ed - $i/Action <<ABC
/odula-2/;/^end/s/^/!/ /odula-2/;/^end/s/^/!/
w w
@ -351,7 +368,13 @@ ABC
done done
) )
( cd .. ( cd ..
cp Action Action.orig if [ -f Action.orig ]
then
:
else
mv Action Action.orig
fi
cp Action.orig Action
ed - Action <<ABC ed - Action <<ABC
/EM interpreter in C/;/^end/s/^/!/ /EM interpreter in C/;/^end/s/^/!/
w w

View file

@ -57,7 +57,8 @@ Xsucces)
for i in ../util/opt ../util/cgg ../util/ncgg ../lang/occam/comp for i in ../util/opt ../util/cgg ../util/ncgg ../lang/occam/comp
do do
( cd $i ( cd $i
ed - Makefile << EOF cp Makefile makefile
ed - makefile << EOF
/^LEXLIB/c /^LEXLIB/c
LEXLIB = $LEX LEXLIB = $LEX
. .