diff options
| author | Mark Adler <madler@alumni.caltech.edu> | 2012-02-05 10:55:09 -0800 |
|---|---|---|
| committer | Mark Adler <madler@alumni.caltech.edu> | 2012-02-05 10:55:09 -0800 |
| commit | 9894494537635f51e79ac6fdb4157fe82c637328 (patch) | |
| tree | 5d169a61f5589fe281a35d39171a438794ef2534 | |
| parent | fc68b60086a69af7d3dab403b4dc98d01486780e (diff) | |
| download | zlib-9894494537635f51e79ac6fdb4157fe82c637328.tar.gz zlib-9894494537635f51e79ac6fdb4157fe82c637328.tar.bz2 zlib-9894494537635f51e79ac6fdb4157fe82c637328.zip | |
Update make_vms.com [Zinser].
| -rw-r--r-- | make_vms.com | 289 |
1 files changed, 150 insertions, 139 deletions
diff --git a/make_vms.com b/make_vms.com index 11be527..271815b 100644 --- a/make_vms.com +++ b/make_vms.com | |||
| @@ -3,7 +3,7 @@ $! Martin P.J. Zinser | |||
| 3 | $! | 3 | $! |
| 4 | $! In case of problems with the install you might contact me at | 4 | $! In case of problems with the install you might contact me at |
| 5 | $! zinser@zinser.no-ip.info(preferred) or | 5 | $! zinser@zinser.no-ip.info(preferred) or |
| 6 | $! zinser@sysdev.deutsche-boerse.com (work) | 6 | $! martin.zinser@eurexchange.com (work) |
| 7 | $! | 7 | $! |
| 8 | $! Make procedure history for Zlib | 8 | $! Make procedure history for Zlib |
| 9 | $! | 9 | $! |
| @@ -14,6 +14,10 @@ $! 0.02 20061008 Adapt to new Makefile.in | |||
| 14 | $! 0.03 20091224 Add support for large file check | 14 | $! 0.03 20091224 Add support for large file check |
| 15 | $! 0.04 20100110 Add new gzclose, gzlib, gzread, gzwrite | 15 | $! 0.04 20100110 Add new gzclose, gzlib, gzread, gzwrite |
| 16 | $! 0.05 20100221 Exchange zlibdefs.h by zconf.h.in | 16 | $! 0.05 20100221 Exchange zlibdefs.h by zconf.h.in |
| 17 | $! 0.06 20120111 Fix missing amiss_err, update zconf_h.in, fix new exmples | ||
| 18 | $! subdir path, update module search in makefile.in | ||
| 19 | $! 0.07 20120115 Triggered by work done by Alexey Chupahin completly redesigned | ||
| 20 | $! shared image creation | ||
| 17 | $! | 21 | $! |
| 18 | $ on error then goto err_exit | 22 | $ on error then goto err_exit |
| 19 | $ set proc/parse=ext | 23 | $ set proc/parse=ext |
| @@ -40,12 +44,15 @@ $ v_file = "zlib.h" | |||
| 40 | $ ccopt = "" | 44 | $ ccopt = "" |
| 41 | $ lopts = "" | 45 | $ lopts = "" |
| 42 | $ dnsrl = "" | 46 | $ dnsrl = "" |
| 43 | $ aconf_in_file = "zconf.h.in#zconf.h_in" | 47 | $ aconf_in_file = "zconf.h.in#zconf.h_in#zconf_h.in" |
| 44 | $ conf_check_string = "" | 48 | $ conf_check_string = "" |
| 45 | $ linkonly = false | 49 | $ linkonly = false |
| 46 | $ optfile = name + ".opt" | 50 | $ optfile = name + ".opt" |
| 51 | $ mapfile = name + ".map" | ||
| 47 | $ libdefs = "" | 52 | $ libdefs = "" |
| 53 | $ vax = f$getsyi("HW_MODEL").lt.1024 | ||
| 48 | $ axp = f$getsyi("HW_MODEL").ge.1024 .and. f$getsyi("HW_MODEL").lt.4096 | 54 | $ axp = f$getsyi("HW_MODEL").ge.1024 .and. f$getsyi("HW_MODEL").lt.4096 |
| 55 | $ ia64 = f$getsyi("HW_MODEL").ge.4096 | ||
| 49 | $! | 56 | $! |
| 50 | $ whoami = f$parse(f$enviornment("Procedure"),,,,"NO_CONCEAL") | 57 | $ whoami = f$parse(f$enviornment("Procedure"),,,,"NO_CONCEAL") |
| 51 | $ mydef = F$parse(whoami,,,"DEVICE") | 58 | $ mydef = F$parse(whoami,,,"DEVICE") |
| @@ -69,6 +76,7 @@ $! Look for the compiler used | |||
| 69 | $! | 76 | $! |
| 70 | $ gosub check_compiler | 77 | $ gosub check_compiler |
| 71 | $ close topt | 78 | $ close topt |
| 79 | $ close optf | ||
| 72 | $! | 80 | $! |
| 73 | $ if its_decc | 81 | $ if its_decc |
| 74 | $ then | 82 | $ then |
| @@ -83,6 +91,11 @@ $ ccopt = "/decc" + ccopt | |||
| 83 | $ define sys decc$library_include: | 91 | $ define sys decc$library_include: |
| 84 | $ endif | 92 | $ endif |
| 85 | $ endif | 93 | $ endif |
| 94 | $ if axp .or. ia64 | ||
| 95 | $ then | ||
| 96 | $ ccopt = ccopt + "/name=as_is/opt=(inline=speed)" | ||
| 97 | $ s_case = true | ||
| 98 | $ endif | ||
| 86 | $ endif | 99 | $ endif |
| 87 | $ if its_vaxc .or. its_gnuc | 100 | $ if its_vaxc .or. its_gnuc |
| 88 | $ then | 101 | $ then |
| @@ -174,14 +187,14 @@ $ CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" - | |||
| 174 | $ write sys$output "Building Zlib ..." | 187 | $ write sys$output "Building Zlib ..." |
| 175 | $ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ | 188 | $ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ |
| 176 | $ write sys$output "Building example..." | 189 | $ write sys$output "Building example..." |
| 177 | $ CALL MAKE example.OBJ "CC ''CCOPT' example" - | 190 | $ CALL MAKE example.OBJ "CC ''CCOPT'/include=[] [.test]example" - |
| 178 | test/example.c zlib.h zconf.h | 191 | [.test]example.c zlib.h zconf.h |
| 179 | $ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb | 192 | $ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb |
| 180 | $ if f$search("x11vms:xvmsutils.olb") .nes. "" | 193 | $ if f$search("x11vms:xvmsutils.olb") .nes. "" |
| 181 | $ then | 194 | $ then |
| 182 | $ write sys$output "Building minigzip..." | 195 | $ write sys$output "Building minigzip..." |
| 183 | $ CALL MAKE minigzip.OBJ "CC ''CCOPT' minigzip" - | 196 | $ CALL MAKE minigzip.OBJ "CC ''CCOPT'/include=[] [.test]minigzip" - |
| 184 | test/minigzip.c zlib.h zconf.h | 197 | [.test]minigzip.c zlib.h zconf.h |
| 185 | $ call make minigzip.exe - | 198 | $ call make minigzip.exe - |
| 186 | "LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" - | 199 | "LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" - |
| 187 | minigzip.obj libz.olb | 200 | minigzip.obj libz.olb |
| @@ -194,21 +207,20 @@ $ endif | |||
| 194 | $! | 207 | $! |
| 195 | $! Alpha gets a shareable image | 208 | $! Alpha gets a shareable image |
| 196 | $! | 209 | $! |
| 197 | $ If axp | 210 | $ If axp .or. ia64 |
| 198 | $ Then | 211 | $ Then |
| 199 | $ gosub crea_olist | 212 | $ gosub crea_olist |
| 200 | $ write sys$output "Creating libzshr.exe" | 213 | $ write sys$output "Creating libzshr.exe" |
| 201 | $ call anal_obj_axp modules.opt _link.opt | 214 | $ call map_2_shopt 'mapfile' 'optfile' |
| 202 | $ if s_case | 215 | $ LINK_'lopts'/SHARE=libzshr.exe modules.opt/opt,'optfile'/opt |
| 203 | $ then | ||
| 204 | $ open/append optf modules.opt | ||
| 205 | $ write optf "case_sensitive=YES" | ||
| 206 | $ close optf | ||
| 207 | $ endif | ||
| 208 | $ LINK_'lopts'/SHARE=libzshr.exe modules.opt/opt,_link.opt/opt | ||
| 209 | $ endif | 216 | $ endif |
| 210 | $ write sys$output "Zlib build completed" | 217 | $ write sys$output "Zlib build completed" |
| 218 | $ delete/nolog tmp.opt;* | ||
| 211 | $ exit | 219 | $ exit |
| 220 | $AMISS_ERR: | ||
| 221 | $ write sys$output "No source for config.hin found." | ||
| 222 | $ write sys$output "Tried any of ''aconf_in_file'" | ||
| 223 | $ goto err_exit | ||
| 212 | $CC_ERR: | 224 | $CC_ERR: |
| 213 | $ write sys$output "C compiler required to build ''name'" | 225 | $ write sys$output "C compiler required to build ''name'" |
| 214 | $ goto err_exit | 226 | $ goto err_exit |
| @@ -397,7 +409,7 @@ $ copy sys$input: out | |||
| 397 | $ deck | 409 | $ deck |
| 398 | # descrip.mms: MMS description file for building zlib on VMS | 410 | # descrip.mms: MMS description file for building zlib on VMS |
| 399 | # written by Martin P.J. Zinser | 411 | # written by Martin P.J. Zinser |
| 400 | # <zinser@zinser.no-ip.info or zinser@sysdev.deutsche-boerse.com> | 412 | # <zinser@zinser.no-ip.info or martin.zinser@eurexchange.com> |
| 401 | 413 | ||
| 402 | OBJS = adler32.obj, compress.obj, crc32.obj, gzclose.obj, gzlib.obj\ | 414 | OBJS = adler32.obj, compress.obj, crc32.obj, gzclose.obj, gzlib.obj\ |
| 403 | gzread.obj, gzwrite.obj, uncompr.obj, infback.obj\ | 415 | gzread.obj, gzwrite.obj, uncompr.obj, infback.obj\ |
| @@ -431,7 +443,8 @@ adler32.obj : adler32.c zutil.h zlib.h zconf.h | |||
| 431 | compress.obj : compress.c zlib.h zconf.h | 443 | compress.obj : compress.c zlib.h zconf.h |
| 432 | crc32.obj : crc32.c zutil.h zlib.h zconf.h | 444 | crc32.obj : crc32.c zutil.h zlib.h zconf.h |
| 433 | deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h | 445 | deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h |
| 434 | example.obj : test/example.c zlib.h zconf.h | 446 | example.obj : [.test]example.c zlib.h zconf.h |
| 447 | cc $(CFLAGS)/include=[] [.test]example.c | ||
| 435 | gzclose.obj : gzclose.c zutil.h zlib.h zconf.h | 448 | gzclose.obj : gzclose.c zutil.h zlib.h zconf.h |
| 436 | gzlib.obj : gzlib.c zutil.h zlib.h zconf.h | 449 | gzlib.obj : gzlib.c zutil.h zlib.h zconf.h |
| 437 | gzread.obj : gzread.c zutil.h zlib.h zconf.h | 450 | gzread.obj : gzread.c zutil.h zlib.h zconf.h |
| @@ -439,7 +452,8 @@ gzwrite.obj : gzwrite.c zutil.h zlib.h zconf.h | |||
| 439 | inffast.obj : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h | 452 | inffast.obj : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h |
| 440 | inflate.obj : inflate.c zutil.h zlib.h zconf.h | 453 | inflate.obj : inflate.c zutil.h zlib.h zconf.h |
| 441 | inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h | 454 | inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h |
| 442 | minigzip.obj : test/minigzip.c zlib.h zconf.h | 455 | minigzip.obj : [.test]minigzip.c zlib.h zconf.h |
| 456 | cc $(CFLAGS)/include=[] [.test]minigzip.c | ||
| 443 | trees.obj : trees.c deflate.h zutil.h zlib.h zconf.h | 457 | trees.obj : trees.c deflate.h zutil.h zlib.h zconf.h |
| 444 | uncompr.obj : uncompr.c zlib.h zconf.h | 458 | uncompr.obj : uncompr.c zlib.h zconf.h |
| 445 | zutil.obj : zutil.c zutil.h zlib.h zconf.h | 459 | zutil.obj : zutil.c zutil.h zlib.h zconf.h |
| @@ -455,13 +469,18 @@ $! | |||
| 455 | $CREA_OLIST: | 469 | $CREA_OLIST: |
| 456 | $ open/read min makefile.in | 470 | $ open/read min makefile.in |
| 457 | $ open/write mod modules.opt | 471 | $ open/write mod modules.opt |
| 458 | $ src_check = "OBJC =" | 472 | $ src_check_list = "OBJZ =#OBJG =" |
| 459 | $MRLOOP: | 473 | $MRLOOP: |
| 460 | $ read/end=mrdone min rec | 474 | $ read/end=mrdone min rec |
| 461 | $ if (f$extract(0,6,rec) .nes. src_check) then goto mrloop | 475 | $ i = 0 |
| 476 | $SRC_CHECK_LOOP: | ||
| 477 | $ src_check = f$element(i, "#", src_check_list) | ||
| 478 | $ i = i+1 | ||
| 479 | $ if src_check .eqs. "#" then goto mrloop | ||
| 480 | $ if (f$extract(0,6,rec) .nes. src_check) then goto src_check_loop | ||
| 462 | $ rec = rec - src_check | 481 | $ rec = rec - src_check |
| 463 | $ gosub extra_filnam | 482 | $ gosub extra_filnam |
| 464 | $ if (f$element(1,"\",rec) .eqs. "\") then goto mrdone | 483 | $ if (f$element(1,"\",rec) .eqs. "\") then goto mrloop |
| 465 | $MRSLOOP: | 484 | $MRSLOOP: |
| 466 | $ read/end=mrdone min rec | 485 | $ read/end=mrdone min rec |
| 467 | $ gosub extra_filnam | 486 | $ gosub extra_filnam |
| @@ -672,124 +691,6 @@ $ endif | |||
| 672 | $ return | 691 | $ return |
| 673 | $!------------------------------------------------------------------------------ | 692 | $!------------------------------------------------------------------------------ |
| 674 | $! | 693 | $! |
| 675 | $! Analyze Object files for OpenVMS AXP to extract Procedure and Data | ||
| 676 | $! information to build a symbol vector for a shareable image | ||
| 677 | $! All the "brains" of this logic was suggested by Hartmut Becker | ||
| 678 | $! (Hartmut.Becker@compaq.com). All the bugs were introduced by me | ||
| 679 | $! (zinser@zinser.no-ip.info), so if you do have problem reports please do not | ||
| 680 | $! bother Hartmut/HP, but get in touch with me | ||
| 681 | $! | ||
| 682 | $! Version history | ||
| 683 | $! 0.01 20040406 Skip over shareable images in option file | ||
| 684 | $! 0.02 20041109 Fix option file for shareable images with case_sensitive=YES | ||
| 685 | $! 0.03 20050107 Skip over Identification labels in option file | ||
| 686 | $! 0.04 20060117 Add uppercase alias to code compiled with /name=as_is | ||
| 687 | $! | ||
| 688 | $ ANAL_OBJ_AXP: Subroutine | ||
| 689 | $ V = 'F$Verify(0) | ||
| 690 | $ SAY := "WRITE_ SYS$OUTPUT" | ||
| 691 | $ | ||
| 692 | $ IF F$SEARCH("''P1'") .EQS. "" | ||
| 693 | $ THEN | ||
| 694 | $ SAY "ANAL_OBJ_AXP-E-NOSUCHFILE: Error, inputfile ''p1' not available" | ||
| 695 | $ goto exit_aa | ||
| 696 | $ ENDIF | ||
| 697 | $ IF "''P2'" .EQS. "" | ||
| 698 | $ THEN | ||
| 699 | $ SAY "ANAL_OBJ_AXP: Error, no output file provided" | ||
| 700 | $ goto exit_aa | ||
| 701 | $ ENDIF | ||
| 702 | $ | ||
| 703 | $ open/read in 'p1 | ||
| 704 | $ create a.tmp | ||
| 705 | $ open/append atmp a.tmp | ||
| 706 | $ loop: | ||
| 707 | $ read/end=end_loop in line | ||
| 708 | $ if f$locate("/SHARE",f$edit(line,"upcase")) .lt. f$length(line) | ||
| 709 | $ then | ||
| 710 | $ write sys$output "ANAL_SKP_SHR-i-skipshare, ''line'" | ||
| 711 | $ goto loop | ||
| 712 | $ endif | ||
| 713 | $ if f$locate("IDENTIFICATION=",f$edit(line,"upcase")) .lt. f$length(line) | ||
| 714 | $ then | ||
| 715 | $ write sys$output "ANAL_OBJ_AXP-i-ident: Identification ", - | ||
| 716 | f$element(1,"=",line) | ||
| 717 | $ goto loop | ||
| 718 | $ endif | ||
| 719 | $ f= f$search(line) | ||
| 720 | $ if f .eqs. "" | ||
| 721 | $ then | ||
| 722 | $ write sys$output "ANAL_OBJ_AXP-w-nosuchfile, ''line'" | ||
| 723 | $ goto loop | ||
| 724 | $ endif | ||
| 725 | $ define/user sys$output nl: | ||
| 726 | $ define/user sys$error nl: | ||
| 727 | $ anal/obj/gsd 'f /out=x.tmp | ||
| 728 | $ open/read xtmp x.tmp | ||
| 729 | $ XLOOP: | ||
| 730 | $ read/end=end_xloop xtmp xline | ||
| 731 | $ xline = f$edit(xline,"compress") | ||
| 732 | $ write atmp xline | ||
| 733 | $ goto xloop | ||
| 734 | $ END_XLOOP: | ||
| 735 | $ close xtmp | ||
| 736 | $ goto loop | ||
| 737 | $ end_loop: | ||
| 738 | $ close in | ||
| 739 | $ close atmp | ||
| 740 | $ if f$search("a.tmp") .eqs. "" - | ||
| 741 | then $ exit | ||
| 742 | $ ! all global definitions | ||
| 743 | $ search a.tmp "symbol:","EGSY$V_DEF 1","EGSY$V_NORM 1"/out=b.tmp | ||
| 744 | $ ! all procedures | ||
| 745 | $ search b.tmp "EGSY$V_NORM 1"/wind=(0,1) /out=c.tmp | ||
| 746 | $ search c.tmp "symbol:"/out=d.tmp | ||
| 747 | $ define/user sys$output nl: | ||
| 748 | $ edito/edt/command=sys$input d.tmp | ||
| 749 | sub/symbol: "/symbol_vector=(/whole | ||
| 750 | sub/"/=PROCEDURE)/whole | ||
| 751 | exit | ||
| 752 | $ ! all data | ||
| 753 | $ search b.tmp "EGSY$V_DEF 1"/wind=(0,1) /out=e.tmp | ||
| 754 | $ search e.tmp "symbol:"/out=f.tmp | ||
| 755 | $ define/user sys$output nl: | ||
| 756 | $ edito/edt/command=sys$input f.tmp | ||
| 757 | sub/symbol: "/symbol_vector=(/whole | ||
| 758 | sub/"/=DATA)/whole | ||
| 759 | exit | ||
| 760 | $ sort/nodupl d.tmp,f.tmp g.tmp | ||
| 761 | $ open/read raw_vector g.tmp | ||
| 762 | $ open/write case_vector 'p2' | ||
| 763 | $ RAWLOOP: | ||
| 764 | $ read/end=end_rawloop raw_vector raw_element | ||
| 765 | $ write case_vector raw_element | ||
| 766 | $ if f$locate("=PROCEDURE)",raw_element) .lt. f$length(raw_element) | ||
| 767 | $ then | ||
| 768 | $ name = f$element(1,"=",raw_element) - "(" | ||
| 769 | $ if f$edit(name,"UPCASE") .nes. name then - | ||
| 770 | write case_vector f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)", - | ||
| 771 | f$edit(name,"UPCASE"), name) | ||
| 772 | $ endif | ||
| 773 | $ if f$locate("=DATA)",raw_element) .lt. f$length(raw_element) | ||
| 774 | $ then | ||
| 775 | $ name = f$element(1,"=",raw_element) - "(" | ||
| 776 | $ if f$edit(name,"UPCASE") .nes. name then - | ||
| 777 | write case_vector f$fao(" symbol_vector=(!AS/!AS=DATA)", - | ||
| 778 | f$edit(name,"UPCASE"), name) | ||
| 779 | $ endif | ||
| 780 | $ goto rawloop | ||
| 781 | $ END_RAWLOOP: | ||
| 782 | $ close raw_vector | ||
| 783 | $ close case_vector | ||
| 784 | $ delete a.tmp;*,b.tmp;*,c.tmp;*,d.tmp;*,e.tmp;*,f.tmp;*,g.tmp;* | ||
| 785 | $ if f$search("x.tmp") .nes. "" - | ||
| 786 | then $ delete x.tmp;* | ||
| 787 | $! | ||
| 788 | $ EXIT_AA: | ||
| 789 | $ if V then set verify | ||
| 790 | $ endsubroutine | ||
| 791 | $!------------------------------------------------------------------------------ | ||
| 792 | $! | ||
| 793 | $! Write configuration to both permanent and temporary config file | 694 | $! Write configuration to both permanent and temporary config file |
| 794 | $! | 695 | $! |
| 795 | $! Version history | 696 | $! Version history |
| @@ -802,3 +703,113 @@ $ write confh 'p1' | |||
| 802 | $ close confh | 703 | $ close confh |
| 803 | $ENDSUBROUTINE | 704 | $ENDSUBROUTINE |
| 804 | $!------------------------------------------------------------------------------ | 705 | $!------------------------------------------------------------------------------ |
| 706 | $! | ||
| 707 | $! Analyze the project map file and create the symbol vector for a shareable | ||
| 708 | $! image from it | ||
| 709 | $! | ||
| 710 | $! Version history | ||
| 711 | $! 0.01 20120128 First version | ||
| 712 | $! | ||
| 713 | $ MAP_2_SHOPT: Subroutine | ||
| 714 | $! | ||
| 715 | $ SAY := "WRITE_ SYS$OUTPUT" | ||
| 716 | $! | ||
| 717 | $ IF F$SEARCH("''P1'") .EQS. "" | ||
| 718 | $ THEN | ||
| 719 | $ SAY "MAP_2_SHOPT-E-NOSUCHFILE: Error, inputfile ''p1' not available" | ||
| 720 | $ goto exit_m2s | ||
| 721 | $ ENDIF | ||
| 722 | $ IF "''P2'" .EQS. "" | ||
| 723 | $ THEN | ||
| 724 | $ SAY "MAP_2_SHOPT: Error, no output file provided" | ||
| 725 | $ goto exit_m2s | ||
| 726 | $ ENDIF | ||
| 727 | $! | ||
| 728 | $ open/read map 'p1 | ||
| 729 | $ if axp .or. ia64 | ||
| 730 | $ then | ||
| 731 | $ open/write aopt a.opt | ||
| 732 | $ open/write bopt b.opt | ||
| 733 | $ write aopt " CASE_SENSITIVE=YES" | ||
| 734 | $ write bopt "SYMBOL_VECTOR= (-" | ||
| 735 | $MAP_LOOP: | ||
| 736 | $ read/end=map_end map line | ||
| 737 | $ if (f$locate("{",line).lt. f$length(line)) .or. - | ||
| 738 | (f$locate("global:", line) .lt. f$length(line)) | ||
| 739 | $ then | ||
| 740 | $ proc = true | ||
| 741 | $ goto map_loop | ||
| 742 | $ endif | ||
| 743 | $ if f$locate("}",line).lt. f$length(line) then proc = false | ||
| 744 | $ if f$locate("local:", line) .lt. f$length(line) then proc = false | ||
| 745 | $ if proc | ||
| 746 | $ then | ||
| 747 | $ shared_proc = f$edit(line,"collapse") | ||
| 748 | $ chop_semi = f$locate(";", shared_proc) | ||
| 749 | $ if chop_semi .lt. f$length(shared_proc) then - | ||
| 750 | shared_proc = f$extract(0, chop_semi, shared_proc) | ||
| 751 | $ write aopt f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)",- | ||
| 752 | f$edit(shared_proc,"upcase"),shared_proc) | ||
| 753 | $ write bopt f$fao("!AS=PROCEDURE,-",shared_proc) | ||
| 754 | $ endif | ||
| 755 | $ goto map_loop | ||
| 756 | $MAP_END: | ||
| 757 | $ close/nolog aopt | ||
| 758 | $ close/nolog bopt | ||
| 759 | $ open/append libopt 'p2' | ||
| 760 | $ open/read aopt a.opt | ||
| 761 | $ open/read bopt b.opt | ||
| 762 | $ALOOP: | ||
| 763 | $ read/end=aloop_end aopt line | ||
| 764 | $ write libopt line | ||
| 765 | $ goto aloop | ||
| 766 | $ALOOP_END: | ||
| 767 | $ close/nolog aopt | ||
| 768 | $ sv = "" | ||
| 769 | $BLOOP: | ||
| 770 | $ read/end=bloop_end bopt svn | ||
| 771 | $ if (svn.nes."") | ||
| 772 | $ then | ||
| 773 | $ if (sv.nes."") then write libopt sv | ||
| 774 | $ sv = svn | ||
| 775 | $ endif | ||
| 776 | $ goto bloop | ||
| 777 | $BLOOP_END: | ||
| 778 | $ write libopt f$extract(0,f$length(sv)-2,sv), "-" | ||
| 779 | $ write libopt ")" | ||
| 780 | $ close/nolog bopt | ||
| 781 | $ delete/nolog/noconf a.opt;*,b.opt;* | ||
| 782 | $ else | ||
| 783 | $ if vax | ||
| 784 | $ then | ||
| 785 | $VMAP_LOOP: | ||
| 786 | $ read/end=vmap_end map line | ||
| 787 | $ if (f$locate("{",line).lt. f$length(line)) .or. - | ||
| 788 | $ (f$locate("global:", line) .lt. f$length(line)) | ||
| 789 | $ then | ||
| 790 | $ proc = true | ||
| 791 | $ goto vmap_loop | ||
| 792 | $ endif | ||
| 793 | $ if f$locate("}",line).lt. f$length(line) then proc = false | ||
| 794 | $ if f$locate("local:", line) .lt. f$length(line) then proc = false | ||
| 795 | $ if proc | ||
| 796 | $ then | ||
| 797 | $ shared_proc = f$edit(line,"collapse") | ||
| 798 | $ chop_semi = f$locate(";", shared_proc) | ||
| 799 | $ if chop_semi .lt. f$length(shared_proc) then - | ||
| 800 | shared_proc = f$extract(0, chop_semi, shared_proc) | ||
| 801 | $ write libopt f$fao("UNIVERSAL=!AS",- | ||
| 802 | f$edit(shared_proc,"upcase")) | ||
| 803 | $ endif | ||
| 804 | $ goto vmap_loop | ||
| 805 | $VMAP_END: | ||
| 806 | $ else | ||
| 807 | $ write sys$output "Unknown Architecture (Not VAX, AXP, or IA64)" | ||
| 808 | $ write sys$output "No options file created" | ||
| 809 | $ endif | ||
| 810 | $ endif | ||
| 811 | $ EXIT_M2S: | ||
| 812 | $ close/nolog map | ||
| 813 | $ close/nolog libopt | ||
| 814 | $ endsubroutine | ||
| 815 | $!------------------------------------------------------------------------------ | ||
