michael@0: $! make Freetype2 under OpenVMS michael@0: $! michael@0: $! Copyright 2003, 2004, 2006, 2007, 2013 by michael@0: $! David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: $! michael@0: $! This file is part of the FreeType project, and may only be used, modified, michael@0: $! and distributed under the terms of the FreeType project license, michael@0: $! LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: $! indicate that you have read the license and understand and accept it michael@0: $! fully. michael@0: $! michael@0: $! michael@0: $! External libraries (like Freetype, XPM, etc.) are supported via the michael@0: $! config file VMSLIB.DAT. Please check the sample file, which is part of this michael@0: $! distribution, for the information you need to provide michael@0: $! michael@0: $! This procedure currently does support the following commandline options michael@0: $! in arbitrary order michael@0: $! michael@0: $! * DEBUG - Compile modules with /noopt/debug and link shareable image michael@0: $! with /debug michael@0: $! * LOPTS - Options to be passed to the link command michael@0: $! * CCOPT - Options to be passed to the C compiler michael@0: $! michael@0: $! In case of problems with the install you might contact me at michael@0: $! zinser@zinser.no-ip.info(preferred) or michael@0: $! zinser@sysdev.deutsche-boerse.com (work) michael@0: $! michael@0: $! Make procedure history for Freetype2 michael@0: $! michael@0: $!------------------------------------------------------------------------------ michael@0: $! Version history michael@0: $! 0.01 20040401 First version to receive a number michael@0: $! 0.02 20041030 Add error handling, Freetype 2.1.9 michael@0: $! michael@0: $ on error then goto err_exit michael@0: $ true = 1 michael@0: $ false = 0 michael@0: $ tmpnam = "temp_" + f$getjpi("","pid") michael@0: $ tt = tmpnam + ".txt" michael@0: $ tc = tmpnam + ".c" michael@0: $ th = tmpnam + ".h" michael@0: $ its_decc = false michael@0: $ its_vaxc = false michael@0: $ its_gnuc = false michael@0: $! michael@0: $! Setup variables holding "config" information michael@0: $! michael@0: $ Make = "" michael@0: $ ccopt = "/name=as_is/float=ieee" michael@0: $ lopts = "" michael@0: $ dnsrl = "" michael@0: $ aconf_in_file = "config.hin" michael@0: $ name = "Freetype2" michael@0: $ mapfile = name + ".map" michael@0: $ optfile = name + ".opt" michael@0: $ s_case = false michael@0: $ liblist = "" michael@0: $! michael@0: $ whoami = f$parse(f$environment("Procedure"),,,,"NO_CONCEAL") michael@0: $ mydef = F$parse(whoami,,,"DEVICE") michael@0: $ mydir = f$parse(whoami,,,"DIRECTORY") - "][" michael@0: $ myproc = f$parse(whoami,,,"Name") + f$parse(whoami,,,"type") michael@0: $! michael@0: $! Check for MMK/MMS michael@0: $! michael@0: $ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS" michael@0: $ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK" michael@0: $! michael@0: $! Which command parameters were given michael@0: $! michael@0: $ gosub check_opts michael@0: $! michael@0: $! Create option file michael@0: $! michael@0: $ open/write optf 'optfile' michael@0: $! michael@0: $! Pull in external libraries michael@0: $! michael@0: $ create libs.opt michael@0: $ open/write libsf libs.opt michael@0: $ gosub check_create_vmslib michael@0: $! michael@0: $! Create objects michael@0: $! michael@0: $ if libdefs .nes. "" michael@0: $ then michael@0: $ ccopt = ccopt + "/define=(" + f$extract(0,f$length(libdefs)-1,libdefs) + ")" michael@0: $ endif michael@0: $! michael@0: $ if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) - michael@0: then s_case = true michael@0: $ gosub crea_mms michael@0: $! michael@0: $ 'Make' /macro=(comp_flags="''ccopt'") michael@0: $ purge/nolog [...]descrip.mms michael@0: $! michael@0: $! Add them to options michael@0: $! michael@0: $FLOOP: michael@0: $ file = f$edit(f$search("[...]*.obj"),"UPCASE") michael@0: $ if (file .nes. "") michael@0: $ then michael@0: $ if f$locate("DEMOS",file) .eqs. f$length(file) then write optf file michael@0: $ goto floop michael@0: $ endif michael@0: $! michael@0: $ close optf michael@0: $! michael@0: $! michael@0: $! Alpha gets a shareable image michael@0: $! michael@0: $ If f$getsyi("HW_MODEL") .gt. 1024 michael@0: $ Then michael@0: $ write sys$output "Creating freetype2shr.exe" michael@0: $ call anal_obj_axp 'optfile' _link.opt michael@0: $ open/append optf 'optfile' michael@0: $ if s_case then WRITE optf "case_sensitive=YES" michael@0: $ close optf michael@0: $ LINK_/NODEB/SHARE=[.lib]freetype2shr.exe - michael@0: 'optfile'/opt,libs.opt/opt,_link.opt/opt michael@0: $ endif michael@0: $! michael@0: $ exit michael@0: $! michael@0: $ michael@0: $ERR_LIB: michael@0: $ write sys$output "Error reading config file vmslib.dat" michael@0: $ goto err_exit michael@0: $FT2_ERR: michael@0: $ write sys$output "Could not locate Freetype 2 include files" michael@0: $ goto err_exit michael@0: $ERR_EXIT: michael@0: $ set message/facil/ident/sever/text michael@0: $ close/nolog optf michael@0: $ close/nolog out michael@0: $ close/nolog libdata michael@0: $ close/nolog in michael@0: $ close/nolog atmp michael@0: $ close/nolog xtmp michael@0: $ write sys$output "Exiting..." michael@0: $ exit 2 michael@0: $! michael@0: $!------------------------------------------------------------------------------ michael@0: $! michael@0: $! If MMS/MMK are available dump out the descrip.mms if required michael@0: $! michael@0: $CREA_MMS: michael@0: $ write sys$output "Creating descrip.mms files ..." michael@0: $ write sys$output "... Main directory" michael@0: $ create descrip.mms michael@0: $ open/append out descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 build system -- top-level Makefile for OpenVMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2001 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: $ EOD michael@0: $ write out "CFLAGS = ", ccopt michael@0: $ copy sys$input: out michael@0: $ deck michael@0: michael@0: michael@0: all : michael@0: define freetype [--.include] michael@0: define psaux [-.psaux] michael@0: define autofit [-.autofit] michael@0: define autohint [-.autohint] michael@0: define base [-.base] michael@0: define cache [-.cache] michael@0: define cff [-.cff] michael@0: define cid [-.cid] michael@0: define pcf [-.pcf] michael@0: define psnames [-.psnames] michael@0: define raster [-.raster] michael@0: define sfnt [-.sfnt] michael@0: define smooth [-.smooth] michael@0: define truetype [-.truetype] michael@0: define type1 [-.type1] michael@0: define winfonts [-.winfonts] michael@0: if f$search("lib.dir") .eqs. "" then create/directory [.lib] michael@0: set default [.builds.vms] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: # set default [--.src.autofit] michael@0: # $(MMS)$(MMSQUALIFIERS) michael@0: set default [--.src.autohint] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.base] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.bdf] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.cache] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.cff] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.cid] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.gzip] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.lzw] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.otvalid] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.pcf] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.pfr] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.psaux] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.pshinter] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.psnames] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.raster] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.sfnt] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.smooth] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.truetype] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.type1] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.type42] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [-.winfonts] michael@0: $(MMS)$(MMSQUALIFIERS) michael@0: set default [--] michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.builds.vms] directory" michael@0: $ create [.builds.vms]descrip.mms michael@0: $ open/append out [.builds.vms]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 system rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2001 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([],[--.include],[--.src.base]) michael@0: michael@0: OBJS=ftsystem.obj michael@0: michael@0: all : $(OBJS) michael@0: library/create [--.lib]freetype.olb $(OBJS) michael@0: michael@0: ftsystem.obj : ftsystem.c ftconfig.h michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.autofit] directory" michael@0: $ create [.src.autofit]descrip.mms michael@0: $ open/append out [.src.autofit]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 auto-fit module compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2002 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.autofit]) michael@0: michael@0: OBJS=afangles.obj,afhints.obj,aflatin.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.autohint] directory" michael@0: $ create [.src.autohint]descrip.mms michael@0: $ open/append out [.src.autohint]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 auto-hinter module compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2001, 2002 Catharon Productions Inc. michael@0: # michael@0: # This file is part of the Catharon Typography Project and shall only michael@0: # be used, modified, and distributed under the terms of the Catharon michael@0: # Open Source License that should come with this file under the name michael@0: # `CatharonLicense.txt'. By continuing to use, modify, or distribute michael@0: # this file you indicate that you have read the license and michael@0: # understand and accept it fully. michael@0: # michael@0: # Note that this license is compatible with the FreeType license. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/incl=([--.include],[--.src.autohint]) michael@0: michael@0: OBJS=autohint.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.base] directory" michael@0: $ create [.src.base]descrip.mms michael@0: $ open/append out [.src.base]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 base layer compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2001, 2003 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.builds.vms],[--.include],[--.src.base]) michael@0: michael@0: OBJS=ftbase.obj,ftinit.obj,ftglyph.obj,ftdebug.obj,ftbdf.obj,ftmm.obj,\ michael@0: fttype1.obj,ftxf86.obj,ftpfr.obj,ftstroke.obj,ftwinfnt.obj,ftbbox.obj,\ michael@0: ftbitmap.obj ftlcdfil.obj ftgasp.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.bdf] directory" michael@0: $ create [.src.bdf]descrip.mms michael@0: $ open/append out [.src.bdf]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 BDF driver compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2002 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.bdf]) michael@0: michael@0: OBJS=bdf.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.cache] directory" michael@0: $ create [.src.cache]descrip.mms michael@0: $ open/append out [.src.cache]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 Cache compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2001, 2002, 2003, 2004 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.cache]) michael@0: michael@0: OBJS=ftcache.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: ftcache.obj : ftcache.c ftcbasic.c ftccache.c ftccmap.c ftcglyph.c ftcimage.c \ michael@0: ftcmanag.c ftcmru.c ftcsbits.c michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.cff] directory" michael@0: $ create [.src.cff]descrip.mms michael@0: $ open/append out [.src.cff]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 OpenType/CFF driver compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2001, 2002 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.cff]) michael@0: michael@0: OBJS=cff.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.cid] directory" michael@0: $ create [.src.cid]descrip.mms michael@0: $ open/append out [.src.cid]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 CID driver compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2001 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.cid]) michael@0: michael@0: OBJS=type1cid.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.gzip] directory" michael@0: $ create [.src.gzip]descrip.mms michael@0: $ open/append out [.src.gzip]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 GZip support compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2002 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: $EOD michael@0: $ if libincs .nes. "" then write out "LIBINCS = ", libincs - ",", "," michael@0: $ write out "COMP_FLAGS = ", ccopt michael@0: $ copy sys$input: out michael@0: $ deck michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=($(LIBINCS)[--.include],[--.src.gzip]) michael@0: michael@0: OBJS=ftgzip.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.lzw] directory" michael@0: $ create [.src.lzw]descrip.mms michael@0: $ open/append out [.src.lzw]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 LZW support compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2004 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: $EOD michael@0: $ if libincs .nes. "" then write out "LIBINCS = ", libincs - ",", "," michael@0: $ write out "COMP_FLAGS = ", ccopt michael@0: $ copy sys$input: out michael@0: $ deck michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=($(LIBINCS)[--.include],[--.src.lzw]) michael@0: michael@0: OBJS=ftlzw.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.otlayout] directory" michael@0: $ create [.src.otlayout]descrip.mms michael@0: $ open/append out [.src.otlayout]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 OT layout compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2004 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.otlayout]) michael@0: michael@0: OBJS=otlbase.obj,otlcommn.obj,otlgdef.obj,otlgpos.obj,otlgsub.obj,\ michael@0: otljstf.obj,otlparse.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.otvalid] directory" michael@0: $ create [.src.otvalid]descrip.mms michael@0: $ open/append out [.src.otvalid]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 OpenType validation module compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2004 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.otvalid]) michael@0: michael@0: OBJS=otvalid.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.pcf] directory" michael@0: $ create [.src.pcf]descrip.mms michael@0: $ open/append out [.src.pcf]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 pcf driver compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright (C) 2001, 2002 by michael@0: # Francesco Zappa Nardelli michael@0: # michael@0: # Permission is hereby granted, free of charge, to any person obtaining a copy michael@0: # of this software and associated documentation files (the "Software"), to deal michael@0: # in the Software without restriction, including without limitation the rights michael@0: # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell michael@0: # copies of the Software, and to permit persons to whom the Software is michael@0: # furnished to do so, subject to the following conditions: michael@0: # michael@0: # The above copyright notice and this permission notice shall be included in michael@0: # all copies or substantial portions of the Software. michael@0: # michael@0: # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR michael@0: # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, michael@0: # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE michael@0: # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER michael@0: # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, michael@0: # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN michael@0: # THE SOFTWARE. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.pcf]) michael@0: michael@0: OBJS=pcf.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.pfr] directory" michael@0: $ create [.src.pfr]descrip.mms michael@0: $ open/append out [.src.pfr]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 PFR driver compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2002 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.pfr]) michael@0: michael@0: OBJS=pfr.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.psaux] directory" michael@0: $ create [.src.psaux]descrip.mms michael@0: $ open/append out [.src.psaux]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 PSaux driver compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2001, 2002 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.psaux]) michael@0: michael@0: OBJS=psaux.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.pshinter] directory" michael@0: $ create [.src.pshinter]descrip.mms michael@0: $ open/append out [.src.pshinter]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 PSHinter driver compilation rules for OpenVMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2001, 2002 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.psnames]) michael@0: michael@0: OBJS=pshinter.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.psnames] directory" michael@0: $ create [.src.psnames]descrip.mms michael@0: $ open/append out [.src.psnames]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 PSNames driver compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2001, 2002 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.psnames]) michael@0: michael@0: OBJS=psnames.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.raster] directory" michael@0: $ create [.src.raster]descrip.mms michael@0: $ open/append out [.src.raster]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 renderer module compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2001 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.raster]) michael@0: michael@0: OBJS=raster.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.sfnt] directory" michael@0: $ create [.src.sfnt]descrip.mms michael@0: $ open/append out [.src.sfnt]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 SFNT driver compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2001, 2002 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.sfnt]) michael@0: michael@0: OBJS=sfnt.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.smooth] directory" michael@0: $ create [.src.smooth]descrip.mms michael@0: $ open/append out [.src.smooth]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 smooth renderer module compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2001 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.smooth]) michael@0: michael@0: OBJS=smooth.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.truetype] directory" michael@0: $ create [.src.truetype]descrip.mms michael@0: $ open/append out [.src.truetype]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 TrueType driver compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2001, 2002 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.truetype]) michael@0: michael@0: OBJS=truetype.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.type1] directory" michael@0: $ create [.src.type1]descrip.mms michael@0: $ open/append out [.src.type1]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 Type1 driver compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 1996-2000, 2002 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.type1]) michael@0: michael@0: OBJS=type1.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: type1.obj : type1.c t1parse.c t1load.c t1objs.c t1driver.c t1gload.c t1afm.c michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.type42] directory" michael@0: $ create [.src.type42]descrip.mms michael@0: $ open/append out [.src.type42]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 Type 42 driver compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2002 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.type42]) michael@0: michael@0: OBJS=type42.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ write sys$output "... [.src.winfonts] directory" michael@0: $ create [.src.winfonts]descrip.mms michael@0: $ open/append out [.src.winfonts]descrip.mms michael@0: $ copy sys$input: out michael@0: $ deck michael@0: # michael@0: # FreeType 2 Windows FNT/FON driver compilation rules for VMS michael@0: # michael@0: michael@0: michael@0: # Copyright 2001, 2002 by michael@0: # David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: # michael@0: # This file is part of the FreeType project, and may only be used, modified, michael@0: # and distributed under the terms of the FreeType project license, michael@0: # LICENSE.TXT. By continuing to use, modify, or distribute this file you michael@0: # indicate that you have read the license and understand and accept it michael@0: # fully. michael@0: michael@0: michael@0: CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.winfonts]) michael@0: michael@0: OBJS=winfnt.obj michael@0: michael@0: all : $(OBJS) michael@0: library [--.lib]freetype.olb $(OBJS) michael@0: michael@0: # EOF michael@0: $ eod michael@0: $ close out michael@0: $ return michael@0: $!------------------------------------------------------------------------------ michael@0: $! michael@0: $! Check command line options and set symbols accordingly michael@0: $! michael@0: $ CHECK_OPTS: michael@0: $ i = 1 michael@0: $ OPT_LOOP: michael@0: $ if i .lt. 9 michael@0: $ then michael@0: $ cparm = f$edit(p'i',"upcase") michael@0: $ if cparm .eqs. "DEBUG" michael@0: $ then michael@0: $ ccopt = ccopt + "/noopt/deb" michael@0: $ lopts = lopts + "/deb" michael@0: $ endif michael@0: $ if f$locate("CCOPT=",cparm) .lt. f$length(cparm) michael@0: $ then michael@0: $ start = f$locate("=",cparm) + 1 michael@0: $ len = f$length(cparm) - start michael@0: $ ccopt = ccopt + f$extract(start,len,cparm) michael@0: $ endif michael@0: $ if cparm .eqs. "LINK" then linkonly = true michael@0: $ if f$locate("LOPTS=",cparm) .lt. f$length(cparm) michael@0: $ then michael@0: $ start = f$locate("=",cparm) + 1 michael@0: $ len = f$length(cparm) - start michael@0: $ lopts = lopts + f$extract(start,len,cparm) michael@0: $ endif michael@0: $ if f$locate("CC=",cparm) .lt. f$length(cparm) michael@0: $ then michael@0: $ start = f$locate("=",cparm) + 1 michael@0: $ len = f$length(cparm) - start michael@0: $ cc_com = f$extract(start,len,cparm) michael@0: if (cc_com .nes. "DECC") .and. - michael@0: (cc_com .nes. "VAXC") .and. - michael@0: (cc_com .nes. "GNUC") michael@0: $ then michael@0: $ write sys$output "Unsupported compiler choice ''cc_com' ignored" michael@0: $ write sys$output "Use DECC, VAXC, or GNUC instead" michael@0: $ else michael@0: $ if cc_com .eqs. "DECC" then its_decc = true michael@0: $ if cc_com .eqs. "VAXC" then its_vaxc = true michael@0: $ if cc_com .eqs. "GNUC" then its_gnuc = true michael@0: $ endif michael@0: $ endif michael@0: $ if f$locate("MAKE=",cparm) .lt. f$length(cparm) michael@0: $ then michael@0: $ start = f$locate("=",cparm) + 1 michael@0: $ len = f$length(cparm) - start michael@0: $ mmks = f$extract(start,len,cparm) michael@0: $ if (mmks .eqs. "MMK") .or. (mmks .eqs. "MMS") michael@0: $ then michael@0: $ make = mmks michael@0: $ else michael@0: $ write sys$output "Unsupported make choice ''mmks' ignored" michael@0: $ write sys$output "Use MMK or MMS instead" michael@0: $ endif michael@0: $ endif michael@0: $ i = i + 1 michael@0: $ goto opt_loop michael@0: $ endif michael@0: $ return michael@0: $!------------------------------------------------------------------------------ michael@0: $! michael@0: $! Take care of driver file with information about external libraries michael@0: $! michael@0: $! Version history michael@0: $! 0.01 20040220 First version to receive a number michael@0: $! 0.02 20040229 Echo current procedure name; use general error exit handler michael@0: $! Remove xpm hack -> Replaced by more general dnsrl handling michael@0: $CHECK_CREATE_VMSLIB: michael@0: $! michael@0: $ if f$search("VMSLIB.DAT") .eqs. "" michael@0: $ then michael@0: $ type/out=vmslib.dat sys$input michael@0: ! michael@0: ! This is a simple driver file with information used by vms_make.com to michael@0: ! check if external libraries (like t1lib and freetype) are available on michael@0: ! the system. michael@0: ! michael@0: ! Layout of the file: michael@0: ! michael@0: ! - Lines starting with ! are treated as comments michael@0: ! - Elements in a data line are separated by # signs michael@0: ! - The elements need to be listed in the following order michael@0: ! 1.) Name of the Library (only used for informative messages michael@0: ! from vms_make.com) michael@0: ! 2.) Location where the object library can be found michael@0: ! 3.) Location where the include files for the library can be found michael@0: ! 4.) Include file used to verify library location michael@0: ! 5.) CPP define to pass to the build to indicate availability of michael@0: ! the library michael@0: ! michael@0: ! Example: The following lines show how definitions michael@0: ! might look like. They are site specific and the locations of the michael@0: ! library and include files need almost certainly to be changed. michael@0: ! michael@0: ! Location: All of the libaries can be found at the following addresses michael@0: ! michael@0: ! ZLIB: http://zinser.no-ip.info/vms/sw/zlib.htmlx michael@0: ! michael@0: ZLIB # sys$library:libz.olb # sys$library: # zlib.h # FT_CONFIG_OPTION_SYSTEM_ZLIB michael@0: $ write sys$output "New driver file vmslib.dat created." michael@0: $ write sys$output "Please customize libary locations for your site" michael@0: $ write sys$output "and afterwards re-execute ''myproc'" michael@0: $ goto err_exit michael@0: $ endif michael@0: $! michael@0: $! Init symbols used to hold CPP definitions and include path michael@0: $! michael@0: $ libdefs = "" michael@0: $ libincs = "" michael@0: $! michael@0: $! Open data file with location of libraries michael@0: $! michael@0: $ open/read/end=end_lib/err=err_lib libdata VMSLIB.DAT michael@0: $LIB_LOOP: michael@0: $ read/end=end_lib libdata libline michael@0: $ libline = f$edit(libline, "UNCOMMENT,COLLAPSE") michael@0: $ if libline .eqs. "" then goto LIB_LOOP ! Comment line michael@0: $ libname = f$edit(f$element(0,"#",libline),"UPCASE") michael@0: $ write sys$output "Processing ''libname' setup ..." michael@0: $ libloc = f$element(1,"#",libline) michael@0: $ libsrc = f$element(2,"#",libline) michael@0: $ testinc = f$element(3,"#",libline) michael@0: $ cppdef = f$element(4,"#",libline) michael@0: $ old_cpp = f$locate("=1",cppdef) michael@0: $ if old_cpp.lt.f$length(cppdef) then cppdef = f$extract(0,old_cpp,cppdef) michael@0: $ if f$search("''libloc'").eqs. "" michael@0: $ then michael@0: $ write sys$output "Can not find library ''libloc' - Skipping ''libname'" michael@0: $ goto LIB_LOOP michael@0: $ endif michael@0: $ libsrc_elem = 0 michael@0: $ libsrc_found = false michael@0: $LIBSRC_LOOP: michael@0: $ libsrcdir = f$element(libsrc_elem,",",libsrc) michael@0: $ if (libsrcdir .eqs. ",") then goto END_LIBSRC michael@0: $ if f$search("''libsrcdir'''testinc'") .nes. "" then libsrc_found = true michael@0: $ libsrc_elem = libsrc_elem + 1 michael@0: $ goto LIBSRC_LOOP michael@0: $END_LIBSRC: michael@0: $ if .not. libsrc_found michael@0: $ then michael@0: $ write sys$output "Can not find includes at ''libsrc' - Skipping ''libname'" michael@0: $ goto LIB_LOOP michael@0: $ endif michael@0: $ if (cppdef .nes. "") then libdefs = libdefs + cppdef + "," michael@0: $ libincs = libincs + "," + libsrc michael@0: $ lqual = "/lib" michael@0: $ libtype = f$edit(f$parse(libloc,,,"TYPE"),"UPCASE") michael@0: $ if f$locate("EXE",libtype) .lt. f$length(libtype) then lqual = "/share" michael@0: $ write optf libloc , lqual michael@0: $ if (f$trnlnm("topt") .nes. "") then write topt libloc , lqual michael@0: $! michael@0: $! Nasty hack to get the freetype includes to work michael@0: $! michael@0: $ ft2def = false michael@0: $ if ((libname .eqs. "FREETYPE") .and. - michael@0: (f$locate("FREETYPE2",cppdef) .lt. f$length(cppdef))) michael@0: $ then michael@0: $ if ((f$search("freetype:freetype.h") .nes. "") .and. - michael@0: (f$search("freetype:[internal]ftobjs.h") .nes. "")) michael@0: $ then michael@0: $ write sys$output "Will use local definition of freetype logical" michael@0: $ else michael@0: $ ft2elem = 0 michael@0: $FT2_LOOP: michael@0: $ ft2srcdir = f$element(ft2elem,",",libsrc) michael@0: $ if f$search("''ft2srcdir'''testinc'") .nes. "" michael@0: $ then michael@0: $ if f$search("''ft2srcdir'internal.dir") .nes. "" michael@0: $ then michael@0: $ ft2dev = f$parse("''ft2srcdir'",,,"device","no_conceal") michael@0: $ ft2dir = f$parse("''ft2srcdir'",,,"directory","no_conceal") michael@0: $ ft2conc = f$locate("][",ft2dir) michael@0: $ ft2len = f$length(ft2dir) michael@0: $ if ft2conc .lt. ft2len michael@0: $ then michael@0: $ ft2dir = f$extract(0,ft2conc,ft2dir) + - michael@0: f$extract(ft2conc+2,ft2len-2,ft2dir) michael@0: $ endif michael@0: $ ft2dir = ft2dir - "]" + ".]" michael@0: $ define freetype 'ft2dev''ft2dir','ft2srcdir' michael@0: $ ft2def = true michael@0: $ else michael@0: $ goto ft2_err michael@0: $ endif michael@0: $ else michael@0: $ ft2elem = ft2elem + 1 michael@0: $ goto ft2_loop michael@0: $ endif michael@0: $ endif michael@0: $ endif michael@0: $ goto LIB_LOOP michael@0: $END_LIB: michael@0: $ close libdata michael@0: $ return michael@0: $!------------------------------------------------------------------------------ michael@0: $! michael@0: $! Analyze Object files for OpenVMS AXP to extract Procedure and Data michael@0: $! information to build a symbol vector for a shareable image michael@0: $! All the "brains" of this logic was suggested by Hartmut Becker michael@0: $! (Hartmut.Becker@compaq.com). All the bugs were introduced by me michael@0: $! (zinser@decus.de), so if you do have problem reports please do not michael@0: $! bother Hartmut/HP, but get in touch with me michael@0: $! michael@0: $! Version history michael@0: $! 0.01 20040006 Skip over shareable images in option file michael@0: $! michael@0: $ ANAL_OBJ_AXP: Subroutine michael@0: $ V = 'F$Verify(0) michael@0: $ SAY := "WRITE_ SYS$OUTPUT" michael@0: $ michael@0: $ IF F$SEARCH("''P1'") .EQS. "" michael@0: $ THEN michael@0: $ SAY "ANAL_OBJ_AXP-E-NOSUCHFILE: Error, inputfile ''p1' not available" michael@0: $ goto exit_aa michael@0: $ ENDIF michael@0: $ IF "''P2'" .EQS. "" michael@0: $ THEN michael@0: $ SAY "ANAL_OBJ_AXP: Error, no output file provided" michael@0: $ goto exit_aa michael@0: $ ENDIF michael@0: $ michael@0: $ open/read in 'p1 michael@0: $ create a.tmp michael@0: $ open/append atmp a.tmp michael@0: $ loop: michael@0: $ read/end=end_loop in line michael@0: $ if f$locate("/SHARE",f$edit(line,"upcase")) .lt. f$length(line) michael@0: $ then michael@0: $ write sys$output "ANAL_SKP_SHR-i-skipshare, ''line'" michael@0: $ goto loop michael@0: $ endif michael@0: $ if f$locate("/LIB",f$edit(line,"upcase")) .lt. f$length(line) michael@0: $ then michael@0: $ write libsf line michael@0: $ write sys$output "ANAL_SKP_LIB-i-skiplib, ''line'" michael@0: $ goto loop michael@0: $ endif michael@0: $ f= f$search(line) michael@0: $ if f .eqs. "" michael@0: $ then michael@0: $ write sys$output "ANAL_OBJ_AXP-w-nosuchfile, ''line'" michael@0: $ goto loop michael@0: $ endif michael@0: $ def/user sys$output nl: michael@0: $ def/user sys$error nl: michael@0: $ anal/obj/gsd 'f /out=x.tmp michael@0: $ open/read xtmp x.tmp michael@0: $ XLOOP: michael@0: $ read/end=end_xloop xtmp xline michael@0: $ xline = f$edit(xline,"compress") michael@0: $ write atmp xline michael@0: $ goto xloop michael@0: $ END_XLOOP: michael@0: $ close xtmp michael@0: $ goto loop michael@0: $ end_loop: michael@0: $ close in michael@0: $ close atmp michael@0: $ if f$search("a.tmp") .eqs. "" - michael@0: then $ exit michael@0: $ ! all global definitions michael@0: $ search a.tmp "symbol:","EGSY$V_DEF 1","EGSY$V_NORM 1"/out=b.tmp michael@0: $ ! all procedures michael@0: $ search b.tmp "EGSY$V_NORM 1"/wind=(0,1) /out=c.tmp michael@0: $ search c.tmp "symbol:"/out=d.tmp michael@0: $ def/user sys$output nl: michael@0: $ edito/edt/command=sys$input d.tmp michael@0: sub/symbol: "/symbol_vector=(/whole michael@0: sub/"/=PROCEDURE)/whole michael@0: exit michael@0: $ ! all data michael@0: $ search b.tmp "EGSY$V_DEF 1"/wind=(0,1) /out=e.tmp michael@0: $ search e.tmp "symbol:"/out=f.tmp michael@0: $ def/user sys$output nl: michael@0: $ edito/edt/command=sys$input f.tmp michael@0: sub/symbol: "/symbol_vector=(/whole michael@0: sub/"/=DATA)/whole michael@0: exit michael@0: $ sort/nodupl d.tmp,f.tmp 'p2' michael@0: $ delete a.tmp;*,b.tmp;*,c.tmp;*,d.tmp;*,e.tmp;*,f.tmp;* michael@0: $ if f$search("x.tmp") .nes. "" - michael@0: then $ delete x.tmp;* michael@0: $! michael@0: $ close libsf michael@0: $ EXIT_AA: michael@0: $ if V then set verify michael@0: $ endsubroutine