home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / bash / bash-108 / bash-108.zoo / bash-1.08 / INSTALL < prev    next >
Encoding:
Text File  |  1991-05-15  |  6.6 KB  |  192 lines

  1. File: bash.info,  Node: Install,  Next: Invoke,     Prev: Built-in,  Up: Top
  2.  
  3. Installing BASH
  4. ***************
  5.  
  6. To install BASH you simply type `make'.     The BASH `Makefile' tries
  7. to dynamically figure out what kind of machine and operating system
  8. you are using.    It makes an educated guess based on the information
  9. it finds.
  10.  
  11. During the `make' process, a message is displayed describing what
  12. machine and operating system has been chosen for you.  This
  13. information is also saved in the file `.machine' so you can look at
  14. it later.
  15.  
  16. Therefore, for most machines, simply follow this simple checklist
  17. to install BASH:
  18.  
  19.   1. Type `make'.
  20.  
  21.   2. Wait for the compilation to finish.
  22.  
  23.   3. Type `./bash' to see if the compile worked.
  24.  
  25.   4. Type `make install DESTDIR=/usr/gnu/bin' (or wherever you
  26.      keep GNU binaries) to copy bash to your binaries directory.
  27.  
  28. * Menu:
  29.  
  30. * Problems::  What to do if BASH doesn't install quite so easily.
  31.  
  32. * Files::     Files used in the `make' process.
  33.  
  34. * Porting::   Porting BASH to a new machine.
  35.  
  36. * Bugs::      What to do if you Discover Bugs in BASH.
  37.  
  38.  
  39. File: bash.info,  Node: Problems,  Next: Files,     Prev: Install,     Up: Install
  40.  
  41. What if it Doesn't Install so Easily?
  42. =====================================
  43.  
  44. Sometimes BASH gets confused and will make the wrong assumptions
  45. about your machine or operating system.     If the displayed
  46. information (also found in `.machine') is incorrect, you will have
  47. to edit the file `machines.h' and provide the appropriate
  48. information so that BASH can be installed correctly.  The complete
  49. instructions for doing this are located in the `machines.h' file.
  50.  
  51. However, if BASH says that your machine type is an
  52. "UNKNOWN_MACHINE", or BASH thought it knew something about your
  53. machine but was wrong, then reading the next few sections could be
  54. of use to you (*note Files::., and *note Porting::., for more
  55. information).
  56.  
  57.  
  58. File: bash.info,  Node: Files,    Next: Porting,    Prev: Problems,     Up: Install
  59.  
  60. Files Used in the `make' Process.
  61. =================================
  62.  
  63. The following files are used during the installation of BASH, in
  64. the `make' process:
  65.  
  66. `Makefile'
  67.      This is responsible for making the actual `Makefile' that is
  68.      used to create Bash.  It runs the C preprocessor (usually
  69.      located in `/lib/cpp') on the file `cpp-Makefile', producing
  70.      the output file `bash-Makefile'.
  71.  
  72. `cpp-Makefile'
  73.      This is a file of C comments and text.  It contains a
  74.      reasonable number of `ifdefs' which control what files get
  75.      compiled and which flags are passed to the various C files
  76.      comprising BASH.  It includes a file called `machines.h',
  77.      `sysdefs.h', and `config.h'.
  78.  
  79. `machines.h'
  80.      This file contains the basic compilation parameters for all of
  81.      the machines to which BASH has been ported.  This file
  82.      consists of a series of conditional blocks, one per machine
  83.      type.
  84.  
  85.      These conditional blocks are depend upon the unique identifier
  86.      that `cpp' has predefined for this machine.  In some cases,
  87.      additional information can be passed from `Makefile'.  It is
  88.      possible to pass information such as whether or not a
  89.      particular file is available on this system, and so on.
  90.  
  91. `sysdefs.h'
  92.      This file is dynamically made at build time by running the shell
  93.      script `makeargs.sh'.  If there appears to be something wrong in
  94.      this file, then edit the `makeargs.sh' script, and mail the
  95.      changes that you make to bash-maintainers@ai.mit.edu.
  96.  
  97. `bash-Makefile'
  98.      This is the output from the initial stage of `make'.  It is a
  99.      stripped down version of `cpp-Makefile' which is tailor-made
  100.      for your machine and operating system.  All subsequent `makes'
  101.      use this file.
  102.  
  103.  
  104. File: bash.info,  Node: Porting,  Next: Bugs,  Prev: Files,  Up: Install
  105.  
  106. What if You Have to Port to a New Machine?
  107. ==========================================
  108.  
  109. Sometimes you may want to port BASH to a new, previously
  110. unsupported machine.  To do so you need to create a block in
  111. `machines.h' which is conditional based on a unique identifier
  112. present in your version of the C preprocessor.
  113.  
  114. If you don't know what that symbol is, you might try the following
  115. simple test:
  116.  
  117.      echo "main () { }" > foo.c
  118.      cc -v foo.c
  119.  
  120. You are looking for `-DMACHINE', where `MACHINE' is an identifier
  121. for your machine.  If you are very unlucky and your machine's C
  122. preprocessor doesn't have a unique identifier, you will have to
  123. define the identifier in Makefile manually.
  124.  
  125. Let's say you have a machine from Yoyodyne Industries, called the
  126. YoYo.  It runs a version of BSD, so it is reasonably compatible. 
  127. However, the `cpp' on this YoYo machine doesn't define any unique
  128. identifiers.  You should change the `Makefile' line for `CPPFLAGS'
  129. to:
  130.  
  131.      CPPFLAGS = -P -DYoYo
  132.  
  133. Then, in `machines.h', you copy the block for `UNKNOWN_MACHINE',
  134. and change the conditional to;
  135.  
  136.      #if defined (YoYo)
  137.  
  138. Inside of the YoYo block you define `M_MACHINE="YoYo"', and
  139. `M_OS=BSD'.  You also modify the existing defines to match your
  140. machine's software.
  141.  
  142. If BASH still won't compile, perhaps because of missing code that
  143. is required for your YoYo machine, you will have to write that code
  144. and place it within a conditional block based on YoYo.
  145.  
  146. Most machines aren't that difficult; simply redefining a few of the
  147. default values is sufficient.  If you do run across a difficult
  148. machine, please send all fixes and changes to
  149. bash-maintainers@ai.mit.edu in the form of context diffs:
  150.  
  151.      diff -c orig-machines.h machines.h >machines.diffs
  152.  
  153. Please include information about which version of the shell you have.
  154.  
  155.  
  156. File: bash.info,  Node: Bugs,  Prev: Porting,  Up: Install
  157.  
  158. Reporting Bugs
  159. ==============
  160.  
  161. If you find a bug in bash, you should report it.  But first you
  162. should make sure that it really is a bug and that it appears in the
  163. latest version of BASH that is available.
  164.  
  165. Once you have ascertained that a bug really exists, you are welcome
  166. to mail in a bug report.  If you have a fix, please mail that too!
  167.  
  168. Suggestions and "philosophical" bug reports should be mailed to
  169. bug-bash@ai.mit.edu.  Genuine bug reports should be mailed to the
  170. same place, or to bash-maintainers@ai.mit.edu.
  171.  
  172. *All* bug reports should include:
  173.  
  174.    * The version number of BASH.
  175.  
  176.    * The hardware and operating system used.
  177.  
  178.    * The compiler used to compile BASH.
  179.  
  180.    * A description of the bug's behavior.
  181.  
  182.    * A short script or "recipe" which demonstrates the bug.
  183.  
  184. Without this information, it is generally not possible to
  185. successfully debug BASH.  Usually, without this information, the
  186. bug won't manifest itself!
  187.  
  188. Discussion and questions about BASH in general (including questions
  189. about this documentation) can be sent to bug-maintainers@ai.mit.edu.
  190.  
  191.  
  192.