Made installation of fast compilers optional, removed own version of 'echo'

This commit is contained in:
ceriel 1991-11-18 09:53:58 +00:00
parent be802650ca
commit a0f00e0b2b
8 changed files with 78 additions and 38 deletions

View file

@ -13,6 +13,5 @@ local.h.src
mk_config mk_config
mk_makefile mk_makefile
mk_target mk_target
myecho.c
target_comp target_comp
util_comp util_comp

View file

@ -5,6 +5,14 @@ case $0 in
first) FDIR=. first) FDIR=.
;; ;;
esac esac
if echo 'a\c' | grep 'c' >/dev/null ; then
E_FLAG='-n' E_SFX='' : We have BSD-like echo command.
else
E_FLAG='' E_SFX='\c' : We have SystemV-like echo command.
fi
export E_FLAG E_SFX
echo check write-ability of /tmp and /usr/tmp ... echo check write-ability of /tmp and /usr/tmp ...
if ( >/usr/tmp/aaax.$$ ) if ( >/usr/tmp/aaax.$$ )
then then
@ -22,19 +30,6 @@ else
fi fi
echo "/tmp and /usr/tmp ok" echo "/tmp and /usr/tmp ok"
if [ -f echo ]
then :
else
echo compile own echo program, so that we know how it works ...
if cc -o echo $FDIR/myecho.c > /dev/null 2>&1
then
echo compilation succeeded
else
echo "Sorry, cc does not seem to work"
exit 8
fi
fi
if [ -f macros ] if [ -f macros ]
then then
. macros . macros
@ -100,7 +95,7 @@ compile for. Choices:"
done done
ACM=$OLDACM ACM=$OLDACM
echo $l echo $l
./echo -n "Your choice: [$OLDACM] " echo $E_FLAG "Your choice: [$OLDACM] $E_SFX"
. $FDIR/get_answer . $FDIR/get_answer
case $ANS in case $ANS in
'') ANS="$ACM";; '') ANS="$ACM";;
@ -121,7 +116,7 @@ Choices:
BSD4_1 for Berkeley 4.1 BSD4_1 for Berkeley 4.1
BSD4_2 for Berkeley 4.2, 4.3, SunOS BSD4_2 for Berkeley 4.2, 4.3, SunOS
SYS_5 for Xenix, System III, System V' SYS_5 for Xenix, System III, System V'
./echo -n "Your choice (V7|BSD4_1|BSD4_2|SYS_5): [$OLDSYS] " echo $E_FLAG "Your choice (V7|BSD4_1|BSD4_2|SYS_5): [$OLDSYS] $E_SFX"
. $FDIR/get_answer . $FDIR/get_answer
case $ANS in case $ANS in
'') ANS="$SYS";; '') ANS="$SYS";;
@ -149,7 +144,7 @@ answer no to the next question. Otherwise, answer yes, and you will be
prompted for details" prompted for details"
while : while :
do do
./echo -n "Do you want to limit the installation in any way? (y/n) [$LIMIT] " echo $E_FLAG "Do you want to limit the installation in any way? (y/n) [$LIMIT] $E_SFX"
. $FDIR/get_answer . $FDIR/get_answer
case $ANS in case $ANS in
'') ANS="$LIMIT";; '') ANS="$LIMIT";;
@ -189,6 +184,7 @@ echo "SYSVAX=\"$SYSVAX\"; export SYSVAX" >> macros
echo "MACH=\"$MACH\"; export MACH" >> macros echo "MACH=\"$MACH\"; export MACH" >> macros
echo "WS=\"$WS\"; export WS" >> macros echo "WS=\"$WS\"; export WS" >> macros
echo "PS=\"$PS\"; export PS" >> macros echo "PS=\"$PS\"; export PS" >> macros
echo "DO_FAST=\"$DO_FAST\"; export DO_FAST" >> macros
cat macros $FDIR/install_tail > INSTALL cat macros $FDIR/install_tail > INSTALL
chmod +x INSTALL chmod +x INSTALL

View file

