diff options
| author | Mark Adler <madler@alumni.caltech.edu> | 2012-03-02 23:50:17 -0800 |
|---|---|---|
| committer | Mark Adler <madler@alumni.caltech.edu> | 2012-03-02 23:50:17 -0800 |
| commit | 513dfcc00ec6c027429504a217a8cb7cb58dbbbf (patch) | |
| tree | 1b66d3a7dc80e5617f0777829485847d4bad5ce9 | |
| parent | 05de38d11e2ec5f49995ab0325b1acf137434a16 (diff) | |
| download | zlib-513dfcc00ec6c027429504a217a8cb7cb58dbbbf.tar.gz zlib-513dfcc00ec6c027429504a217a8cb7cb58dbbbf.tar.bz2 zlib-513dfcc00ec6c027429504a217a8cb7cb58dbbbf.zip | |
Fix make_vms.com for VAX [Zinser].
| -rw-r--r-- | make_vms.com | 83 |
1 files changed, 63 insertions, 20 deletions
diff --git a/make_vms.com b/make_vms.com index 271815b..059c50d 100644 --- a/make_vms.com +++ b/make_vms.com | |||
| @@ -14,13 +14,14 @@ $! 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 | 17 | $! 0.06 20120111 Fix missing amiss_err, update zconf_h.in, fix new exmples |
| 18 | $! subdir path, update module search in makefile.in | 18 | $! subdir path, update module search in makefile.in |
| 19 | $! 0.07 20120115 Triggered by work done by Alexey Chupahin completly redesigned | 19 | $! 0.07 20120115 Triggered by work done by Alexey Chupahin completly redesigned |
| 20 | $! shared image creation | 20 | $! shared image creation |
| 21 | $! 0.08 20120219 Make it work on VAX again, pre-load missing symbols to shared | ||
| 22 | $! image | ||
| 21 | $! | 23 | $! |
| 22 | $ on error then goto err_exit | 24 | $ on error then goto err_exit |
| 23 | $ set proc/parse=ext | ||
| 24 | $! | 25 | $! |
| 25 | $ true = 1 | 26 | $ true = 1 |
| 26 | $ false = 0 | 27 | $ false = 0 |
| @@ -54,6 +55,7 @@ $ vax = f$getsyi("HW_MODEL").lt.1024 | |||
| 54 | $ axp = f$getsyi("HW_MODEL").ge.1024 .and. f$getsyi("HW_MODEL").lt.4096 | 55 | $ axp = f$getsyi("HW_MODEL").ge.1024 .and. f$getsyi("HW_MODEL").lt.4096 |
| 55 | $ ia64 = f$getsyi("HW_MODEL").ge.4096 | 56 | $ ia64 = f$getsyi("HW_MODEL").ge.4096 |
| 56 | $! | 57 | $! |
| 58 | $ if axp .or. ia64 then set proc/parse=extended | ||
| 57 | $ whoami = f$parse(f$enviornment("Procedure"),,,,"NO_CONCEAL") | 59 | $ whoami = f$parse(f$enviornment("Procedure"),,,,"NO_CONCEAL") |
| 58 | $ mydef = F$parse(whoami,,,"DEVICE") | 60 | $ mydef = F$parse(whoami,,,"DEVICE") |
| 59 | $ mydir = f$parse(whoami,,,"DIRECTORY") - "][" | 61 | $ mydir = f$parse(whoami,,,"DIRECTORY") - "][" |
| @@ -205,15 +207,12 @@ $ write sys$output "Make ''name' ''version' with ''Make' " | |||
| 205 | $ 'make' | 207 | $ 'make' |
| 206 | $ endif | 208 | $ endif |
| 207 | $! | 209 | $! |
| 208 | $! Alpha gets a shareable image | 210 | $! Create shareable image |
| 209 | $! | 211 | $! |
| 210 | $ If axp .or. ia64 | 212 | $ gosub crea_olist |
| 211 | $ Then | 213 | $ write sys$output "Creating libzshr.exe" |
| 212 | $ gosub crea_olist | 214 | $ call map_2_shopt 'mapfile' 'optfile' |
| 213 | $ write sys$output "Creating libzshr.exe" | 215 | $ LINK_'lopts'/SHARE=libzshr.exe modules.opt/opt,'optfile'/opt |
| 214 | $ call map_2_shopt 'mapfile' 'optfile' | ||
| 215 | $ LINK_'lopts'/SHARE=libzshr.exe modules.opt/opt,'optfile'/opt | ||
| 216 | $ endif | ||
| 217 | $ write sys$output "Zlib build completed" | 216 | $ write sys$output "Zlib build completed" |
| 218 | $ delete/nolog tmp.opt;* | 217 | $ delete/nolog tmp.opt;* |
| 219 | $ exit | 218 | $ exit |
| @@ -419,10 +418,14 @@ OBJS = adler32.obj, compress.obj, crc32.obj, gzclose.obj, gzlib.obj\ | |||
| 419 | $ eod | 418 | $ eod |
| 420 | $ write out "CFLAGS=", ccopt | 419 | $ write out "CFLAGS=", ccopt |
| 421 | $ write out "LOPTS=", lopts | 420 | $ write out "LOPTS=", lopts |
| 421 | $ if f$search("x11vms:xvmsutils.olb") .nes. "" | ||
| 422 | $ then | ||
| 423 | $ write out "all : example.exe minigzip.exe libz.olb" | ||
| 424 | $ else | ||
| 425 | $ write out "all : example.exe libz.olb" | ||
| 426 | $ endif | ||
| 422 | $ copy sys$input: out | 427 | $ copy sys$input: out |
| 423 | $ deck | 428 | $ deck |
| 424 | |||
| 425 | all : example.exe minigzip.exe libz.olb | ||
| 426 | @ write sys$output " Example applications available" | 429 | @ write sys$output " Example applications available" |
| 427 | 430 | ||
| 428 | libz.olb : libz.olb($(OBJS)) | 431 | libz.olb : libz.olb($(OBJS)) |
| @@ -709,6 +712,7 @@ $! image from it | |||
| 709 | $! | 712 | $! |
| 710 | $! Version history | 713 | $! Version history |
| 711 | $! 0.01 20120128 First version | 714 | $! 0.01 20120128 First version |
| 715 | $! 0.02 20120226 Add pre-load logic | ||
| 712 | $! | 716 | $! |
| 713 | $ MAP_2_SHOPT: Subroutine | 717 | $ MAP_2_SHOPT: Subroutine |
| 714 | $! | 718 | $! |
| @@ -725,13 +729,35 @@ $ SAY "MAP_2_SHOPT: Error, no output file provided" | |||
| 725 | $ goto exit_m2s | 729 | $ goto exit_m2s |
| 726 | $ ENDIF | 730 | $ ENDIF |
| 727 | $! | 731 | $! |
| 732 | $ module1 = "deflate#deflateEnd#deflateInit_#deflateParams#deflateSetDictionary" | ||
| 733 | $ module2 = "gzclose#gzerror#gzgetc#gzgets#gzopen#gzprintf#gzputc#gzputs#gzread" | ||
| 734 | $ module3 = "gzseek#gztell#inflate#inflateEnd#inflateInit_#inflateSetDictionary" | ||
| 735 | $ module4 = "inflateSync#uncompress#zlibVersion#compress" | ||
| 728 | $ open/read map 'p1 | 736 | $ open/read map 'p1 |
| 729 | $ if axp .or. ia64 | 737 | $ if axp .or. ia64 |
| 730 | $ then | 738 | $ then |
| 731 | $ open/write aopt a.opt | 739 | $ open/write aopt a.opt |
| 732 | $ open/write bopt b.opt | 740 | $ open/write bopt b.opt |
| 733 | $ write aopt " CASE_SENSITIVE=YES" | 741 | $ write aopt " CASE_SENSITIVE=YES" |
| 734 | $ write bopt "SYMBOL_VECTOR= (-" | 742 | $ write bopt "SYMBOL_VECTOR= (-" |
| 743 | $ mod_sym_num = 1 | ||
| 744 | $ MOD_SYM_LOOP: | ||
| 745 | $ if f$type(module'mod_sym_num') .nes. "" | ||
| 746 | $ then | ||
| 747 | $ mod_in = 0 | ||
| 748 | $ MOD_SYM_IN: | ||
| 749 | $ shared_proc = f$element(mod_in, "#", module'mod_sym_num') | ||
| 750 | $ if shared_proc .nes. "#" | ||
| 751 | $ then | ||
| 752 | $ write aopt f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)",- | ||
| 753 | f$edit(shared_proc,"upcase"),shared_proc) | ||
| 754 | $ write bopt f$fao("!AS=PROCEDURE,-",shared_proc) | ||
| 755 | $ mod_in = mod_in + 1 | ||
| 756 | $ goto mod_sym_in | ||
| 757 | $ endif | ||
| 758 | $ mod_sym_num = mod_sym_num + 1 | ||
| 759 | $ goto mod_sym_loop | ||
| 760 | $ endif | ||
| 735 | $MAP_LOOP: | 761 | $MAP_LOOP: |
| 736 | $ read/end=map_end map line | 762 | $ read/end=map_end map line |
| 737 | $ if (f$locate("{",line).lt. f$length(line)) .or. - | 763 | $ if (f$locate("{",line).lt. f$length(line)) .or. - |
| @@ -756,9 +782,9 @@ $ goto map_loop | |||
| 756 | $MAP_END: | 782 | $MAP_END: |
| 757 | $ close/nolog aopt | 783 | $ close/nolog aopt |
| 758 | $ close/nolog bopt | 784 | $ close/nolog bopt |
| 759 | $ open/append libopt 'p2' | 785 | $ open/append libopt 'p2' |
| 760 | $ open/read aopt a.opt | 786 | $ open/read aopt a.opt |
| 761 | $ open/read bopt b.opt | 787 | $ open/read bopt b.opt |
| 762 | $ALOOP: | 788 | $ALOOP: |
| 763 | $ read/end=aloop_end aopt line | 789 | $ read/end=aloop_end aopt line |
| 764 | $ write libopt line | 790 | $ write libopt line |
| @@ -779,13 +805,31 @@ $ write libopt f$extract(0,f$length(sv)-2,sv), "-" | |||
| 779 | $ write libopt ")" | 805 | $ write libopt ")" |
| 780 | $ close/nolog bopt | 806 | $ close/nolog bopt |
| 781 | $ delete/nolog/noconf a.opt;*,b.opt;* | 807 | $ delete/nolog/noconf a.opt;*,b.opt;* |
| 782 | $ else | 808 | $ else |
| 783 | $ if vax | 809 | $ if vax |
| 784 | $ then | 810 | $ then |
| 811 | $ open/append libopt 'p2' | ||
| 812 | $ mod_sym_num = 1 | ||
| 813 | $ VMOD_SYM_LOOP: | ||
| 814 | $ if f$type(module'mod_sym_num') .nes. "" | ||
| 815 | $ then | ||
| 816 | $ mod_in = 0 | ||
| 817 | $ VMOD_SYM_IN: | ||
| 818 | $ shared_proc = f$element(mod_in, "#", module'mod_sym_num') | ||
| 819 | $ if shared_proc .nes. "#" | ||
| 820 | $ then | ||
| 821 | $ write libopt f$fao("UNIVERSAL=!AS",- | ||
| 822 | f$edit(shared_proc,"upcase")) | ||
| 823 | $ mod_in = mod_in + 1 | ||
| 824 | $ goto vmod_sym_in | ||
| 825 | $ endif | ||
| 826 | $ mod_sym_num = mod_sym_num + 1 | ||
| 827 | $ goto vmod_sym_loop | ||
| 828 | $ endif | ||
| 785 | $VMAP_LOOP: | 829 | $VMAP_LOOP: |
| 786 | $ read/end=vmap_end map line | 830 | $ read/end=vmap_end map line |
| 787 | $ if (f$locate("{",line).lt. f$length(line)) .or. - | 831 | $ if (f$locate("{",line).lt. f$length(line)) .or. - |
| 788 | $ (f$locate("global:", line) .lt. f$length(line)) | 832 | (f$locate("global:", line) .lt. f$length(line)) |
| 789 | $ then | 833 | $ then |
| 790 | $ proc = true | 834 | $ proc = true |
| 791 | $ goto vmap_loop | 835 | $ goto vmap_loop |
| @@ -811,5 +855,4 @@ $ endif | |||
| 811 | $ EXIT_M2S: | 855 | $ EXIT_M2S: |
| 812 | $ close/nolog map | 856 | $ close/nolog map |
| 813 | $ close/nolog libopt | 857 | $ close/nolog libopt |
| 814 | $ endsubroutine | 858 | $ endsubroutine |
| 815 | $!------------------------------------------------------------------------------ | ||
