Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Zlib
提交
98944945
T
Third Party Zlib
项目概览
OpenHarmony
/
Third Party Zlib
大约 1 年 前同步成功
通知
16
Star
112
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Zlib
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
98944945
编写于
2月 05, 2012
作者:
M
Mark Adler
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update make_vms.com [Zinser].
上级
fc68b600
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
150 addition
and
139 deletion
+150
-139
make_vms.com
make_vms.com
+150
-139
未找到文件。
make_vms.com
浏览文件 @
98944945
...
...
@@ -3,7 +3,7 @@ $! Martin P.J. Zinser
$!
$! In case of problems with the install you might contact me at
$! zinser@zinser.no-ip.info(preferred) or
$!
zinser@sysdev.deutsche-boers
e.com (work)
$!
martin.zinser@eurexchang
e.com (work)
$!
$! Make procedure history for Zlib
$!
...
...
@@ -14,6 +14,10 @@ $! 0.02 20061008 Adapt to new Makefile.in
$! 0.03 20091224 Add support for large file check
$! 0.04 20100110 Add new gzclose, gzlib, gzread, gzwrite
$! 0.05 20100221 Exchange zlibdefs.h by zconf.h.in
$! 0.06 20120111 Fix missing amiss_err, update zconf_h.in, fix new exmples
$! subdir path, update module search in makefile.in
$! 0.07 20120115 Triggered by work done by Alexey Chupahin completly redesigned
$! shared image creation
$!
$ on error then goto err_exit
$ set proc/parse=ext
...
...
@@ -40,12 +44,15 @@ $ v_file = "zlib.h"
$ ccopt = ""
$ lopts = ""
$ dnsrl = ""
$ aconf_in_file = "zconf.h.in#zconf.h_in"
$ aconf_in_file = "zconf.h.in#zconf.h_in
#zconf_h.in
"
$ conf_check_string = ""
$ linkonly = false
$ optfile = name + ".opt"
$ mapfile = name + ".map"
$ libdefs = ""
$ vax = f$getsyi("HW_MODEL").lt.1024
$ axp = f$getsyi("HW_MODEL").ge.1024 .and. f$getsyi("HW_MODEL").lt.4096
$ ia64 = f$getsyi("HW_MODEL").ge.4096
$!
$ whoami = f$parse(f$enviornment("Procedure"),,,,"NO_CONCEAL")
$ mydef = F$parse(whoami,,,"DEVICE")
...
...
@@ -69,6 +76,7 @@ $! Look for the compiler used
$!
$ gosub check_compiler
$ close topt
$ close optf
$!
$ if its_decc
$ then
...
...
@@ -83,6 +91,11 @@ $ ccopt = "/decc" + ccopt
$ define sys decc$library_include:
$ endif
$ endif
$ if axp .or. ia64
$ then
$ ccopt = ccopt + "/name=as_is/opt=(inline=speed)"
$ s_case = true
$ endif
$ endif
$ if its_vaxc .or. its_gnuc
$ then
...
...
@@ -174,14 +187,14 @@ $ CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" -
$ write sys$output "Building Zlib ..."
$ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ
$ write sys$output "Building example..."
$ CALL MAKE example.OBJ "CC ''CCOPT'
example" -
test/
example.c zlib.h zconf.h
$ CALL MAKE example.OBJ "CC ''CCOPT'
/include=[] [.test]
example" -
[.test]
example.c zlib.h zconf.h
$ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb
$ if f$search("x11vms:xvmsutils.olb") .nes. ""
$ then
$ write sys$output "Building minigzip..."
$ CALL MAKE minigzip.OBJ "CC ''CCOPT'
minigzip" -
test/
minigzip.c zlib.h zconf.h
$ CALL MAKE minigzip.OBJ "CC ''CCOPT'
/include=[] [.test]
minigzip" -
[.test]
minigzip.c zlib.h zconf.h
$ call make minigzip.exe -
"LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" -
minigzip.obj libz.olb
...
...
@@ -194,21 +207,20 @@ $ endif
$!
$! Alpha gets a shareable image
$!
$ If axp
$ If axp
.or. ia64
$ Then
$ gosub crea_olist
$ write sys$output "Creating libzshr.exe"
$ call anal_obj_axp modules.opt _link.opt
$ if s_case
$ then
$ open/append optf modules.opt
$ write optf "case_sensitive=YES"
$ close optf
$ endif
$ LINK_'lopts'/SHARE=libzshr.exe modules.opt/opt,_link.opt/opt
$ call map_2_shopt 'mapfile' 'optfile'
$ LINK_'lopts'/SHARE=libzshr.exe modules.opt/opt,'optfile'/opt
$ endif
$ write sys$output "Zlib build completed"
$ delete/nolog tmp.opt;*
$ exit
$AMISS_ERR:
$ write sys$output "No source for config.hin found."
$ write sys$output "Tried any of ''aconf_in_file'"
$ goto err_exit
$CC_ERR:
$ write sys$output "C compiler required to build ''name'"
$ goto err_exit
...
...
@@ -397,7 +409,7 @@ $ copy sys$input: out
$ deck
# descrip.mms: MMS description file for building zlib on VMS
# written by Martin P.J. Zinser
# <zinser@zinser.no-ip.info or
zinser@sysdev.deutsche-boers
e.com>
# <zinser@zinser.no-ip.info or
martin.zinser@eurexchang
e.com>
OBJS = adler32.obj, compress.obj, crc32.obj, gzclose.obj, gzlib.obj\
gzread.obj, gzwrite.obj, uncompr.obj, infback.obj\
...
...
@@ -431,7 +443,8 @@ adler32.obj : adler32.c zutil.h zlib.h zconf.h
compress.obj : compress.c zlib.h zconf.h
crc32.obj : crc32.c zutil.h zlib.h zconf.h
deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h
example.obj : test/example.c zlib.h zconf.h
example.obj : [.test]example.c zlib.h zconf.h
cc $(CFLAGS)/include=[] [.test]example.c
gzclose.obj : gzclose.c zutil.h zlib.h zconf.h
gzlib.obj : gzlib.c zutil.h zlib.h zconf.h
gzread.obj : gzread.c zutil.h zlib.h zconf.h
...
...
@@ -439,7 +452,8 @@ gzwrite.obj : gzwrite.c zutil.h zlib.h zconf.h
inffast.obj : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h
inflate.obj : inflate.c zutil.h zlib.h zconf.h
inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h
minigzip.obj : test/minigzip.c zlib.h zconf.h
minigzip.obj : [.test]minigzip.c zlib.h zconf.h
cc $(CFLAGS)/include=[] [.test]minigzip.c
trees.obj : trees.c deflate.h zutil.h zlib.h zconf.h
uncompr.obj : uncompr.c zlib.h zconf.h
zutil.obj : zutil.c zutil.h zlib.h zconf.h
...
...
@@ -455,13 +469,18 @@ $!
$CREA_OLIST:
$ open/read min makefile.in
$ open/write mod modules.opt
$ src_check
= "OBJC
="
$ src_check
_list = "OBJZ =#OBJG
="
$MRLOOP:
$ read/end=mrdone min rec
$ if (f$extract(0,6,rec) .nes. src_check) then goto mrloop
$ i = 0
$SRC_CHECK_LOOP:
$ src_check = f$element(i, "#", src_check_list)
$ i = i+1
$ if src_check .eqs. "#" then goto mrloop
$ if (f$extract(0,6,rec) .nes. src_check) then goto src_check_loop
$ rec = rec - src_check
$ gosub extra_filnam
$ if (f$element(1,"\",rec) .eqs. "\") then goto mr
done
$ if (f$element(1,"\",rec) .eqs. "\") then goto mr
loop
$MRSLOOP:
$ read/end=mrdone min rec
$ gosub extra_filnam
...
...
@@ -672,124 +691,6 @@ $ endif
$ return
$!------------------------------------------------------------------------------
$!
$! Analyze Object files for OpenVMS AXP to extract Procedure and Data
$! information to build a symbol vector for a shareable image
$! All the "brains" of this logic was suggested by Hartmut Becker
$! (Hartmut.Becker@compaq.com). All the bugs were introduced by me
$! (zinser@zinser.no-ip.info), so if you do have problem reports please do not
$! bother Hartmut/HP, but get in touch with me
$!
$! Version history
$! 0.01 20040406 Skip over shareable images in option file
$! 0.02 20041109 Fix option file for shareable images with case_sensitive=YES
$! 0.03 20050107 Skip over Identification labels in option file
$! 0.04 20060117 Add uppercase alias to code compiled with /name=as_is
$!
$ ANAL_OBJ_AXP: Subroutine
$ V = 'F$Verify(0)
$ SAY := "WRITE_ SYS$OUTPUT"
$
$ IF F$SEARCH("''P1'") .EQS. ""
$ THEN
$ SAY "ANAL_OBJ_AXP-E-NOSUCHFILE: Error, inputfile ''p1' not available"
$ goto exit_aa
$ ENDIF
$ IF "''P2'" .EQS. ""
$ THEN
$ SAY "ANAL_OBJ_AXP: Error, no output file provided"
$ goto exit_aa
$ ENDIF
$
$ open/read in 'p1
$ create a.tmp
$ open/append atmp a.tmp
$ loop:
$ read/end=end_loop in line
$ if f$locate("/SHARE",f$edit(line,"upcase")) .lt. f$length(line)
$ then
$ write sys$output "ANAL_SKP_SHR-i-skipshare, ''line'"
$ goto loop
$ endif
$ if f$locate("IDENTIFICATION=",f$edit(line,"upcase")) .lt. f$length(line)
$ then
$ write sys$output "ANAL_OBJ_AXP-i-ident: Identification ", -
f$element(1,"=",line)
$ goto loop
$ endif
$ f= f$search(line)
$ if f .eqs. ""
$ then
$ write sys$output "ANAL_OBJ_AXP-w-nosuchfile, ''line'"
$ goto loop
$ endif
$ define/user sys$output nl:
$ define/user sys$error nl:
$ anal/obj/gsd 'f /out=x.tmp
$ open/read xtmp x.tmp
$ XLOOP:
$ read/end=end_xloop xtmp xline
$ xline = f$edit(xline,"compress")
$ write atmp xline
$ goto xloop
$ END_XLOOP:
$ close xtmp
$ goto loop
$ end_loop:
$ close in
$ close atmp
$ if f$search("a.tmp") .eqs. "" -
then $ exit
$ ! all global definitions
$ search a.tmp "symbol:","EGSY$V_DEF 1","EGSY$V_NORM 1"/out=b.tmp
$ ! all procedures
$ search b.tmp "EGSY$V_NORM 1"/wind=(0,1) /out=c.tmp
$ search c.tmp "symbol:"/out=d.tmp
$ define/user sys$output nl:
$ edito/edt/command=sys$input d.tmp
sub/symbol: "/symbol_vector=(/whole
sub/"/=PROCEDURE)/whole
exit
$ ! all data
$ search b.tmp "EGSY$V_DEF 1"/wind=(0,1) /out=e.tmp
$ search e.tmp "symbol:"/out=f.tmp
$ define/user sys$output nl:
$ edito/edt/command=sys$input f.tmp
sub/symbol: "/symbol_vector=(/whole
sub/"/=DATA)/whole
exit
$ sort/nodupl d.tmp,f.tmp g.tmp
$ open/read raw_vector g.tmp
$ open/write case_vector 'p2'
$ RAWLOOP:
$ read/end=end_rawloop raw_vector raw_element
$ write case_vector raw_element
$ if f$locate("=PROCEDURE)",raw_element) .lt. f$length(raw_element)
$ then
$ name = f$element(1,"=",raw_element) - "("
$ if f$edit(name,"UPCASE") .nes. name then -
write case_vector f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)", -
f$edit(name,"UPCASE"), name)
$ endif
$ if f$locate("=DATA)",raw_element) .lt. f$length(raw_element)
$ then
$ name = f$element(1,"=",raw_element) - "("
$ if f$edit(name,"UPCASE") .nes. name then -
write case_vector f$fao(" symbol_vector=(!AS/!AS=DATA)", -
f$edit(name,"UPCASE"), name)
$ endif
$ goto rawloop
$ END_RAWLOOP:
$ close raw_vector
$ close case_vector
$ delete a.tmp;*,b.tmp;*,c.tmp;*,d.tmp;*,e.tmp;*,f.tmp;*,g.tmp;*
$ if f$search("x.tmp") .nes. "" -
then $ delete x.tmp;*
$!
$ EXIT_AA:
$ if V then set verify
$ endsubroutine
$!------------------------------------------------------------------------------
$!
$! Write configuration to both permanent and temporary config file
$!
$! Version history
...
...
@@ -802,3 +703,113 @@ $ write confh 'p1'
$ close confh
$ENDSUBROUTINE
$!------------------------------------------------------------------------------
$!
$! Analyze the project map file and create the symbol vector for a shareable
$! image from it
$!
$! Version history
$! 0.01 20120128 First version
$!
$ MAP_2_SHOPT: Subroutine
$!
$ SAY := "WRITE_ SYS$OUTPUT"
$!
$ IF F$SEARCH("''P1'") .EQS. ""
$ THEN
$ SAY "MAP_2_SHOPT-E-NOSUCHFILE: Error, inputfile ''p1' not available"
$ goto exit_m2s
$ ENDIF
$ IF "''P2'" .EQS. ""
$ THEN
$ SAY "MAP_2_SHOPT: Error, no output file provided"
$ goto exit_m2s
$ ENDIF
$!
$ open/read map 'p1
$ if axp .or. ia64
$ then
$ open/write aopt a.opt
$ open/write bopt b.opt
$ write aopt " CASE_SENSITIVE=YES"
$ write bopt "SYMBOL_VECTOR= (-"
$MAP_LOOP:
$ read/end=map_end map line
$ if (f$locate("{",line).lt. f$length(line)) .or. -
(f$locate("global:", line) .lt. f$length(line))
$ then
$ proc = true
$ goto map_loop
$ endif
$ if f$locate("}",line).lt. f$length(line) then proc = false
$ if f$locate("local:", line) .lt. f$length(line) then proc = false
$ if proc
$ then
$ shared_proc = f$edit(line,"collapse")
$ chop_semi = f$locate(";", shared_proc)
$ if chop_semi .lt. f$length(shared_proc) then -
shared_proc = f$extract(0, chop_semi, shared_proc)
$ write aopt f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)",-
f$edit(shared_proc,"upcase"),shared_proc)
$ write bopt f$fao("!AS=PROCEDURE,-",shared_proc)
$ endif
$ goto map_loop
$MAP_END:
$ close/nolog aopt
$ close/nolog bopt
$ open/append libopt 'p2'
$ open/read aopt a.opt
$ open/read bopt b.opt
$ALOOP:
$ read/end=aloop_end aopt line
$ write libopt line
$ goto aloop
$ALOOP_END:
$ close/nolog aopt
$ sv = ""
$BLOOP:
$ read/end=bloop_end bopt svn
$ if (svn.nes."")
$ then
$ if (sv.nes."") then write libopt sv
$ sv = svn
$ endif
$ goto bloop
$BLOOP_END:
$ write libopt f$extract(0,f$length(sv)-2,sv), "-"
$ write libopt ")"
$ close/nolog bopt
$ delete/nolog/noconf a.opt;*,b.opt;*
$ else
$ if vax
$ then
$VMAP_LOOP:
$ read/end=vmap_end map line
$ if (f$locate("{",line).lt. f$length(line)) .or. -
$ (f$locate("global:", line) .lt. f$length(line))
$ then
$ proc = true
$ goto vmap_loop
$ endif
$ if f$locate("}",line).lt. f$length(line) then proc = false
$ if f$locate("local:", line) .lt. f$length(line) then proc = false
$ if proc
$ then
$ shared_proc = f$edit(line,"collapse")
$ chop_semi = f$locate(";", shared_proc)
$ if chop_semi .lt. f$length(shared_proc) then -
shared_proc = f$extract(0, chop_semi, shared_proc)
$ write libopt f$fao("UNIVERSAL=!AS",-
f$edit(shared_proc,"upcase"))
$ endif
$ goto vmap_loop
$VMAP_END:
$ else
$ write sys$output "Unknown Architecture (Not VAX, AXP, or IA64)"
$ write sys$output "No options file created"
$ endif
$ endif
$ EXIT_M2S:
$ close/nolog map
$ close/nolog libopt
$ endsubroutine
$!------------------------------------------------------------------------------
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录