home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Linux / Divers / lynx2.8.1dev.10.tar.gz / lynx2.8.1dev.10.tar / lynx2-8 / build.com < prev    next >
Text File  |  1998-03-25  |  10KB  |  338 lines

  1. $ v = 'f$verify(0)'
  2. $!            BUILD.COM
  3. $!
  4. $!   Command file to build LYNX.EXE on VMS systems.
  5. $!   Also invokes build of the WWWLibrary if its
  6. $!    object library does not already exist.
  7. $!
  8. $!   08-Oct-1997    F.Macrides        macrides@sci.wfeb.edu
  9. $!    Added comments and minor tweaks for convenient addition of
  10. $!    compiler definitions and compiler and linker options.
  11. $!   28-Jun-1997    F.Macrides        macrides@sci.wfeb.edu
  12. $!    Added chartrans support.
  13. $!   29-Feb-1996    F.Macrides        macrides@sci.wfeb.edu
  14. $!    Added LYMap to the compilation and link lists.
  15. $!   26-Jul-1995    F.Macrides        macrides@sci.wfeb.edu
  16. $!    Reorganized the option files into ones for the transport and
  17. $!    ones for the compiler, and adding support for GNUC.
  18. $!   14-Jun-1995    F.Macrides        macrides@sci.wfeb.edu
  19. $!    Added LYList.
  20. $!   03-May-1995    F.Macrides        macrides@sci.wfeb.edu
  21. $!    Include /nomember for compilations with DECC.  It's not the
  22. $!    default on AXP and the code assumes byte alignment.
  23. $!   23-Mar-1995    F.Macrides        macrides@sci.wfeb.edu
  24. $!    Replaced references to v2.3.8 or v2.3.9 with v2.3-FM to avoid
  25. $!    any confusion with official releases at UKans.
  26. $!   16-Mar-1995    F.Macrides        macrides@sci.wfeb.edu
  27. $!    Updated to permit submission to BATCH.
  28. $!   17-Feb-1995    F.Macrides        macriees@sci.wfeb.edu
  29. $!    Updated for v2.3-FM
  30. $!   07-Dec-1994    F.Macrides        macrides@sci.wfeb.edu
  31. $!    Updated for DECC/VAX, VAXC/VAX and DECC/AXP
  32. $!   03-OCT-1994    A.Harper        A.Harper@kcl.ac.uk
  33. $!    Mods to support SOCKETSHR/NETLIB and add a /DEBUG/NOOPT option
  34. $!   02-Jun-1994    F.Macrides        macrides@sci.wfeb.edu
  35. $!    Mods to support TCPWare (To use non-blocking connects, you need
  36. $!    the DRIVERS_V405B.INC patch from FTP.PROCESS.COM for TCPware for
  37. $!    OpenVMS Version 4.0-5, or a higher version of TCPWare, which will
  38. $!    have that bug in the TCPDRIVER fixed.  Otherwise, add NO_IOCTL to
  39. $!    the $ cc := cc/define=(...) list in [.WWW.Library.VMS]libmake.com).
  40. $!   20-May-1994    Andy Harper        A.Harper@bay.cc.kcl.ac.uk
  41. $!    Mods to support CMU TCP/IP
  42. $!   13-Dec-1993    F.Macrides        macrides@sci.wfeb.edu
  43. $!    Mods for conditional compilations with VAXC versus DECC
  44. $!   10-Dec-1993    F.Macrides        macrides@sci.wfeb.edu
  45. $!    Initial version, for Lynx v2.1
  46. $!
  47. $ ON CONTROL_Y THEN GOTO CLEANUP
  48. $ ON ERROR THEN GOTO CLEANUP
  49. $ proc = f$environment("PROCEDURE")
  50. $ where = f$parse(proc,,,"DEVICE") + f$parse(proc,,,"DIRECTORY")
  51. $ set default 'where'
  52. $ write sys$output "Default directory:"
  53. $ show default
  54. $ write sys$output ""
  55. $!
  56. $!    Compiler definitions can be added here as a comma separated
  57. $!    list with a lead comma, e.g., ",HAVE_FOO_H,DO_BLAH".  The
  58. $!    definitions will apply only to the LYfoo.c modules.  Ones
  59. $!    for the libwww-FM modules can be added equivalently in
  60. $!    [.WWW.Library.vms]libmake.com. - FM
  61. $!
  62. $ extra = ""
  63. $!
  64. $!    If no TCP/IP agent is specified (as the first argument),
  65. $!    prompt for a number from the list.   Note that the agent
  66. $!    must be the first argument if the debugger mode is to be
  67. $!    set via a second argument (see below). - FM
  68. $!
  69. $ agent = 0
  70. $ IF P1 .EQS. ""
  71. $ THEN
  72. $   If f$mode() .eqs. "BATCH"
  73. $   Then
  74. $    write sys$output "TCP/IP agent not specified!"
  75. $    write sys$output "Defaulting to MULTINET"
  76. $    agent = 1
  77. $   Else
  78. $     write sys$output "Acceptable TCP/IP agents are"
  79. $     write sys$output " [1] MULTINET (default)"
  80. $     write sys$output " [2] UCX"
  81. $     write sys$output " [3] WIN_TCP"
  82. $    write sys$output " [4] CMU_TCP"
  83. $    write sys$output " [5] SOCKETSHR_TCP"
  84. $    write sys$output " [6] TCPWARE"
  85. $     read sys$command/prompt="Agent [1,2,3,4,5,6] (RETURN = [1]) " agent
  86. $   EndIf
  87. $ ENDIF
  88. $ option = ""
  89. $ if agent .eq. 1 .or. agent .eqs. "" .or. p1 .eqs. "MULTINET" then -
  90.     option = "MULTINET"
  91. $ if agent .eq. 2 .or. p1 .eqs. "UCX" then option = "UCX"
  92. $ if agent .eq. 3 .or. p1 .eqs. "WIN_TCP" then option = "WIN_TCP"
  93. $ if agent .eq. 4 .or. p1 .eqs. "CMU_TCP" then option = "CMU_TCP"
  94. $ if agent .eq. 5 .or. p1 .eqs. "SOCKETSHR_TCP" then option = "SOCKETSHR_TCP"
  95. $ if agent .eq. 6 .or. p1 .eqs. "TCPWARE" then option = "TCPWARE"
  96. $!
  97. $ if option .eqs. "TCPWARE"
  98. $ then
  99. $    write sys$output "Building Lynx for TCPWARE with UCX emulation..."
  100. $    extra = extra + ",UCX"
  101. $ endif
  102. $!
  103. $ optfile = "''option'"
  104. $!
  105. $!    Compiler and linker options can be specified here.  If
  106. $!    there was a second argument (with any value), then debugger
  107. $!    mode with no optimization will be specified as well.  The
  108. $!    compiler options will apply only to the LYfoo.c and UCfoo.c
  109. $!    modules.  Ones for the libwww-FM modules can be specified
  110. $!    in [.WWW.Library.vms]libmake.com. - FM
  111. $!
  112. $ cc_opts = ""
  113. $ link_opts = ""
  114. $!
  115. $ if p2 .nes. ""
  116. $   then
  117. $      debug_arg = "DEBUG"
  118. $      cc_opts = cc_opts + "/DEBUG/NOOPT"
  119. $      link_opts = link_opts + "/DEBUG"
  120. $   else
  121. $      debug_arg = ""
  122. $ endif
  123. $!
  124. $ IF f$search("[.WWW.Library.Implementation]WWWLib_''option'.olb") .nes. ""
  125. $ THEN
  126. $   write sys$output "  WWWLib_''option'.olb already exists."
  127. $   If f$mode() .eqs. "BATCH" 
  128. $   Then 
  129. $    write sys$output "  Updating WWWLib_''option'.olb"
  130. $   Else
  131. $    read sys$command/prompt="  Update it [default Y]? " reply
  132. $    if reply .nes. "" .and. -
  133.        f$extract(0,1,f$edit(reply, "TRIM, UPCASE")) .nes. "Y" then -
  134. $       goto Compile_CHRTRANS
  135. $   EndIf
  136. $ ENDIF
  137. $ v1 = f$verify(1)
  138. $!
  139. $!    Build the WWWLibrary
  140. $!
  141. $ set default [.WWW.Library.VMS]
  142. $ v1 = 'f$verify(0)'
  143. $ @libmake 'option' 'debug_arg'
  144. $ v1 = f$verify(1)
  145. $ set default [-.-.-]
  146. $ v1 = 'f$verify(0)'
  147. $ ON CONTROL_Y THEN GOTO CLEANUP
  148. $ ON ERROR THEN GOTO CLEANUP
  149. $!
  150. $Compile_CHRTRANS:
  151. $ IF f$search("[.src.chrtrans]makeuctb.exe") .nes. ""
  152. $ THEN
  153. $   write sys$output "  [.src.chrtrans]makeuctb.exe already exists."
  154. $   If f$mode() .eqs. "BATCH" 
  155. $   Then 
  156. $    write sys$output "  Updating makeuctb.exe and chrtrans header files."
  157. $   Else
  158. $    read sys$command -
  159.        /prompt="  Update it and chrtrans header files [default Y]? " reply
  160. $    if reply .nes. "" .and. -
  161.        f$extract(0,1,f$edit(reply, "TRIM, UPCASE")) .nes. "Y" then -
  162. $       goto Compile_SRC
  163. $   EndIf
  164. $ ENDIF
  165. $!
  166. $ v1 = f$verify(1)
  167. $!
  168. $!    Build the chrtrans modules.
  169. $!
  170. $ set default [.src.chrtrans]
  171. $ v1 = 'f$verify(0)'
  172. $ @build-chrtrans
  173. $ v1 = f$verify(1)
  174. $ set default [-.-]
  175. $ v1 = 'f$verify(0)'
  176. $ ON CONTROL_Y THEN GOTO CLEANUP
  177. $ ON ERROR THEN GOTO CLEANUP
  178. $!
  179. $Compile_SRC:
  180. $ v1 = f$verify(1)
  181. $!
  182. $!    Compile the Lynx [.SRC] modules
  183. $!
  184. $ set default [.SRC]
  185. $ v1 = 'f$verify(0)'
  186. $ IF f$trnlnm("VAXCMSG") .eqs. "DECC$MSG" .or. -
  187.      f$trnlnm("DECC$CC_DEFAULT") .eqs. "/DECC" .or. -
  188.      f$trnlnm("DECC$CC_DEFAULT") .eqs. "/VAXC"
  189. $ THEN
  190. $  compiler := "DECC"
  191. $  if option .eqs. "UCX" then optfile = "UCXSHR"
  192. $  if option .eqs. "TCPWARE" then optfile = "TCPWARESHR"
  193. $  if option .eqs. "MULTINET" then -
  194.     extra = extra + ",_DECC_V4_SOURCE,__SOCKET_TYPEDEFS"
  195. $  v1 = f$verify(1)
  196. $! DECC:
  197. $  cc := cc/decc/prefix=all/nomember'cc_opts'-
  198.        /DEFINE=(DEBUG,ACCESS_AUTH,'option''extra',__VMS_CURSES)-
  199.        /INCLUDE=([],[-],[-.WWW.Library.Implementation],[.chrtrans]) 
  200. $  v1 = 'f$verify(0)'
  201. $ ELSE
  202. $  if option .eqs. "UCX" then optfile = "UCXOLB"
  203. $  if option .eqs. "TCPWARE" then optfile = "TCPWAREOLB"
  204. $  IF f$search("gnu_cc:[000000]gcclib.olb") .nes. ""
  205. $  THEN
  206. $   compiler := "GNUC"
  207. $   v1 = f$verify(1)
  208. $! GNUC:
  209. $   cc := gcc'cc_opts' -
  210.          /DEFINE=(DEBUG,ACCESS_AUTH,'option''extra')-
  211.          /INCLUDE=([],[-],[-.WWW.Library.Implementation],[.chrtrans]) 
  212. $   v1 = 'f$verify(0)'
  213. $  ELSE
  214. $   compiler := "VAXC"
  215. $   v1 = f$verify(1)
  216. $! VAXC:
  217. $   cc := cc'cc_opts' -
  218.         /DEFINE=(DEBUG,ACCESS_AUTH,'option''extra')-
  219.         /INCLUDE=([],[-],[-.WWW.Library.Implementation],[.chrtrans]) 
  220. $   v1 = 'f$verify(0)'
  221. $  ENDIF
  222. $ ENDIF
  223. $ v1 = f$verify(1)
  224. $!
  225. $ cc DefaultStyle
  226. $ cc GridText
  227. $ cc HTAlert
  228. $ cc HTFWriter
  229. $ cc HTInit
  230. $ cc HTML
  231. $ cc LYBookmark
  232. $ cc LYCgi
  233. $ cc LYCharSets
  234. $ cc LYCharUtils
  235. $ cc LYClean
  236. $ cc LYCookie
  237. $ cc LYCurses
  238. $ cc LYDownload
  239. $ cc LYEdit
  240. $ cc LYEditmap
  241. $ cc LYexit
  242. $ cc LYForms
  243. $ cc LYGetFile
  244. $ cc LYHistory
  245. $ cc LYJump
  246. $ cc LYKeymap
  247. $ cc LYLeaks
  248. $ cc LYList
  249. $ cc LYMail
  250. $ cc LYMain
  251. $ cc LYMainLoop
  252. $ cc LYMap
  253. $ cc LYNews
  254. $ cc LYOptions
  255. $ cc LYPrint
  256. $ cc LYrcFile
  257. $ cc LYReadCFG
  258. $ cc LYSearch
  259. $ cc LYShowInfo
  260. $ cc LYStrings
  261. $ cc LYTraversal
  262. $ cc LYUpload
  263. $ cc LYUtils
  264. $ cc UCAuto
  265. $ cc UCAux
  266. $ cc UCdomap
  267. $!
  268. $!    Link the objects and libaries.
  269. $!
  270. $ link/exe=lynx.exe'link_opts' -
  271. DefaultStyle.obj, -
  272. GridText.obj, -
  273. HTAlert.obj, -
  274. HTFWriter.obj, -
  275. HTInit.obj, -
  276. HTML.obj, -
  277. LYBookmark.obj, -
  278. LYCgi.obj, -
  279. LYCharSets.obj, -
  280. LYCharUtils.obj, -
  281. LYClean.obj, -
  282. LYCookie.obj, -
  283. LYCurses.obj, -
  284. LYDownload.obj, -
  285. LYEdit.obj, -
  286. LYEditmap.obj, -
  287. LYexit.obj, -
  288. LYForms.obj, -
  289. LYGetFile.obj, -
  290. LYHistory.obj, -
  291. LYJump.obj, -
  292. LYKeymap.obj, -
  293. LYLeaks.obj, -
  294. LYList.obj, -
  295. LYMail.obj, -
  296. LYMain.obj, -
  297. LYMainLoop.obj, -
  298. LYMap.obj, -
  299. LYNews.obj, -
  300. LYOptions.obj, -
  301. LYPrint.obj, -
  302. LYrcFile.obj, -
  303. LYReadCFG.obj, -
  304. LYSearch.obj, -
  305. LYShowInfo.obj, -
  306. LYStrings.obj, -
  307. LYTraversal.obj, -
  308. LYUpload.obj, -
  309. LYUtils.obj, -
  310. UCAuto.obj, -
  311. UCAux.obj, -
  312. UCdomap.obj, -
  313. [-.WWW.Library.Implementation]WWWLib_'option'.olb/library, -
  314. sys$disk:[]'optfile'.opt/opt, sys$disk:[]'compiler'.opt/opt
  315. $!
  316. $!    Copy the executable to the top directory and restore the default.
  317. $!
  318. $ copy lynx.exe [-]
  319. $ set def [-]
  320. $!
  321. $ v1 = 'f$verify(0)'
  322. $!
  323. $!  Issue message on how to include LYNX.HLP in the system HELP library
  324. $!
  325. $ write sys$output ""
  326. $ write sys$output "  To install or update lynx.hlp in the system HELP library,"
  327. $ write sys$output "  use:"
  328. $ write sys$output "        library/replace sys$help:helplib.hlb lynx.hlp"
  329. $ write sys$output ""
  330. $!
  331. $ CLEANUP:
  332. $    v1 = 'f$verify(0)'
  333. $    set default 'where'
  334. $    write sys$output "Default directory:"
  335. $    show default
  336. $    v1 = f$verify(v)
  337. $ exit
  338.