@ -30,13 +30,13 @@ EOF
rm -f t$$ a.out ws.[co] rm -f t$$ a.out ws.[co]
else else
: we will have to ask installer. : we will have to ask installer.
./echo -n "Please give the word-size of the target-machine (sizeof(int)) in bytes: [$WS] " echo $E_FLAG "Please give the word-size of the target-machine (sizeof(int)) in bytes: [$WS] $E_SFX"
. $FDIR/get_answer . $FDIR/get_answer
case $ANS in case $ANS in
'') ANS="$WS";; '') ANS="$WS";;
esac esac
WS="$ANS" WS="$ANS"
./echo -n "Please give the pointer-size of the target-machine (sizeof(char *)) in bytes: [$PS] " echo $E_FLAG "Please give the pointer-size of the target-machine (sizeof(char *)) in bytes: [$PS] $E_SFX"
. $FDIR/get_answer . $FDIR/get_answer
case $ANS in case $ANS in
'') ANS="$PS";; '') ANS="$PS";;

View file

@ -4,8 +4,8 @@ This directory will not be changed by the installation process.
" "
while : while :
do do
./echo -n "Please give the root of the ACK source tree, echo $E_FLAG "Please give the root of the ACK source tree,
an absolute path: [$SRC_HOME] " an absolute path: [$SRC_HOME] $E_SFX"
. $FDIR/get_answer . $FDIR/get_answer
case $ANS in case $ANS in
'') ANS="$SRC_HOME" ;; '') ANS="$SRC_HOME" ;;
@ -25,8 +25,8 @@ the directories will usually only contain Makefiles and .o files.
" "
while : while :
do do
./echo -n "Please give the root of the configuration tree, echo $E_FLAG "Please give the root of the configuration tree,
an absolute path: [$CONFIG] " an absolute path: [$CONFIG] $E_SFX"
. $FDIR/get_answer . $FDIR/get_answer
case $ANS in case $ANS in
'') ANS="$CONFIG";; '') ANS="$CONFIG";;
@ -51,8 +51,8 @@ and you have a shared file system. See the installation manual.
" "
while : while :
do do
./echo -n "Please give the root of the ACK binaries, echo $E_FLAG "Please give the root of the ACK binaries,
an absolute path: [$TARGET_HOME] " an absolute path: [$TARGET_HOME] $E_SFX"
. $FDIR/get_answer . $FDIR/get_answer
case $ANS in case $ANS in
'') ANS="$TARGET_HOME";; '') ANS="$TARGET_HOME";;
@ -84,7 +84,7 @@ m68020 Motorola M68020 VME131 running Unix System V/68 R2V2.1
sparc SUN SPARC workstation sparc SUN SPARC workstation
ANY Neither of the above ANY Neither of the above
" "
./echo -n "system type: [$SYSNAME] " echo $E_FLAG "system type: [$SYSNAME] $E_SFX"
. $FDIR/get_answer . $FDIR/get_answer
case $ANS in case $ANS in
'') ANS="$SYSNAME";; '') ANS="$SYSNAME";;
@ -93,7 +93,7 @@ SYSNAME="$ANS"
while : while :
do do
./echo -n "Is this the system you are running on? (y/n) [$CURRENT] " echo $E_FLAG "Is this the system you are running on? (y/n) [$CURRENT] $E_SFX"
. $FDIR/get_answer . $FDIR/get_answer
case $ANS in case $ANS in
'') ANS="$CURRENT";; '') ANS="$CURRENT";;
@ -109,8 +109,8 @@ This tree will not be changed by the installation process.
" "
while : while :
do do
./echo -n "Please give the root of a runnable ACK tree, echo $E_FLAG "Please give the root of a runnable ACK tree,
an absolute path: [$UTIL_HOME] " an absolute path: [$UTIL_HOME] $E_SFX"
. $FDIR/get_answer . $FDIR/get_answer
case $ANS in case $ANS in
'') ANS="$UTIL_HOME" ;; '') ANS="$UTIL_HOME" ;;
@ -139,7 +139,7 @@ the root of the ACK binary tree to be created is $TARGET_HOME,
and the root of a runnable ACK binary tree is $UTIL_HOME. and the root of a runnable ACK binary tree is $UTIL_HOME.
If the machine to compile ACK for is the current machine, the last two names If the machine to compile ACK for is the current machine, the last two names
may be identical." may be identical."
./echo -n "Are you satisfied with all this? (y/n) " echo $E_FLAG "Are you satisfied with all this? (y/n) $E_SFX"
. $FDIR/get_answer . $FDIR/get_answer
case X$ANS in case X$ANS in
Xj*|Xy*|X) break Xj*|Xy*|X) break

View file

@ -1,11 +1,11 @@
while : while :
do do
./echo -n "Which system-call library do you want to install for the VAX? echo $E_FLAG "Which system-call library do you want to install for the VAX?
You can choose between You can choose between
libbsd4_1a for Berkeley Unix 4.1 libbsd4_1a for Berkeley Unix 4.1
libbsd4_2 for Berkeley Unix 4.2 or newer, or Ultrix libbsd4_2 for Berkeley Unix 4.2 or newer, or Ultrix
libsysV_2 for Unix System V libsysV_2 for Unix System V
Your choice: [$SYSVAX] " Your choice: [$SYSVAX] $E_SFX"
. $FDIR/get_answer . $FDIR/get_answer
case $ANS in case $ANS in
'') ANS="$SYSVAX";; '') ANS="$SYSVAX";;

View file

@ -6,7 +6,8 @@ on a different machine, in particular if you have an NFS file system.
Therefore, it may not be neccessary to install them again. As this part Therefore, it may not be neccessary to install them again. As this part
of the ACK installation takes the most time, you are given the opportunity of the ACK installation takes the most time, you are given the opportunity
to disable installation of the machine-independent part" to disable installation of the machine-independent part"
./echo -n "Do you want to install the machine-independent part? (y/n) [$DO_MACHINE_INDEP] " echo $E_FLAG \
"Do you want to install the machine-independent part? (y/n) [$DO_MACHINE_INDEP] $E_SFX"
. $FDIR/get_answer . $FDIR/get_answer
case $ANS in case $ANS in
'') ANS="$DO_MACHINE_INDEP" ;; '') ANS="$DO_MACHINE_INDEP" ;;
@ -22,7 +23,7 @@ to disable installation of the machine-independent part"
echo echo
break break
;; ;;
*) ./echo "I do not understand your answer ($ANS). Try again." *) echo "I do not understand your answer ($ANS). Try again."
;; ;;
esac esac
done done
@ -30,7 +31,7 @@ for i in Modula-2 Pascal Occam Basic ANSI-C C Fortran
do do
while : while :
do do
./echo -n "Do you want to install $i? (y/n) " echo $E_FLAG "Do you want to install $i? (y/n) $E_SFX"
. $FDIR/get_answer . $FDIR/get_answer
case X$ANS in case X$ANS in
Xj*|Xy*|X) Xj*|Xy*|X)
@ -65,7 +66,7 @@ m68k4, pmds4, sun2, and mantra."
m68020) echo "not installing m68020 will disable installation of sun3." m68020) echo "not installing m68020 will disable installation of sun3."
;; ;;
esac esac
./echo -n "Do you want to install the $1 support? (y/n) " echo $E_FLAG "Do you want to install the $1 support? (y/n) $E_SFX"
. $FDIR/get_answer . $FDIR/get_answer
case X$ANS in case X$ANS in
Xj*|Xy*|X) Xj*|Xy*|X)
@ -127,9 +128,44 @@ m68k4, pmds4, sun2, and mantra."
esac esac
break break
;; ;;
*) ./echo "I do not understand your answer ($ANS). Try again." *) echo "I do not understand your answer ($ANS). Try again."
;; ;;
esac esac
done done
shift shift
done done
if [ $TARGET_HOME = $UTIL_HOME ]
then
case $ACM in
sun3|m68020|i386|vax*)
while :
do
echo $E_FLAG "Do you want to install the fast compilers? (y/n) [$DO_FAST] $E_SFX"
. $FDIR/get_answer
case $ANS in
'') ANS="$DO_FAST" ;;
esac
case X$ANS in
Xj*|Xy*|X)
DO_FAST=y
echo "The fast compilers will be installed"
break
;;
Xn*)
DO_FAST=n
echo "The fast compilers will not be installed"
break
;;
*) echo "I do not understand your answer ($ANS). Try again."
;;
esac
done
;;
*)
DO_FAST=n
;;
esac
else
DO_FAST=n
fi

View file

@ -161,3 +161,12 @@ EOF
done done
done done
fi fi
if [ $DO_FAST = n ]
then
ed - $CONFIG/Action <<'EOF'
/^name "Fast/;$s/^/!/
w
q
EOF
fi

View file

@ -87,7 +87,7 @@ EOF
fi fi
cd ../.. cd ../..
fi fi
for j in libem libend libmon libfp libsys libdb libce for j in libem libend libmon libfp libsys libdb
do do
if [ -d $i/$j ] if [ -d $i/$j ]
then then