From: ceriel Date: Mon, 18 Nov 1991 09:53:58 +0000 (+0000) Subject: Made installation of fast compilers optional, removed own version of 'echo' X-Git-Tag: release-5-5~624 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=a0f00e0b2b06bf6ba1ab0ae63ba7021c9da78306;p=ack.git Made installation of fast compilers optional, removed own version of 'echo' --- diff --git a/first/.distr b/first/.distr index 85922be46..200a3c3fe 100644 --- a/first/.distr +++ b/first/.distr @@ -13,6 +13,5 @@ local.h.src mk_config mk_makefile mk_target -myecho.c target_comp util_comp diff --git a/first/first b/first/first index 8e6bf5355..3105f6915 100755 --- a/first/first +++ b/first/first @@ -5,6 +5,14 @@ case $0 in first) FDIR=. ;; 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 ... if ( >/usr/tmp/aaax.$$ ) then @@ -22,19 +30,6 @@ else fi 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 ] then . macros @@ -100,7 +95,7 @@ compile for. Choices:" done ACM=$OLDACM echo $l - ./echo -n "Your choice: [$OLDACM] " + echo $E_FLAG "Your choice: [$OLDACM] $E_SFX" . $FDIR/get_answer case $ANS in '') ANS="$ACM";; @@ -121,7 +116,7 @@ Choices: BSD4_1 for Berkeley 4.1 BSD4_2 for Berkeley 4.2, 4.3, SunOS 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 case $ANS in '') ANS="$SYS";; @@ -149,7 +144,7 @@ answer no to the next question. Otherwise, answer yes, and you will be prompted for details" while : 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 case $ANS in '') ANS="$LIMIT";; @@ -189,6 +184,7 @@ echo "SYSVAX=\"$SYSVAX\"; export SYSVAX" >> macros echo "MACH=\"$MACH\"; export MACH" >> macros echo "WS=\"$WS\"; export WS" >> macros echo "PS=\"$PS\"; export PS" >> macros +echo "DO_FAST=\"$DO_FAST\"; export DO_FAST" >> macros cat macros $FDIR/install_tail > INSTALL chmod +x INSTALL diff --git a/first/get_makepars b/first/get_makepars index bd39e9c52..0c9b18bb0 100755 --- a/first/get_makepars +++ b/first/get_makepars @@ -30,13 +30,13 @@ EOF rm -f t$$ a.out ws.[co] else : 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 case $ANS in '') ANS="$WS";; esac 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 case $ANS in '') ANS="$PS";; diff --git a/first/get_sys b/first/get_sys index c8389148b..2378d1bcc 100755 --- a/first/get_sys +++ b/first/get_sys @@ -4,8 +4,8 @@ This directory will not be changed by the installation process. " while : do - ./echo -n "Please give the root of the ACK source tree, -an absolute path: [$SRC_HOME] " + echo $E_FLAG "Please give the root of the ACK source tree, +an absolute path: [$SRC_HOME] $E_SFX" . $FDIR/get_answer case $ANS in '') ANS="$SRC_HOME" ;; @@ -25,8 +25,8 @@ the directories will usually only contain Makefiles and .o files. " while : do - ./echo -n "Please give the root of the configuration tree, -an absolute path: [$CONFIG] " + echo $E_FLAG "Please give the root of the configuration tree, +an absolute path: [$CONFIG] $E_SFX" . $FDIR/get_answer case $ANS in '') ANS="$CONFIG";; @@ -51,8 +51,8 @@ and you have a shared file system. See the installation manual. " while : do - ./echo -n "Please give the root of the ACK binaries, -an absolute path: [$TARGET_HOME] " + echo $E_FLAG "Please give the root of the ACK binaries, +an absolute path: [$TARGET_HOME] $E_SFX" . $FDIR/get_answer case $ANS in '') ANS="$TARGET_HOME";; @@ -84,7 +84,7 @@ m68020 Motorola M68020 VME131 running Unix System V/68 R2V2.1 sparc SUN SPARC workstation ANY Neither of the above " -./echo -n "system type: [$SYSNAME] " +echo $E_FLAG "system type: [$SYSNAME] $E_SFX" . $FDIR/get_answer case $ANS in '') ANS="$SYSNAME";; @@ -93,7 +93,7 @@ SYSNAME="$ANS" while : 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 case $ANS in '') ANS="$CURRENT";; @@ -109,8 +109,8 @@ This tree will not be changed by the installation process. " while : do - ./echo -n "Please give the root of a runnable ACK tree, -an absolute path: [$UTIL_HOME] " + echo $E_FLAG "Please give the root of a runnable ACK tree, +an absolute path: [$UTIL_HOME] $E_SFX" . $FDIR/get_answer case $ANS in '') 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. If the machine to compile ACK for is the current machine, the last two names 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 case X$ANS in Xj*|Xy*|X) break diff --git a/first/get_sysvax b/first/get_sysvax index d56df368a..eee8f1271 100755 --- a/first/get_sysvax +++ b/first/get_sysvax @@ -1,11 +1,11 @@ while : 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 libbsd4_1a for Berkeley Unix 4.1 libbsd4_2 for Berkeley Unix 4.2 or newer, or Ultrix libsysV_2 for Unix System V -Your choice: [$SYSVAX] " +Your choice: [$SYSVAX] $E_SFX" . $FDIR/get_answer case $ANS in '') ANS="$SYSVAX";; diff --git a/first/limit_enquire b/first/limit_enquire index b93baed9a..6d49a571a 100644 --- a/first/limit_enquire +++ b/first/limit_enquire @@ -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 of the ACK installation takes the most time, you are given the opportunity 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 case $ANS in '') ANS="$DO_MACHINE_INDEP" ;; @@ -22,7 +23,7 @@ to disable installation of the machine-independent part" echo break ;; - *) ./echo "I do not understand your answer ($ANS). Try again." + *) echo "I do not understand your answer ($ANS). Try again." ;; esac done @@ -30,7 +31,7 @@ for i in Modula-2 Pascal Occam Basic ANSI-C C Fortran do while : 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 case X$ANS in Xj*|Xy*|X) @@ -65,7 +66,7 @@ m68k4, pmds4, sun2, and mantra." m68020) echo "not installing m68020 will disable installation of sun3." ;; 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 case X$ANS in Xj*|Xy*|X) @@ -127,9 +128,44 @@ m68k4, pmds4, sun2, and mantra." esac break ;; - *) ./echo "I do not understand your answer ($ANS). Try again." + *) echo "I do not understand your answer ($ANS). Try again." ;; esac done shift 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 diff --git a/first/limit_impl b/first/limit_impl index bf0f19501..5df6ad131 100755 --- a/first/limit_impl +++ b/first/limit_impl @@ -161,3 +161,12 @@ EOF done done fi + +if [ $DO_FAST = n ] +then + ed - $CONFIG/Action <<'EOF' +/^name "Fast/;$s/^/!/ +w +q +EOF +fi diff --git a/first/mk_config b/first/mk_config index b477a068a..7640624eb 100755 --- a/first/mk_config +++ b/first/mk_config @@ -87,7 +87,7 @@ EOF fi cd ../.. fi - for j in libem libend libmon libfp libsys libdb libce + for j in libem libend libmon libfp libsys libdb do if [ -d $i/$j ] then