install-ssl.com 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. $! INSTALL-SSL.COM -- Installs the files in a given directory tree
  2. $!
  3. $! Author: Richard Levitte <richard@levitte.org>
  4. $! Time of creation: 22-MAY-1998 10:13
  5. $!
  6. $! P1 root of the directory tree
  7. $! P2 "64" for 64-bit pointers.
  8. $!
  9. $!
  10. $! Announce/identify.
  11. $!
  12. $ proc = f$environment( "procedure")
  13. $ write sys$output "@@@ "+ -
  14. f$parse( proc, , , "name")+ f$parse( proc, , , "type")
  15. $!
  16. $ on error then goto tidy
  17. $ on control_c then goto tidy
  18. $!
  19. $ if p1 .eqs. ""
  20. $ then
  21. $ write sys$output "First argument missing."
  22. $ write sys$output -
  23. "It should be the directory where you want things installed."
  24. $ exit
  25. $ endif
  26. $!
  27. $ if (f$getsyi( "cpu") .lt. 128)
  28. $ then
  29. $ arch = "VAX"
  30. $ else
  31. $ arch = f$edit( f$getsyi( "arch_name"), "upcase")
  32. $ if (arch .eqs. "") then arch = "UNK"
  33. $ endif
  34. $!
  35. $ archd = arch
  36. $ lib32 = "32"
  37. $ shr = "_SHR32"
  38. $!
  39. $ if (p2 .nes. "")
  40. $ then
  41. $ if (p2 .eqs. "64")
  42. $ then
  43. $ archd = arch+ "_64"
  44. $ lib32 = ""
  45. $ shr = "_SHR"
  46. $ else
  47. $ if (p2 .nes. "32")
  48. $ then
  49. $ write sys$output "Second argument invalid."
  50. $ write sys$output "It should be "32", "64", or nothing."
  51. $ exit
  52. $ endif
  53. $ endif
  54. $ endif
  55. $!
  56. $ root = f$parse( p1, "[]A.;0", , , "syntax_only, no_conceal") - "A.;0"
  57. $ root_dev = f$parse(root,,,"device","syntax_only")
  58. $ root_dir = f$parse(root,,,"directory","syntax_only") - -
  59. "[000000." - "][" - "[" - "]"
  60. $ root = root_dev + "[" + root_dir
  61. $!
  62. $ define /nolog wrk_sslroot 'root'.] /trans=conc
  63. $ define /nolog wrk_sslinclude wrk_sslroot:[include]
  64. $ define /nolog wrk_sslxlib wrk_sslroot:['arch'_lib]
  65. $!
  66. $ if f$parse("wrk_sslroot:[000000]") .eqs. "" then -
  67. create /directory /log wrk_sslroot:[000000]
  68. $ if f$parse("wrk_sslinclude:") .eqs. "" then -
  69. create /directory /log wrk_sslinclude:
  70. $ if f$parse("wrk_sslxlib:") .eqs. "" then -
  71. create /directory /log wrk_sslxlib:
  72. $!
  73. $ exheader := ssl.h, ssl2.h, ssl3.h, tls1.h, dtls1.h, srtp.h
  74. $ libs := ssl_libssl
  75. $!
  76. $ xexe_dir := [-.'archd'.exe.ssl]
  77. $!
  78. $ copy /protection = w:re 'exheader' wrk_sslinclude: /log
  79. $!
  80. $ i = 0
  81. $ loop_lib:
  82. $ e = f$edit(f$element(i, ",", libs),"trim")
  83. $ i = i + 1
  84. $ if e .eqs. "," then goto loop_lib_end
  85. $ set noon
  86. $! Object library.
  87. $ file = xexe_dir+ e+ lib32+ ".olb"
  88. $ if f$search( file) .nes. ""
  89. $ then
  90. $ copy /protection = w:re 'file' wrk_sslxlib: /log
  91. $ endif
  92. $! Shareable image.
  93. $ file = xexe_dir+ e+ shr+ ".exe"
  94. $ if f$search( file) .nes. ""
  95. $ then
  96. $ copy /protection = w:re 'file' wrk_sslxlib: /log
  97. $ endif
  98. $ set on
  99. $ goto loop_lib
  100. $ loop_lib_end:
  101. $!
  102. $ tidy:
  103. $!
  104. $ call deass wrk_sslroot
  105. $ call deass wrk_sslinclude
  106. $ call deass wrk_sslxlib
  107. $!
  108. $ exit
  109. $!
  110. $ deass: subroutine
  111. $ if (f$trnlnm( p1, "LNM$PROCESS") .nes. "")
  112. $ then
  113. $ deassign /process 'p1'
  114. $ endif
  115. $ endsubroutine
  116. $!