home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / gccdist / gcc-src / vms / kitinstal.com < prev    next >
Encoding:
Text File  |  1992-04-30  |  7.4 KB  |  216 lines

  1. $ ON CONTROL_Y THEN GOTO GCC_CONTROL_Y
  2. $ ON WARNING THEN GOTO GCC_BOO_BOO
  3. $!
  4. $ IF P1 .NES. "VMI$_INSTALL" THEN EXIT VMI$_UNSUPPORTED
  5. $!
  6. $foo_loop:
  7. $ if f$trnlnm("gnu_cc","lnm$process_table").nes."" then deassign gnu_cc
  8. $ if f$trnlnm("gnu_bison","lnm$process_table").nes."" then deassign gnu_bison
  9. $!
  10. $type sys$input
  11.  
  12.     Installation of GCC 1.40 for VMS.
  13.  
  14. $ IF P2 THEN SET VERIFY
  15. $!
  16. $!
  17. $ blocks=4000
  18. $ VMI$CALLBACK CHECK_NET_UTILIZATION GCC_BLOCKS 'blocks' 300 'blocks'
  19. $ IF .NOT. GCC_BLOCKS 
  20. $    THEN 
  21. $       VMI$CALLBACK MESSAGE E LITTLEDISK -
  22.     "You need a minimum of ''BLOCKS' blocks to install GCC."
  23. $    EXIT VMI$_FAILURE
  24. $    ENDIF
  25. $!
  26. $ VMI$CALLBACK SET SAFETY CONDITIONAL 'blocks+2000'
  27. $!
  28. $   DEFAULT_INSTALL_ROOT = "SYS$SYSDEVICE:[GCC]"
  29. $   IF F$TRNLNM("GNU_CC") .NES. "" THEN DEFAULT_INSTALL_ROOT = -
  30.         F$PARSE ("GNU_CC:[000000]",,,"DEVICE","NO_CONCEAL") -
  31.         + F$PARSE ("GNU_CC:[000000]",,,"DIRECTORY","NO_CONCEAL") -
  32.         - ".][000000]" + "]"
  33. $!
  34. $   TYPE SYS$INPUT:
  35.  
  36.     GCC is installed in a private directory structure.  This can be located
  37.     anywhere you want, but you must have the disk quotas turned off or 
  38.     there must be sufficient disk quota to hold all of the GCC executables,
  39.     header files, and misc support files.    
  40.  
  41. $!
  42. $ if f$type(gnu_cc).nes."" then delete/symbol/local gnu_cc
  43. $   VMI$CALLBACK ASK GNU_CC "Where should the GCC top directory be located?" -
  44.         "''DEFAULT_INSTALL_ROOT'"
  45. $   GCC_TMP = F$PARSE (GNU_CC,,,,"NO_CONCEAL,SYNTAX_ONLY") - "]["
  46. $   GCC_INSTALL_ROOT = F$PARSE (GCC_TMP,,,"DEVICE") + -
  47.         F$PARSE (GCC_TMP,,,"DIRECTORY") - "]" + ".]"
  48. $   DEFINE GNU_CC 'GCC_INSTALL_ROOT'/TRANSLATION=CONCEALED
  49. $   GNU_CC = GCC_INSTALL_ROOT - ".]"
  50. $!
  51. $ type sys$input
  52.  
  53.     BISON is the GNU version of YACC.  It is not required to use GCC, however
  54.     BISON may be required before you can recompile GCC from it's sources.
  55.  
  56. $!
  57. $   VMI$CALLBACK ASK INSTALL_BISON "Do you wish to install BISON?" "YES" B
  58. $!
  59. $ IF INSTALL_BISON
  60. $ THEN
  61. $!
  62. $   DEFAULT_INSTALL_ROOT = "SYS$SYSDEVICE:[BISON]"
  63. $   IF F$TRNLNM("GNU_BISON") .NES. "" THEN DEFAULT_INSTALL_ROOT = -
  64.         F$PARSE ("GNU_BISON:[000000]",,,"DEVICE","NO_CONCEAL") -
  65.         + F$PARSE ("GNU_BISON:[000000]",,,"DIRECTORY","NO_CONCEAL") -
  66.         - ".][000000]" + "]"
  67. $!
  68. $!
  69. $   TYPE SYS$INPUT:
  70.  
  71.     BISON can be located on any disk, but the disk must either have disk
  72.     quotas turned off, or have a sufficient quota to hold the BISON
  73.     executable, and template files.
  74.  
  75.     This can be the same directory as is used for the GCC.
  76.  
  77. $!
  78. $ if f$type(gnu_bison).nes."" then delete/symbol/local gnu_bison
  79. $   VMI$CALLBACK ASK GNU_BISON "Where should the BISON top directory be located?" -
  80.         "''DEFAULT_INSTALL_ROOT'"
  81. $   TMP = F$PARSE (GNU_BISON,,,,"NO_CONCEAL,SYNTAX_ONLY") - "]["
  82. $   BISON_ROOT = F$PARSE (TMP,,,"DEVICE") + -
  83.         F$PARSE (TMP,,,"DIRECTORY") - "]" + ".]"
  84. $   GNU_BISON = BISON_ROOT - ".]"
  85. $   DEFINE GNU_BISON 'BISON_ROOT'/TRANSLATION=CONCEALED
  86. $!
  87. $ ENDIF
  88. $!
  89. $ type sys$input
  90.  
  91.     There are info files supplied with this distribution.  These can 
  92. are designed to be used with Emacs, however they can also easily be 
  93. examined with a text editor.
  94.  
  95.     The info files describe installation details, sources of 
  96. incompatibility, and GNU extensions to the C language.
  97.  
  98. $!
  99. $   VMI$CALLBACK ASK INSTALL_DOCS "Do you wish to install the info files?" "YES" B
  100. $!
  101. $ VMI$CALLBACK SET PURGE ASK
  102. $!
  103. $ VMI$CALLBACK ASK GCC_OK "OK to proceed?" "YES" B
  104. $ IF .NOT. GCC_OK THEN goto foo_loop
  105. $!
  106. $!--- no more questions after this point ---
  107. $!
  108. $ TYPE SYS$INPUT:
  109.  
  110.     No more questions will be asked.  Put your feet up and grab
  111.     a magazine.  This should take around 10 minutes.
  112.  
  113. $!
  114. $!
  115. $   VMI$CALLBACK CREATE_DIRECTORY USER 'GNU_CC'] -
  116.         "/OWNER=[1,4]/PROT=(S:RWE,O:RWE,G:RE,W:RE)"
  117. $   VMI$CALLBACK CREATE_DIRECTORY USER 'GNU_CC'.INCLUDE] -
  118.             "/OWNER=[1,4]/PROT=(S:RWE,O:RWE,G:RE,W:RE)"
  119. $   VMI$CALLBACK CREATE_DIRECTORY USER 'GNU_CC'.INCLUDE.SYS] -
  120.             "/OWNER=[1,4]/PROT=(S:RWE,O:RWE,G:RE,W:RE)"
  121. $   VMI$CALLBACK CREATE_DIRECTORY USER 'GNU_CC'.INCLUDE.VMS] -
  122.             "/OWNER=[1,4]/PROT=(S:RWE,O:RWE,G:RE,W:RE)"
  123. $ if INSTALL_BISON 
  124. $    then
  125. $   if (gnu_cc.nes.gnu_bison) then -
  126.     VMI$CALLBACK CREATE_DIRECTORY USER 'GNU_BISON'] -
  127.         "/OWNER=[1,4]/PROT=(S:RWE,O:RWE,G:RE,W:RE)"
  128. $    endif
  129. $!
  130. $   VMI$CALLBACK RESTORE_SAVESET B
  131. $!
  132. $ VMI$CALLBACK PROVIDE_DCL_COMMAND GCC.CLD
  133. $ VMI$CALLBACK MESSAGE I DCLCMD "Providing GCC DCL command."
  134. $ VMI$CALLBACK PROVIDE_DCL_HELP GCC.HLP
  135. $ VMI$CALLBACK MESSAGE I DCLHLP "Providing VMS help for GCC."
  136. $ VMI$CALLBACK PROVIDE_IMAGE GCC_TMP    GCC.EXE        'gnu_cc']
  137. $ VMI$CALLBACK PROVIDE_IMAGE GCC_TMP    GCC-AS.EXE    'gnu_cc']
  138. $ VMI$CALLBACK PROVIDE_IMAGE GCC_TMP    GCC-CC1.EXE    'gnu_cc']
  139. $ VMI$CALLBACK PROVIDE_IMAGE GCC_TMP    GCC-CPP.EXE    'gnu_cc']
  140. $ VMI$CALLBACK PROVIDE_FILE GCC_TMP    AAAREAD.ME    'gnu_cc']
  141. $ VMI$CALLBACK PROVIDE_FILE GCC_TMP    CHANGELOG.    'gnu_cc']
  142. $ VMI$CALLBACK PROVIDE_FILE GCC_TMP    COPYING.    'gnu_cc']
  143. $ VMI$CALLBACK PROVIDE_FILE GCC_TMP    GCC-AS.DIFF    'gnu_cc']
  144. $ VMI$CALLBACK PROVIDE_FILE GCC_TMP    GCC.CLD        'gnu_cc']
  145. $ VMI$CALLBACK PROVIDE_FILE GCC_TMP    GCC.COM        'gnu_cc']
  146. $ VMI$CALLBACK PROVIDE_FILE GCC_TMP    GCC.HLP        'gnu_cc']
  147. $ VMI$CALLBACK PROVIDE_FILE GCC_TMP    GCCLIB.OLB    'gnu_cc']
  148. $ VMI$CALLBACK PROVIDE_FILE GCC_TMP    GCC_INSTALL.COM    'gnu_cc']
  149. $ VMI$CALLBACK PROVIDE_FILE GCC_TMP    GCC-SRC.SAV    'gnu_cc']
  150. $!
  151. $!
  152. $if INSTALL_DOCS
  153. $    THEN
  154. $    VMI$CALLBACK PROVIDE_FILE GCC_TMP    CPP.INFO    'gnu_cc']
  155. $    VMI$CALLBACK PROVIDE_FILE GCC_TMP    CPP.INFO-1    'gnu_cc']
  156. $    VMI$CALLBACK PROVIDE_FILE GCC_TMP    CPP.INFO-2    'gnu_cc']
  157. $    VMI$CALLBACK PROVIDE_FILE GCC_TMP    GCC.INFO    'gnu_cc']
  158. $    VMI$CALLBACK PROVIDE_FILE GCC_TMP    GCC.INFO-1    'gnu_cc']
  159. $    VMI$CALLBACK PROVIDE_FILE GCC_TMP    GCC.INFO-2    'gnu_cc']
  160. $    VMI$CALLBACK PROVIDE_FILE GCC_TMP    GCC.INFO-3    'gnu_cc']
  161. $    VMI$CALLBACK PROVIDE_FILE GCC_TMP    GCC.INFO-4    'gnu_cc']
  162. $type sys$input
  163.     The GCC info files will be moved to the GNU_CC:[000000] directory.
  164.  
  165. $!
  166. $    ENDIF
  167. $! Provide GCC header files.
  168. $!
  169. $!  These are unpacked directly into the include directory.
  170. $!
  171. $ VMI$CALLBACK MESSAGE I "UPCKHDR" "Unpacking header files."
  172. $ backup vmi$kwd:gcc-include.sav/save 'gnu_cc'...]*.*;/nolog/new_version
  173. $!
  174. $!  GCC Installation is complete.  Now install BISON
  175. $!
  176. $if INSTALL_BISON
  177. $    THEN
  178. $    VMI$CALLBACK RESTORE_SAVESET C
  179. $    VMI$CALLBACK PROVIDE_DCL_COMMAND   BISON.CLD
  180. $    VMI$CALLBACK MESSAGE I DCLCMD "Providing BISON DCL command."
  181. $    VMI$CALLBACK PROVIDE_IMAGE GCC_TMP BISON.CLD        'gnu_bison']
  182. $    VMI$CALLBACK PROVIDE_IMAGE GCC_TMP BISON.EXE        'gnu_bison']
  183. $    VMI$CALLBACK PROVIDE_IMAGE GCC_TMP BISON.HAIRY        'gnu_bison']
  184. $    VMI$CALLBACK PROVIDE_IMAGE GCC_TMP BISON.SIMPLE        'gnu_bison']
  185. $    VMI$CALLBACK PROVIDE_IMAGE GCC_TMP INSTALL_BISON.COM    'gnu_bison']
  186. $    ENDIF
  187. $!
  188. $ TYPE SYS$INPUT
  189.  
  190.     As soon as the installation procedure is complete, you should execute 
  191. the following command(s):
  192.  
  193. $write sys$output "               $ @''gnu_cc']GCC_INSTALL"
  194. $if INSTALL_BISON then -
  195.     write sys$output "               $ @''gnu_bison']INSTALL_BISON"
  196. $ TYPE SYS$INPUT
  197.  
  198.     If this is a new installation, you should also edit SYSTARTUP_V5.COM 
  199. and include the above command(s).
  200.  
  201. $ if f$trnlnm("gnu_cc","lnm$process_table").nes."" then deassign gnu_cc
  202. $ if f$trnlnm("gnu_bison","lnm$process_table").nes."" then deassign gnu_bison
  203. $ EXIT VMI$_SUCCESS
  204. $!
  205. $GCC_CONTROL_Y:
  206. $ if f$trnlnm("gnu_cc","lnm$process_table").nes."" then deassign gnu_cc
  207. $ if f$trnlnm("gnu_bison","lnm$process_table").nes."" then deassign gnu_bison
  208. $ VMI$CALLBACK CONTROL_Y
  209. $!
  210. $GCC_BOO_BOO:
  211. $ GCC_STATUS == $STATUS
  212. $ if f$trnlnm("gnu_cc","lnm$process_table").nes."" then deassign gnu_cc
  213. $ if f$trnlnm("gnu_bison","lnm$process_table").nes."" then deassign gnu_bison
  214. $ EXIT 'GCC_STATUS
  215. $!
  216.