From 2e7ca940c23d54badcd21af06f5cc55b980727c7 Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 17 Mar 1987 00:14:10 +0000 Subject: [PATCH] many changes for installing 3rd distribution --- first/first | 131 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 97 insertions(+), 34 deletions(-) diff --git a/first/first b/first/first index 68b13e53d..b1f3a2967 100755 --- a/first/first +++ b/first/first @@ -34,18 +34,36 @@ else 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: " @@ -54,12 +72,12 @@ 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) " @@ -72,19 +90,20 @@ then 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 @@ -101,17 +120,40 @@ ABC 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 @@ -120,27 +162,48 @@ 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 <