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-slang.com < prev    next >
Text File  |  1998-02-28  |  11KB  |  360 lines

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