Advertisement
Guest User

Mercury Install

a guest
Dec 18th, 2014
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 9.79 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. # INSTALL - installation instructions and installation script.
  4. #
  5. # You need GNU C (version 3.4.x or later -- note however that version 4.0 will
  6. # not work) and GNU Make (3.69 or later).  
  7. # Make sure that they are somewhere in your PATH.  It's also helpful if you
  8. # have GNU Readline installed in one of the standard locations (normally
  9. # /usr/local or /usr), but this is not essential.
  10. #
  11. # The source distributions for GNU C, GNU Make, and GNU Readline are
  12. # available from <ftp://ftp.gnu.org/gnu/>.  Binaries for these are
  13. # included in almost all Linux distributions, Mac OS X and also in the Cygwin
  14. # and MinGW distributions for Windows (see README.MS-Windows).
  15. #
  16. # Step 0.  Extract the files from the gzipped tar archive.
  17. #
  18. #      NOTE: do not extract the archive into a directory whose absolute
  19. #      pathname contains spaces as this will cause the installation to
  20. #      fail.
  21. #
  22. # Step 1.  Run `configure'.  (Just type `sh configure'.)
  23. #
  24. #          By default, the files will be installed in the directory
  25. #          /usr/local/mercury-14.01.1.
  26. #          If you want the files to be installed someplace else,
  27. #          use the `--prefix <directory>' option to `configure'.
  28. #          The directory name specified with the `--prefix' option
  29. #          must not contain spaces.
  30. #
  31. #      NOTE: If you use the `--prefix' option to configure,
  32. #      be aware that `mercury' is not automatically
  33. #      appended.  That is, `--prefix=/usr/local' will put
  34. #      files in /usr/local/bin, /usr/local/lib et cetera,
  35. #      *not* /usr/local/mercury/bin, /usr/local/mercury/lib.
  36. #
  37. #          By default, the installation process will install the Mercury
  38. #          standard library in a comprehensive set of grades, with each grade
  39. #          supporting a given set of capabilities (debugging, profiling etc).
  40. #          If you want to install a different set of grades, read the
  41. #          "Finetuning" section below.
  42. #
  43. #          Some debugging output from running configure is automatically
  44. #          save to the file `config.log'.
  45. #
  46. # Step 2.  Run `make'.
  47. #          This step will take a long time.
  48. #
  49. #      NOTE: If you have problems installing a new version
  50. #      of the compiler, you may find it helpful to either
  51. #      completely remove any existing versions of the
  52. #      compiler reachable on your PATH or, less drastically,
  53. #      alter your PATH variable so that any existing version
  54. #      of the mercury compiler is not accessible for the
  55. #      purposes of installing the new version.
  56. #
  57. # Step 3.  Run `make install'.
  58. #          This step will also take a long time.
  59. #
  60. #          BEWARE: if something goes wrong in this step, e.g. running
  61. #          out of disk space, and the installation has already gotten
  62. #          past installing the documentation, and started installing
  63. #          the different grades of the libraries then in general it is
  64. #          NOT sufficient to simply rerun `make install'.  Instead you
  65. #          may need to start from scratch again.
  66. #
  67. # Step 4.  Check the permissions on the installed files.
  68. #          Add /usr/local/mercury-14.01.1/bin to your PATH, and
  69. #          add /usr/local/mercury-14.01.1/man to your MANPATH.
  70. #          add /usr/local/mercury-14.01.1/info to your INFOPATH.
  71. #          You can also add a WWW link to the Mercury documentation in
  72. #          /usr/local/mercury-14.01.1/lib/mercury/html to your WWW home page,
  73. #          and you may want to print out a hard-copy of the documentation
  74. #          from the DVI files in /usr/local/mercury-14.01.1/lib/mercury/doc.
  75. #
  76. #          If step #1 enabled deep profiling, then check whether "make install"
  77. #          was able to copy scripts/mdprof to your web server's CGI directory.
  78. #          This directory is often writeable only by root or by the web server
  79. #          administrator, so you may need more than your usual set of
  80. #          privileges to do the copy (i.e. you may need to "su" to the
  81. #          appropriate user). mdprof is also installed into the same directory
  82. #          as other Mercury executables.
  83. #
  84. #          To use the emacs debugger interface ("M-x mdb"), you also need to
  85. #          add the following lines to the `.emacs' file in your home directory:
  86. #
  87. #               (add-to-list 'load-path
  88. #                 "/usr/local/mercury-14.01.1/lib/mercury/elisp")
  89. #               (autoload 'mdb "gud" "Invoke the Mercury debugger" t)
  90. #
  91. # Step 5.  Run `make clean'.
  92. #
  93. # As a short-cut, steps 1-3 are listed below, so they can be replaced
  94. # by just executing this file.  I suggest you run it in the background,
  95. # and read the Mercury documentation in the `doc' directory while you are
  96. # waiting.
  97.  
  98. sh configure &&
  99. make &&
  100. make install
  101.  
  102. # Fine-tuning:
  103. # ------------
  104. #
  105. #          If your system has multiple CPUs and lots of RAM,
  106. #          you can uncomment the definition of PARALLEL in the Makefile
  107. #          to perform a parallel make.
  108. #
  109. #          By default the `make install' step will install a reasonable
  110. #          set of library grades which should be appropriate for most uses.
  111. #
  112. #          The option --enable-libgrades=<gradelist> allows you to specify
  113. #          precisely the list of library grades to be installed. The argument
  114. #          of this option should be a comma-separated list of grades.
  115. #          An empty list of grades will cause the library to be installed
  116. #          only in the default grade.
  117. #
  118. #          The option --enable-minimal-install will install only the minimal
  119. #          system that is required in order to bootstrap the Mercury compiler.
  120. #
  121. #          The option --disable-most-grades reduces the set of installed grades
  122. #          to a "minimum" level for developers (just the default grade and the
  123. #          grades corresponding to the `--debug' and `--high-level-code'
  124. #          options).
  125. #
  126. #          The option --disable-nogc-grades prevents the installation
  127. #          of grades without garbage collection.
  128. #
  129. #          The option --enable-agc-grades causes the installation
  130. #          of grades that support type-accurate garbage collection.
  131. #
  132. #          The option --disable-prof-grades prevents the installation
  133. #          of grades that support profiling.
  134. #
  135. #          The option --disable-old-prof-grades prevents the installation
  136. #          of the old style profiling grades, i.e. all profiling grades
  137. #          except the ones that do deep profiling.
  138. #
  139. #          The option --disable-trail-grades prevents the installation
  140. #          of grades that support trailing.
  141. #
  142. #          The option --disable-par-grades prevents the installation
  143. #          of thread-safe grades.
  144. #
  145. #          The option --enable-inefficient-grades causes the installation
  146. #          of grades that do not exploit gcc extensions even when they are
  147. #          available.
  148. #
  149. #          The option --enable-hlc-prof-grades causes the installation
  150. #          of profiling versions of the high level code grades.
  151. #
  152. #          The option --enable-hlc-low-level-debug-grades causes the installation
  153. #          of high-level code grades with C level debugging enabled.
  154. #
  155. #          The option --enable-stseg-grades causes the installation of grades
  156. #          that use stack segments.
  157. #
  158. #          The option --enable-dotnet-grades causes the installation
  159. #          of the .NET grades (see README.DotNet).  This grades are only
  160. #          installed if the .NET SDK is found.
  161. #
  162. #          The option --enable-java-grade causes the installation of the Java
  163. #          grade.  This grade is only installed if the Java SDK is found.
  164. #
  165. #          The option --enable-erlang-grade causes the installation of the
  166. #          Erlang grade.  This grade is only installed if the Erlang/OTP
  167. #          distribution is found.
  168. #
  169. #          The option --enable-ssdebug-grades adds source-to-source debugging
  170. #          grades hlc.gc.ssdebug and java.ssdebug, if hlc.gc or java grades
  171. #          are also present.
  172. #
  173. #          The option --disable-dynamic-link prevents the installation of shared
  174. #          libraries, even if they are supported on this system.
  175. #
  176. #          The option --enable-deep-profiler=/some/dir/name enables the deep
  177. #          profiler, and specifies the directory in which to install the
  178. #          deep profiler's CGI script. The option --disable-deep-profiler
  179. #          causes the deep profiler not to be installed, even if the underlying
  180. #          system would be able to support it. The default is to enable the
  181. #          deep profiler if the system has the required features.
  182. #
  183. #          If you are short on RAM, you can add -DSMALL_CONFIG to the CFLAGS
  184. #          line in the file boehm_gc/Makefile.  (This tells the garbage
  185. #          collector to tune itself for small physical memory.)
  186. #
  187. #          If your system supports shared libraries, but `configure' says
  188. #          Mercury does not support shared libraries on this system,
  189. #          contact us and we'll see if we can add support for shared libraries
  190. #          on that system.
  191. #
  192. #          Efficiency will be much improved if Mercury can use gcc global
  193. #          register variables.  Currently these are supported for
  194. #          mips, hppa, sparc, alpha, rs6000, i386 and x86_64 architectures
  195. #          (see runtime/regs.h and runtime/machdeps/*).
  196. #          If you want to use Mercury on some other CPU, contact us and
  197. #          we'll add support for gcc global registers for that CPU.
  198. #
  199. # De-installation:
  200. # ----------------
  201. #
  202. # You may eventually want to uninstall this version of Mercury
  203. # (to free up disk space so you can install the next version ;-).
  204. # If you installed in the default location, you can simply
  205. # use `rm -rf /usr/local/mercury-14.01.1' to uninstall.
  206. # If you installed in a location such as `/usr/local' that also
  207. # contains other files which you do not want removed, then
  208. # run the command `make uninstall' in this directory.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement