get_sys 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. rm -f em_path.h
  2. echo "You will now be asked for the root directory of the ACK sources.
  3. This directory will not be changed by the installation process.
  4. "
  5. while :
  6. do
  7. echo $E_FLAG "Please give the root of the ACK source tree,
  8. an absolute path: [$SRC_HOME] $E_SFX"
  9. . $FDIR/get_answer
  10. case $ANS in
  11. '') ANS="$SRC_HOME" ;;
  12. esac
  13. SRC_HOME="$ANS"
  14. case $SRC_HOME in
  15. /*) break;
  16. ;;
  17. *) echo "$SRC_HOME is not an absolute path; try again"
  18. ;;
  19. esac
  20. done
  21. echo "You will now be asked for a configuration directory. This is
  22. the directory in which the compilations will take place. The tree that
  23. resides in it will have the same structure as the ACK source tree, but
  24. the directories will usually only contain Makefiles and .o files.
  25. "
  26. while :
  27. do
  28. echo $E_FLAG "Please give the root of the configuration tree,
  29. an absolute path: [$CONFIG] $E_SFX"
  30. . $FDIR/get_answer
  31. case $ANS in
  32. '') ANS="$CONFIG";;
  33. esac
  34. CONFIG="$ANS"
  35. case $CONFIG in
  36. /*) break;
  37. ;;
  38. *) echo "$CONFIG is not an absolute path; try again"
  39. ;;
  40. esac
  41. done
  42. echo "You will now be asked for the root directory of the ACK binaries. After
  43. installation, this directory will have subdirectories bin, lib, lib.bin,
  44. man, h, config, include, modules, doc.
  45. Four of these directories will contain stuff that depends on the machine
  46. for which the ACK binaries are made: bin, modules, config, and lib.bin. The
  47. other sub-directories (lib, man, h, include and doc) will contain
  48. machine-independent stuff.
  49. This information may be useful if you want to use ACK on different platforms
  50. and you have a shared file system. See the installation manual.
  51. "
  52. while :
  53. do
  54. echo $E_FLAG "Please give the root of the ACK binaries,
  55. an absolute path: [$TARGET_HOME] $E_SFX"
  56. . $FDIR/get_answer
  57. case $ANS in
  58. '') ANS="$TARGET_HOME";;
  59. esac
  60. TARGET_HOME="$ANS"
  61. case $TARGET_HOME in
  62. /*) break;
  63. ;;
  64. *) echo "$TARGET_HOME is not an absolute path; try again"
  65. ;;
  66. esac
  67. done
  68. sed -e "/^#define[ ]*EM_DIR/s@\".*\"@\"$TARGET_HOME\"@" <$FDIR/em_path.h.src >em_path.h
  69. echo "You will now be asked for the type of the system that you want
  70. ACK binaries produced for. This is not neccessarily the system you
  71. run this program on. In this case, if you have not done so already,
  72. you will have to install ACK on the current machine first.
  73. "
  74. echo "Give me the type of the system, the current choice is:
  75. vax_bsd4_1a VAX11 with BSD4.1a
  76. vax_bsd4_2 VAX11 with BSD4.2
  77. vax_sysV_2 VAX11 with System V.2
  78. i386 Intel 80386 system running Xenix System V
  79. sun3 Sun 3 M68020 workstation
  80. sun2 Sun 2 M68000 workstation
  81. m68_sysV_0 Motorola 68000 with Uniplus System V.0 Unix
  82. m68020 Motorola M68020 VME131 running Unix System V/68 R2V2.1
  83. sparc SUN SPARC workstation running SunOs 4
  84. sparc_solaris SUN SPARC workstation running solaris 2
  85. ANY Neither of the above
  86. "
  87. echo $E_FLAG "system type: [$SYSNAME] $E_SFX"
  88. . $FDIR/get_answer
  89. case $ANS in
  90. '') ANS="$SYSNAME";;
  91. esac
  92. SYSNAME="$ANS"
  93. while :
  94. do
  95. echo $E_FLAG "Is this the system you are running on? (y/n) [$CURRENT] $E_SFX"
  96. . $FDIR/get_answer
  97. case $ANS in
  98. '') ANS="$CURRENT";;
  99. esac
  100. case X$ANS in
  101. Xj*|Xy*|X) UTIL_HOME=$TARGET_HOME
  102. CURRENT=y
  103. break
  104. ;;
  105. Xn*) CURRENT=n
  106. echo "You will now be asked for the root directory of ACK on the current machine.
  107. This tree will not be changed by the installation process.
  108. "
  109. while :
  110. do
  111. echo $E_FLAG "Please give the root of a runnable ACK tree,
  112. an absolute path: [$UTIL_HOME] $E_SFX"
  113. . $FDIR/get_answer
  114. case $ANS in
  115. '') ANS="$UTIL_HOME" ;;
  116. esac
  117. UTIL_HOME="$ANS"
  118. case $UTIL_HOME in
  119. /*) break;
  120. ;;
  121. *) echo "$UTIL_HOME is not an absolute path; try again"
  122. ;;
  123. esac
  124. done
  125. break
  126. ;;
  127. *) echo "I do not understand your answer ($ANS). Try again."
  128. ;;
  129. esac
  130. done
  131. while :
  132. do
  133. echo "The system to install ACK for is $SYSNAME,
  134. the root of the ACK source tree is $SRC_HOME,
  135. the root of the configuration tree is $CONFIG,
  136. the root of the ACK binary tree to be created is $TARGET_HOME,
  137. and the root of a runnable ACK binary tree is $UTIL_HOME.
  138. If the machine to compile ACK for is the current machine, the last two names
  139. may be identical."
  140. echo $E_FLAG "Are you satisfied with all this? (y/n) $E_SFX"
  141. . $FDIR/get_answer
  142. case X$ANS in
  143. Xj*|Xy*|X) break
  144. ;;
  145. Xn*) echo Ok, I will give you another chance....
  146. . $0
  147. break
  148. ;;
  149. *) echo "I do not understand your answer ($ANS). Try again."
  150. ;;
  151. esac
  152. done