Changeset 808 for openssl/trunk/VMS/mkshared.com
- Timestamp:
- Aug 7, 2014, 8:25:37 PM (11 years ago)
- Location:
- openssl/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
openssl/trunk ¶
- Property svn:mergeinfo changed
/openssl/vendor/1.0.0-current (added) merged: 799-800,804 /openssl/vendor/1.0.0n (added) merged: 807
- Property svn:mergeinfo changed
-
TabularUnified openssl/trunk/VMS/mkshared.com ¶
r150 r808 1 $! MKSHARED.COM -- script to created shareable images on VMS 2 $! 3 $! No command line parameters. This should be run at the start of the source 4 $! tree (the same directory where one finds INSTALL.VMS). 5 $! 6 $! Input: [.UTIL]LIBEAY.NUM,[.xxx.EXE.CRYPTO]LIBCRYPTO.OLB 7 $! [.UTIL]SSLEAY.NUM,[.xxx.EXE.SSL]LIBSSL.OLB 8 $! Output: [.xxx.EXE.CRYPTO]LIBCRYPTO.OPT,.MAP,.EXE 9 $! [.xxx.EXE.SSL]LIBSSL.OPT,.MAP,.EXE 1 $! MKSHARED.COM -- Create shareable images. 2 $! 3 $! P1: "64" for 64-bit pointers. 4 $! 5 $! P2: Zlib object library path (optional). 6 $! 7 $! Input: [.UTIL]LIBEAY.NUM,[.xxx.EXE.CRYPTO]SSL_LIBCRYPTO[32].OLB 8 $! [.UTIL]SSLEAY.NUM,[.xxx.EXE.SSL]SSL_LIBSSL[32].OLB 9 $! [.CRYPTO.xxx]OPENSSLCONF.H 10 $! Output: [.xxx.EXE.CRYPTO]SSL_LIBCRYPTO_SHR[32].OPT,.MAP,.EXE 11 $! [.xxx.EXE.SSL]SSL_LIBSSL_SRH[32].OPT,.MAP,.EXE 10 12 $! 11 13 $! So far, tests have only been made on VMS for Alpha. VAX will come in time. 12 14 $! =========================================================================== 13 $ 15 $! 16 $! Announce/identify. 17 $! 18 $ proc = f$environment( "procedure") 19 $ write sys$output "@@@ "+ - 20 f$parse( proc, , , "name")+ f$parse( proc, , , "type") 21 $! 22 $! Save the original default device:[directory]. 23 $! 24 $ def_orig = f$environment( "default") 25 $ on error then goto tidy 26 $ on control_c then goto tidy 27 $! 28 $! SET DEFAULT to the main kit directory. 29 $! 30 $ proc = f$environment("procedure") 31 $ proc = f$parse( "A.;", proc)- "A.;" 32 $ set default 'proc' 33 $ set default [-] 34 $! 14 35 $! ----- Prepare info for processing: version number and file info 15 36 $ gosub read_version_info … … 17 38 $ then 18 39 $ write sys$error "ERROR: Couldn't find any library version info..." 19 $ exit40 $ go to tidy: 20 41 $ endif 21 42 $ 22 $ if (f$getsyi("cpu") .lt.128)43 $ if (f$getsyi("cpu") .lt. 128) 23 44 $ then 24 $ arch := VAX 45 $ arch_vax = 1 46 $ arch = "VAX" 25 47 $ else 26 $ arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") 27 $ if (arch .eqs. "") then arch = "UNK" 48 $ arch_vax = 0 49 $ arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") 50 $ if (arch .eqs. "") then arch = "UNK" 28 51 $ endif 29 $ 30 $ if arch .nes. "VAX" 52 $! 53 $ archd = arch 54 $ lib32 = "32" 55 $ shr = "SHR32" 56 $! 57 $ if (p1 .nes. "") 31 58 $ then 32 $ arch_vax = 0 33 $ libid = "Crypto" 34 $ libnum = "[.UTIL]LIBEAY.NUM" 35 $ libdir = "[.''ARCH'.EXE.CRYPTO]" 36 $ libolb = "''libdir'LIBCRYPTO.OLB" 37 $ libopt = "''libdir'LIBCRYPTO.OPT" 38 $ libmap = "''libdir'LIBCRYPTO.MAP" 39 $ libgoal= "''libdir'LIBCRYPTO.EXE" 40 $ libref = "" 41 $ gosub create_nonvax_shr 42 $ libid = "SSL" 43 $ libnum = "[.UTIL]SSLEAY.NUM" 44 $ libdir = "[.''ARCH'.EXE.SSL]" 45 $ libolb = "''libdir'LIBSSL.OLB" 46 $ libopt = "''libdir'LIBSSL.OPT" 47 $ libmap = "''libdir'LIBSSL.MAP" 48 $ libgoal= "''libdir'LIBSSL.EXE" 49 $ libref = "[.''ARCH'.EXE.CRYPTO]LIBCRYPTO.EXE" 50 $ gosub create_nonvax_shr 51 $ else 52 $ arch_vax = 1 59 $ if (p1 .eqs. "64") 60 $ then 61 $ archd = arch+ "_64" 62 $ lib32 = "" 63 $ shr = "SHR" 64 $ else 65 $ if (p1 .nes. "32") 66 $ then 67 $ write sys$output "Second argument invalid." 68 $ write sys$output "It should be "32", "64", or nothing." 69 $ exit 70 $ endif 71 $ endif 72 $ endif 73 $! 74 $! ----- Prepare info for processing: disabled algorithms info 75 $ gosub read_disabled_algorithms_info 76 $! 77 $ ZLIB = p2 78 $ zlib_lib = "" 79 $ if (ZLIB .nes. "") 80 $ then 81 $ file2 = f$parse( ZLIB, "libz.olb", , , "syntax_only") 82 $ if (f$search( file2) .eqs. "") 83 $ then 84 $ write sys$output "" 85 $ write sys$output "The Option ", ZLIB, " Is Invalid." 86 $ write sys$output " Can't find library: ''file2'" 87 $ write sys$output "" 88 $ goto tidy 89 $ endif 90 $ zlib_lib = ", ''file2' /library" 91 $ endif 92 $! 93 $ if (arch_vax) 94 $ then 53 95 $ libtit = "CRYPTO_TRANSFER_VECTOR" 54 96 $ libid = "Crypto" 55 97 $ libnum = "[.UTIL]LIBEAY.NUM" 56 $ libdir = "[.''ARCH '.EXE.CRYPTO]"57 $ libmar = "''libdir' LIBCRYPTO.MAR"58 $ libolb = "''libdir' LIBCRYPTO.OLB"59 $ libopt = "''libdir' LIBCRYPTO.OPT"60 $ libobj = "''libdir' LIBCRYPTO.OBJ"61 $ libmap = "''libdir' LIBCRYPTO.MAP"62 $ libgoal= "''libdir' LIBCRYPTO.EXE"98 $ libdir = "[.''ARCHD'.EXE.CRYPTO]" 99 $ libmar = "''libdir'SSL_LIBCRYPTO_''shr'.MAR" 100 $ libolb = "''libdir'SSL_LIBCRYPTO''lib32'.OLB" 101 $ libopt = "''libdir'SSL_LIBCRYPTO_''shr'.OPT" 102 $ libobj = "''libdir'SSL_LIBCRYPTO_''shr'.OBJ" 103 $ libmap = "''libdir'SSL_LIBCRYPTO_''shr'.MAP" 104 $ libgoal= "''libdir'SSL_LIBCRYPTO_''shr'.EXE" 63 105 $ libref = "" 64 106 $ libvec = "LIBCRYPTO" 65 $ gosub create_vax_shr107 $ if f$search( libolb) .nes. "" then gosub create_vax_shr 66 108 $ libtit = "SSL_TRANSFER_VECTOR" 67 109 $ libid = "SSL" 68 110 $ libnum = "[.UTIL]SSLEAY.NUM" 69 $ libdir = "[.''ARCH '.EXE.SSL]"70 $ libmar = "''libdir' LIBSSL.MAR"71 $ libolb = "''libdir' LIBSSL.OLB"72 $ libopt = "''libdir' LIBSSL.OPT"73 $ libobj = "''libdir' LIBSSL.OBJ"74 $ libmap = "''libdir' LIBSSL.MAP"75 $ libgoal= "''libdir' LIBSSL.EXE"76 $ libref = "[.''ARCH '.EXE.CRYPTO]LIBCRYPTO.EXE"111 $ libdir = "[.''ARCHD'.EXE.SSL]" 112 $ libmar = "''libdir'SSL_LIBSSL_''shr'.MAR" 113 $ libolb = "''libdir'SSL_LIBSSL''lib32'.OLB" 114 $ libopt = "''libdir'SSL_LIBSSL_''shr'.OPT" 115 $ libobj = "''libdir'SSL_LIBSSL_''shr'.OBJ" 116 $ libmap = "''libdir'SSL_LIBSSL_''shr'.MAP" 117 $ libgoal= "''libdir'SSL_LIBSSL_''shr'.EXE" 118 $ libref = "[.''ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO_''shr'.EXE" 77 119 $ libvec = "LIBSSL" 78 $ gosub create_vax_shr 120 $ if f$search( libolb) .nes. "" then gosub create_vax_shr 121 $ else 122 $ libid = "Crypto" 123 $ libnum = "[.UTIL]LIBEAY.NUM" 124 $ libdir = "[.''ARCHD'.EXE.CRYPTO]" 125 $ libolb = "''libdir'SSL_LIBCRYPTO''lib32'.OLB" 126 $ libopt = "''libdir'SSL_LIBCRYPTO_''shr'.OPT" 127 $ libmap = "''libdir'SSL_LIBCRYPTO_''shr'.MAP" 128 $ libgoal= "''libdir'SSL_LIBCRYPTO_''shr'.EXE" 129 $ libref = "" 130 $ if f$search( libolb) .nes. "" then gosub create_nonvax_shr 131 $ libid = "SSL" 132 $ libnum = "[.UTIL]SSLEAY.NUM" 133 $ libdir = "[.''ARCHD'.EXE.SSL]" 134 $ libolb = "''libdir'SSL_LIBSSL''lib32'.OLB" 135 $ libopt = "''libdir'SSL_LIBSSL_''shr'.OPT" 136 $ libmap = "''libdir'SSL_LIBSSL_''shr'.MAP" 137 $ libgoal= "''libdir'SSL_LIBSSL_''shr'.EXE" 138 $ libref = "[.''ARCHD'.EXE.CRYPTO]SSL_LIBCRYPTO_''shr'.EXE" 139 $ if f$search( libolb) .nes. "" then gosub create_nonvax_shr 79 140 $ endif 141 $! 142 $ tidy: 143 $! 144 $! Close any open files. 145 $! 146 $ if (f$trnlnm( "libnum", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then - 147 close libnum 148 $! 149 $ if (f$trnlnm( "mar", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then - 150 close mar 151 $! 152 $ if (f$trnlnm( "opt", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then - 153 close opt 154 $! 155 $ if (f$trnlnm( "vf", "LNM$PROCESS", 0, "SUPERVISOR") .nes. "") then - 156 close vf 157 $! 158 $! Restore the original default device:[directory]. 159 $! 160 $ set default 'def_orig' 80 161 $ exit 81 162 $ 82 $! ----- S oubroutines to build the shareable libraries163 $! ----- Subroutines to build the shareable libraries 83 164 $! For each supported architecture, there's a main shareable library 84 165 $! creator, which is called from the main code above. … … 112 193 $! The creator routine 113 194 $ create_nonvax_shr: 114 $ open /write opt 'libopt'195 $ open /write opt 'libopt' 115 196 $ write opt "identification=""",libid," ",libverstr,"""" 116 $ write opt libolb, "/lib"197 $ write opt libolb, " /library" 117 198 $ if libref .nes. "" then write opt libref,"/SHARE" 118 199 $ write opt "SYMBOL_VECTOR=(-" … … 125 206 $ write opt "GSMATCH=",libvmatch,",",libver 126 207 $ close opt 127 $ link/map='libmap'/full/share='libgoal' 'libopt'/option 208 $ link /map = 'libmap' /full /share = 'libgoal' 'libopt' /options - 209 'zlib_lib' 128 210 $ return 129 211 $ … … 159 241 $! The creator routine 160 242 $ create_vax_shr: 161 $ open /write mar 'libmar'243 $ open /write mar 'libmar' 162 244 $ type sys$input:/out=mar: 163 245 ; … … 194 276 $ write mar " .END" 195 277 $ close mar 196 $ open /write opt 'libopt'278 $ open /write opt 'libopt' 197 279 $ write opt "identification=""",libid," ",libverstr,"""" 198 280 $ write opt libobj 199 $ write opt libolb, "/lib"281 $ write opt libolb, " /library" 200 282 $ if libref .nes. "" then write opt libref,"/SHARE" 201 283 $ type sys$input:/out=opt: … … 216 298 $ close opt 217 299 $ macro/obj='libobj' 'libmar' 218 $ link/map='libmap'/full/share='libgoal' 'libopt'/option 300 $ link /map = 'libmap' /full /share = 'libgoal' 'libopt' /options - 301 'zlib_lib' 219 302 $ return 220 303 $ … … 238 321 $! ----- Common subroutines 239 322 $! ----- 240 $! The .num file reader. This one has great respons ability.323 $! The .num file reader. This one has great responsibility. 241 324 $ read_func_num: 242 $ open libnum 'libnum'325 $ open /read libnum 'libnum' 243 326 $ goto read_nums 244 327 $ … … 248 331 $ entrycount=0 249 332 $ loop: 250 $ read/end=loop_end/err=loop_end libnum line 251 $ entrynum=f$int(f$element(1," ",f$edit(line,"COMPRESS,TRIM"))) 252 $ entryinfo=f$element(2," ",f$edit(line,"COMPRESS,TRIM")) 253 $ curentry=f$element(0," ",f$edit(line,"COMPRESS,TRIM")) 254 $ info_exist=f$element(0,":",entryinfo) 255 $ info_platforms=","+f$element(1,":",entryinfo)+"," 256 $ info_kind=f$element(2,":",entryinfo) 257 $ info_algorithms=","+f$element(3,":",entryinfo)+"," 333 $ read /end=loop_end /err=loop_end libnum line 334 $ lin = f$edit( line, "COMPRESS,TRIM") 335 $! Skip a "#" comment line. 336 $ if (f$extract( 0, 1, lin) .eqs. "#") then goto loop 337 $ entrynum = f$int(f$element( 1, " ", lin)) 338 $ entryinfo = f$element( 2, " ", lin) 339 $ curentry = f$element( 0, " ", lin) 340 $ info_exist = f$element( 0, ":", entryinfo) 341 $ info_platforms = ","+ f$element(1, ":", entryinfo)+ "," 342 $ info_kind = f$element( 2, ":", entryinfo) 343 $ info_algorithms = ","+ f$element( 3, ":", entryinfo)+ "," 258 344 $ if info_exist .eqs. "NOEXIST" then goto loop 259 345 $ truesum = 0 … … 262 348 $ plat_i = 0 263 349 $ loop1: 264 $ plat_entry = f$element( plat_i,",",info_platforms)350 $ plat_entry = f$element( plat_i, ",", info_platforms) 265 351 $ plat_i = plat_i + 1 266 352 $ if plat_entry .eqs. "" then goto loop1 … … 268 354 $ then 269 355 $ if f$extract(0,1,plat_entry) .nes. "!" then negatives = 0 270 $ if f$getsyi("CPU") .lt. 128356 $ if (arch_vax) 271 357 $ then 272 358 $ if plat_entry .eqs. "EXPORT_VAR_AS_FUNCTION" then - … … 277 363 $! 278 364 $ if ((plat_entry .eqs. "VMS") .or. - 365 ((plat_entry .eqs. "ZLIB") .and. (ZLIB .nes. "")) .or. - 279 366 (arch_vax .and. (plat_entry .eqs. "VMSVAX"))) then - 280 367 truesum = truesum + 1 … … 302 389 $ if alg_entry .nes. "," 303 390 $ then 304 $ if alg_entry .eqs. "KRB5" then goto loop ! Special for now 305 $ if alg_entry .eqs. "STATIC_ENGINE" then goto loop ! Special for now 391 $ if disabled_algorithms - ("," + alg_entry + ",") .nes disabled_algorithms then goto loop 306 392 $ if f$trnlnm("OPENSSL_NO_"+alg_entry) .nes. "" then goto loop 307 393 $ goto loop2 … … 346 432 $ read_version_info: 347 433 $ libver = "" 348 $ open /read vf [.CRYPTO]OPENSSLV.H434 $ open /read vf [.CRYPTO]OPENSSLV.H 349 435 $ loop_rvi: 350 436 $ read/err=endloop_rvi/end=endloop_rvi vf rvi_line … … 370 456 $ close vf 371 457 $ return 458 $ 459 $! The disabled algorithms reader 460 $ read_disabled_algorithms_info: 461 $ disabled_algorithms = "," 462 $ open /read cf [.CRYPTO.'ARCH']OPENSSLCONF.H 463 $ loop_rci: 464 $ read/err=endloop_rci/end=endloop_rci cf rci_line 465 $ rci_line = f$edit(rci_line,"TRIM,COMPRESS") 466 $ rci_ei = 0 467 $ if f$extract(0,9,rci_line) .eqs. "# define " then rci_ei = 2 468 $ if f$extract(0,8,rci_line) .eqs. "#define " then rci_ei = 1 469 $ if rci_ei .eq. 0 then goto loop_rci 470 $ rci_e = f$element(rci_ei," ",rci_line) 471 $ if f$extract(0,11,rci_e) .nes. "OPENSSL_NO_" then goto loop_rci 472 $ disabled_algorithms = disabled_algorithms + f$extract(11,999,rci_e) + "," 473 $ goto loop_rci 474 $ endloop_rci: 475 $ close cf 476 $ return
Note:
See TracChangeset
for help on using the changeset viewer.