exit 7
fi
fi
+: translate myecho
+if cc -o myecho myecho.c > /dev/null 2>&1
+then
+ :
+else
+ echo "Sorry, cc does not seem to work"
+ exit 8
+fi
+: find cc option for lex library
+if fixlexlib
+then
+ :
+else
+ exit 9
+fi
: remove non-system as and ld from descr files
if (ack_sys) >/dev/null 2>&1
then
: echo Your system is: `ack_sys`.
else
- echo -n "Give me the type of your system, the current choice is:
-pdp_v7 PDP11 with sep I/D and version 7
+ myecho -n "Give me the type of your system, the current choice is:
+pdp_v7 PDP11 with sep I/D and version 7 (or BSD 2.8, 2.9)
vax_bsd4_1a VAX11 with BSD4.1a
-vax_bsd4_1c VAX11 with BSD4.1c
vax_bsd4_2 VAX11 with BSD4.2
+vax_sysV_2 VAX11 with System V.2
pc_ix IBM PC with PC/IX
m68_unisoft Motorola 68000 with Unisoft UNIX
+sun3 Sun 3 M68020 workstation
+sun2 Sun 2 M68000 workstation
+m68_sysV_0 Motorola 68000 with Uniplus System V.0 Unix
ANY Neither of the above
system type: "
echo echo "$SYSNAME" >../bin/ack_sys
chmod +x ../bin/ack_sys
case `ack_sys` in
- pdp_v7|vax_bsd4_1[ac]|vax_bsd4_2|pc_ix|m68_unisoft) ;;
+ pdp_v7|vax_bsd4_1a|vax_bsd4_2|vax_sysV_2|pc_ix|m68_unisoft|sun3|sun2|m68_sysV_0) ;;
*) echo None of the software especially intended for the named systems will work ;;
esac
else
echo Sorry, got EOF when reading system name.
- exit 8
+ exit 10
fi
fi
echo -n "Your system is `ack_sys`, are you satisfied with that? (y/n) "
exec sh $0
;;
*) echo "I do not understand your answer ($YESNO). Bye"
- exit 9
+ exit 11
;;
esac
else
echo Sorry, got EOF when reading your answer.
- exit 9
+ exit 12
fi
: "Take action according to the system used"
: 'Prevent the use of the system assembler on for certain systems'
case `ack_sys` in
vax_bsd*) RMD=pdp ;;
-pdp_*) RMD="vax2 vax4" ;;
-*) RMD="pdp vax2 vax4" ;;
+vax_sys*) RMD=pdp ;;
+pdp_*) RMD="vax4" ;;
+*) RMD="pdp vax4" ;;
esac
for i in $RMD
do
fi
)
done
+case `ack_sys` in
+vax_bsd4_2) ( cd ../lib/vax4
+ ed - descr <<'ABC'
+/CPP_F/s/$/-D__BSD4_2/
+w
+q
+ABC
+ )
+ ;;
+vax_sysV_2) ( cd ../lib/vax4
+ ed - descr <<'ABC'
+/CPP_F/s/$/-D__USG/
+w
+q
+ABC
+ )
+ ;;
+esac
: 'Set the default machine in ../h/local.h'
+BM=1
case `ack_sys` in
-pdp_v7) ACM=pdp ;;
-vax_bsd4_1[ac]) ACM=vax2 ;;
-vax_bsd4_2) ACM=vax2 ;;
-pc_ix) ACM=ix ;;
+pdp_v7) ACM=pdp ; BM=0 ;;
+vax_bsd4_1a) ACM=vax4 ;;
+vax_bsd4_2) ACM=vax4 ;;
+vax_sysV_2) ACM=vax4 ;;
+pc_ix) ACM=i86 ; BM=0;;
+sun3) ACM=sun3 ;;
+sun2) ACM=sun2 ;;
m68_unisoft) ACM=m68k2 ;;
+m68_sysV_0) ACM=mantra ;;
*) ACM=m68k2 ;;
esac
rm -f local.h
-sed /ACKM/s/'".*"'/'"'$ACM'"'/ <../h/local.h >local.h
+sed -e /ACKM/s/'".*"'/'"'$ACM'"'/ -e /BIGMACH/s/'[01]'/$BM/ < ../h/local.h >local.h
if cmp -s ../h/local.h local.h
then :
else
fi
echo "Your default machine to compile for is $ACM"
case `ack_sys` in
-vax_bsd4_*)
- echo 'Installing the include directory in lib/vax2'
- ( cd ../lib/vax2 ; sh fetch_inc )
- echo Done
- case `ack_sys` in
- vax_bsd4_1a) VERS=BSD41a ;;
- vax_bsd4_1c) VERS=BSD41c ;;
- vax_bsd4_2) VERS=BSD42 ;;
- *) echo "Unknown VAX BSD version, look at mach/vax[24]/libem"
- break ;;
- esac
- for i in vax2 vax4
- do (
- cd ../mach/$i/libem
- ed - system.h <<ABC
-g/^#/s/.*/\/* & *\//
-/$VERS/s/^.*#/#/
-/$VERS/s/*\/.*$//
+vax_bsd4_2)
+ ( cd ../mach/vax4
+ echo "Copying mach/vax4/libbsd4_2 to mach/vax4/libsys"
+ mkdir libsys
+ rm -f libsys/*
+ cp libbsd4_2/* libsys
+ABC
+ )
+ ;;
+vax_sysV_2)
+ ( cd ../mach/vax4
+ echo "Copying mach/vax4/libsysV_2 to mach/vax4/libsys"
+ mkdir libsys
+ rm -f libsys/*
+ cp libsysV_2/* libsys
+ )
+ ;;
+esac
+case X$BM in
+X0)
+ ( cd ../lang/cem/cemcom
+ cp SmallPars Parameters
+ cd ../../../lib/descr
+ cp fe fe.orig
+ ed - fe << ABC
+/em_cemcom/i
+ prep always
+.
w
q
ABC
- ) done
- echo 'mach/vax[24]/libem/system.h reflects your BSD version.'
+ )
+ for i in ../mach/vax4/cg ../mach/m68k2/cg
+ do
+ ( cd $i
+ cp tables1.c tables.c
+ cp tables1.h tables.h
+ )
+ done
+ ;;
+*) ( cd ../lang/cem/cemcom
+ cp BigPars Parameters
+ )
+ ;;
esac