blob: 1aa83e7e30408d91a09a26239e978231ac14604c [file] [log] [blame]
Werner Lemberg282637f2003-05-21 07:39:42 +00001$! make Freetype2 under OpenVMS
2$!
Werner Lemberg53935932007-01-31 08:53:02 +00003$! Copyright 2003, 2004, 2006, 2007 by
Werner Lemberg60a04df2005-06-04 23:04:30 +00004$! David Turner, Robert Wilhelm, and Werner Lemberg.
5$!
6$! This file is part of the FreeType project, and may only be used, modified,
7$! and distributed under the terms of the FreeType project license,
8$! LICENSE.TXT. By continuing to use, modify, or distribute this file you
9$! indicate that you have read the license and understand and accept it
10$! fully.
11$!
12$!
Werner Lembergbbdee282004-11-17 08:19:27 +000013$! External libraries (like Freetype, XPM, etc.) are supported via the
14$! config file VMSLIB.DAT. Please check the sample file, which is part of this
15$! distribution, for the information you need to provide
Werner Lemberg282637f2003-05-21 07:39:42 +000016$!
17$! This procedure currently does support the following commandline options
David Turner26bb2e22006-09-27 07:58:43 +000018$! in arbitrary order
Werner Lemberg282637f2003-05-21 07:39:42 +000019$!
David Turner26bb2e22006-09-27 07:58:43 +000020$! * DEBUG - Compile modules with /noopt/debug and link shareable image
Werner Lemberg282637f2003-05-21 07:39:42 +000021$! with /debug
22$! * LOPTS - Options to be passed to the link command
23$! * CCOPT - Options to be passed to the C compiler
Werner Lemberg282637f2003-05-21 07:39:42 +000024$!
Werner Lembergbbdee282004-11-17 08:19:27 +000025$! In case of problems with the install you might contact me at
David Turner26bb2e22006-09-27 07:58:43 +000026$! zinser@zinser.no-ip.info(preferred) or
Werner Lembergbbdee282004-11-17 08:19:27 +000027$! zinser@sysdev.deutsche-boerse.com (work)
28$!
29$! Make procedure history for Freetype2
David Turner26bb2e22006-09-27 07:58:43 +000030$!
Werner Lembergbbdee282004-11-17 08:19:27 +000031$!------------------------------------------------------------------------------
32$! Version history
33$! 0.01 20040401 First version to receive a number
34$! 0.02 20041030 Add error handling, Freetype 2.1.9
David Turner26bb2e22006-09-27 07:58:43 +000035$!
Werner Lembergbbdee282004-11-17 08:19:27 +000036$ on error then goto err_exit
37$ true = 1
38$ false = 0
39$ tmpnam = "temp_" + f$getjpi("","pid")
40$ tt = tmpnam + ".txt"
41$ tc = tmpnam + ".c"
42$ th = tmpnam + ".h"
43$ its_decc = false
44$ its_vaxc = false
45$ its_gnuc = false
Werner Lemberg282637f2003-05-21 07:39:42 +000046$!
47$! Setup variables holding "config" information
48$!
Werner Lembergbbdee282004-11-17 08:19:27 +000049$ Make = ""
Werner Lemberg71e5a592004-11-27 08:18:10 +000050$ ccopt = "/name=as_is/float=ieee"
Werner Lembergbbdee282004-11-17 08:19:27 +000051$ lopts = ""
52$ dnsrl = ""
53$ aconf_in_file = "config.hin"
Werner Lemberg282637f2003-05-21 07:39:42 +000054$ name = "Freetype2"
55$ mapfile = name + ".map"
56$ optfile = name + ".opt"
57$ s_case = false
Werner Lemberg282637f2003-05-21 07:39:42 +000058$ liblist = ""
Werner Lembergbbdee282004-11-17 08:19:27 +000059$!
Werner Lembergfe334082007-02-12 14:35:15 +000060$ whoami = f$parse(f$environment("Procedure"),,,,"NO_CONCEAL")
Werner Lembergbbdee282004-11-17 08:19:27 +000061$ mydef = F$parse(whoami,,,"DEVICE")
62$ mydir = f$parse(whoami,,,"DIRECTORY") - "]["
63$ myproc = f$parse(whoami,,,"Name") + f$parse(whoami,,,"type")
Werner Lemberg282637f2003-05-21 07:39:42 +000064$!
65$! Check for MMK/MMS
66$!
67$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
68$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
69$!
70$! Which command parameters were given
71$!
72$ gosub check_opts
73$!
74$! Create option file
75$!
76$ open/write optf 'optfile'
77$!
78$! Pull in external libraries
79$!
Werner Lemberg26fb1bc2003-05-28 06:27:26 +000080$ create libs.opt
Werner Lemberg71e5a592004-11-27 08:18:10 +000081$ open/write libsf libs.opt
Werner Lemberg282637f2003-05-21 07:39:42 +000082$ gosub check_create_vmslib
83$!
84$! Create objects
85$!
David Turner26bb2e22006-09-27 07:58:43 +000086$ if libdefs .nes. ""
87$ then
Werner Lembergbbdee282004-11-17 08:19:27 +000088$ ccopt = ccopt + "/define=(" + f$extract(0,f$length(libdefs)-1,libdefs) + ")"
89$ endif
Werner Lemberg282637f2003-05-21 07:39:42 +000090$!
David Turner26bb2e22006-09-27 07:58:43 +000091$ if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) -
Werner Lemberg282637f2003-05-21 07:39:42 +000092 then s_case = true
93$ gosub crea_mms
94$!
95$ 'Make' /macro=(comp_flags="''ccopt'")
Werner Lemberg282637f2003-05-21 07:39:42 +000096$ purge/nolog [...]descrip.mms
97$!
98$! Add them to options
99$!
100$FLOOP:
101$ file = f$edit(f$search("[...]*.obj"),"UPCASE")
102$ if (file .nes. "")
103$ then
104$ if f$locate("DEMOS",file) .eqs. f$length(file) then write optf file
105$ goto floop
David Turner26bb2e22006-09-27 07:58:43 +0000106$ endif
Werner Lemberg282637f2003-05-21 07:39:42 +0000107$!
Werner Lemberg282637f2003-05-21 07:39:42 +0000108$ close optf
109$!
110$!
111$! Alpha gets a shareable image
112$!
113$ If f$getsyi("HW_MODEL") .gt. 1024
114$ Then
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000115$ write sys$output "Creating freetype2shr.exe"
116$ call anal_obj_axp 'optfile' _link.opt
117$ open/append optf 'optfile'
118$ if s_case then WRITE optf "case_sensitive=YES"
119$ close optf
David Turner26bb2e22006-09-27 07:58:43 +0000120$ LINK_/NODEB/SHARE=[.lib]freetype2shr.exe -
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000121 'optfile'/opt,libs.opt/opt,_link.opt/opt
Werner Lemberg282637f2003-05-21 07:39:42 +0000122$ endif
123$!
124$ exit
125$!
Werner Lembergbbdee282004-11-17 08:19:27 +0000126$
127$ERR_LIB:
128$ write sys$output "Error reading config file vmslib.dat"
129$ goto err_exit
130$FT2_ERR:
131$ write sys$output "Could not locate Freetype 2 include files"
132$ goto err_exit
133$ERR_EXIT:
134$ set message/facil/ident/sever/text
135$ close/nolog optf
136$ close/nolog out
137$ close/nolog libdata
138$ close/nolog in
139$ close/nolog atmp
140$ close/nolog xtmp
141$ write sys$output "Exiting..."
142$ exit 2
143$!
Werner Lemberg282637f2003-05-21 07:39:42 +0000144$!------------------------------------------------------------------------------
145$!
David Turner26bb2e22006-09-27 07:58:43 +0000146$! If MMS/MMK are available dump out the descrip.mms if required
Werner Lemberg282637f2003-05-21 07:39:42 +0000147$!
148$CREA_MMS:
149$ write sys$output "Creating descrip.mms files ..."
150$ write sys$output "... Main directory"
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000151$ create descrip.mms
152$ open/append out descrip.mms
153$ copy sys$input: out
Werner Lemberg282637f2003-05-21 07:39:42 +0000154$ deck
155#
156# FreeType 2 build system -- top-level Makefile for OpenVMS
157#
158
159
160# Copyright 2001 by
161# David Turner, Robert Wilhelm, and Werner Lemberg.
162#
163# This file is part of the FreeType project, and may only be used, modified,
164# and distributed under the terms of the FreeType project license,
165# LICENSE.TXT. By continuing to use, modify, or distribute this file you
166# indicate that you have read the license and understand and accept it
167# fully.
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000168$ EOD
169$ write out "CFLAGS = ", ccopt
170$ copy sys$input: out
171$ deck
David Turner26bb2e22006-09-27 07:58:43 +0000172
Werner Lemberg282637f2003-05-21 07:39:42 +0000173
174all :
David Turner26bb2e22006-09-27 07:58:43 +0000175 define freetype [--.include.freetype]
176 define psaux [-.psaux]
177 define autofit [-.autofit]
178 define autohint [-.autohint]
179 define base [-.base]
180 define cache [-.cache]
181 define cff [-.cff]
182 define cid [-.cid]
183 define pcf [-.pcf]
184 define psnames [-.psnames]
185 define raster [-.raster]
186 define sfnt [-.sfnt]
187 define smooth [-.smooth]
188 define truetype [-.truetype]
189 define type1 [-.type1]
190 define winfonts [-.winfonts]
Werner Lemberg282637f2003-05-21 07:39:42 +0000191 if f$search("lib.dir") .eqs. "" then create/directory [.lib]
192 set default [.builds.vms]
193 $(MMS)$(MMSQUALIFIERS)
Werner Lembergbbdee282004-11-17 08:19:27 +0000194# set default [--.src.autofit]
195# $(MMS)$(MMSQUALIFIERS)
Werner Lemberg282637f2003-05-21 07:39:42 +0000196 set default [--.src.autohint]
197 $(MMS)$(MMSQUALIFIERS)
198 set default [-.base]
199 $(MMS)$(MMSQUALIFIERS)
200 set default [-.bdf]
201 $(MMS)$(MMSQUALIFIERS)
202 set default [-.cache]
203 $(MMS)$(MMSQUALIFIERS)
204 set default [-.cff]
205 $(MMS)$(MMSQUALIFIERS)
206 set default [-.cid]
207 $(MMS)$(MMSQUALIFIERS)
208 set default [-.gzip]
209 $(MMS)$(MMSQUALIFIERS)
Werner Lembergdfa46192004-03-05 09:26:24 +0000210 set default [-.lzw]
211 $(MMS)$(MMSQUALIFIERS)
Werner Lemberg71e5a592004-11-27 08:18:10 +0000212 set default [-.otvalid]
213 $(MMS)$(MMSQUALIFIERS)
Werner Lemberg282637f2003-05-21 07:39:42 +0000214 set default [-.pcf]
215 $(MMS)$(MMSQUALIFIERS)
216 set default [-.pfr]
217 $(MMS)$(MMSQUALIFIERS)
218 set default [-.psaux]
219 $(MMS)$(MMSQUALIFIERS)
220 set default [-.pshinter]
221 $(MMS)$(MMSQUALIFIERS)
222 set default [-.psnames]
223 $(MMS)$(MMSQUALIFIERS)
224 set default [-.raster]
225 $(MMS)$(MMSQUALIFIERS)
226 set default [-.sfnt]
227 $(MMS)$(MMSQUALIFIERS)
228 set default [-.smooth]
229 $(MMS)$(MMSQUALIFIERS)
230 set default [-.truetype]
231 $(MMS)$(MMSQUALIFIERS)
232 set default [-.type1]
233 $(MMS)$(MMSQUALIFIERS)
234 set default [-.type42]
235 $(MMS)$(MMSQUALIFIERS)
236 set default [-.winfonts]
237 $(MMS)$(MMSQUALIFIERS)
238 set default [--]
239
240# EOF
241$ eod
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000242$ close out
243$ write sys$output "... [.builds.vms] directory"
244$ create [.builds.vms]descrip.mms
245$ open/append out [.builds.vms]descrip.mms
246$ copy sys$input: out
247$ deck
248#
249# FreeType 2 system rules for VMS
250#
251
252
253# Copyright 2001 by
254# David Turner, Robert Wilhelm, and Werner Lemberg.
255#
256# This file is part of the FreeType project, and may only be used, modified,
257# and distributed under the terms of the FreeType project license,
258# LICENSE.TXT. By continuing to use, modify, or distribute this file you
259# indicate that you have read the license and understand and accept it
260# fully.
261
262
263CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([],[--.include],[--.src.base])
264
265OBJS=ftsystem.obj
266
267all : $(OBJS)
268 library/create [--.lib]freetype.olb $(OBJS)
269
270ftsystem.obj : ftsystem.c ftconfig.h
271
272# EOF
273$ eod
274$ close out
Werner Lembergbbdee282004-11-17 08:19:27 +0000275$ write sys$output "... [.src.autofit] directory"
276$ create [.src.autofit]descrip.mms
277$ open/append out [.src.autofit]descrip.mms
278$ copy sys$input: out
279$ deck
280#
281# FreeType 2 auto-fit module compilation rules for VMS
282#
283
284
285# Copyright 2002 by
286# David Turner, Robert Wilhelm, and Werner Lemberg.
287#
288# This file is part of the FreeType project, and may only be used, modified,
289# and distributed under the terms of the FreeType project license,
290# LICENSE.TXT. By continuing to use, modify, or distribute this file you
291# indicate that you have read the license and understand and accept it
292# fully.
293
294CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.autofit])
295
296OBJS=afangles.obj,afhints.obj,aflatin.obj
297
298all : $(OBJS)
299 library [--.lib]freetype.olb $(OBJS)
300
301# EOF
302$ eod
303$ close out
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000304$ write sys$output "... [.src.autohint] directory"
305$ create [.src.autohint]descrip.mms
306$ open/append out [.src.autohint]descrip.mms
307$ copy sys$input: out
308$ deck
309#
310# FreeType 2 auto-hinter module compilation rules for VMS
311#
312
313
314# Copyright 2001, 2002 Catharon Productions Inc.
315#
316# This file is part of the Catharon Typography Project and shall only
317# be used, modified, and distributed under the terms of the Catharon
318# Open Source License that should come with this file under the name
319# `CatharonLicense.txt'. By continuing to use, modify, or distribute
320# this file you indicate that you have read the license and
321# understand and accept it fully.
322#
323# Note that this license is compatible with the FreeType license.
324
325
326CFLAGS=$(COMP_FLAGS)$(DEBUG)/incl=([--.include],[--.src.autohint])
327
328OBJS=autohint.obj
329
330all : $(OBJS)
331 library [--.lib]freetype.olb $(OBJS)
332
333# EOF
334$ eod
335$ close out
Werner Lembergbbdee282004-11-17 08:19:27 +0000336$ write sys$output "... [.src.base] directory"
337$ create [.src.base]descrip.mms
338$ open/append out [.src.base]descrip.mms
339$ copy sys$input: out
340$ deck
341#
342# FreeType 2 base layer compilation rules for VMS
343#
344
345
346# Copyright 2001, 2003 by
347# David Turner, Robert Wilhelm, and Werner Lemberg.
348#
349# This file is part of the FreeType project, and may only be used, modified,
350# and distributed under the terms of the FreeType project license,
351# LICENSE.TXT. By continuing to use, modify, or distribute this file you
352# indicate that you have read the license and understand and accept it
353# fully.
354
355
356CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.builds.vms],[--.include],[--.src.base])
357
358OBJS=ftbase.obj,ftinit.obj,ftglyph.obj,ftdebug.obj,ftbdf.obj,ftmm.obj,\
Werner Lembergb88624f2004-12-15 06:37:03 +0000359 fttype1.obj,ftxf86.obj,ftpfr.obj,ftstroke.obj,ftwinfnt.obj,ftbbox.obj,\
Werner Lemberg53935932007-01-31 08:53:02 +0000360 ftbitmap.obj ftlcdfil.obj ftgasp.obj
Werner Lembergbbdee282004-11-17 08:19:27 +0000361
362all : $(OBJS)
363 library [--.lib]freetype.olb $(OBJS)
364
365# EOF
366$ eod
367$ close out
368$ write sys$output "... [.src.bdf] directory"
369$ create [.src.bdf]descrip.mms
370$ open/append out [.src.bdf]descrip.mms
371$ copy sys$input: out
372$ deck
373#
374# FreeType 2 BDF driver compilation rules for VMS
375#
376
377
378# Copyright 2002 by
379# David Turner, Robert Wilhelm, and Werner Lemberg.
380#
381# This file is part of the FreeType project, and may only be used, modified,
382# and distributed under the terms of the FreeType project license,
383# LICENSE.TXT. By continuing to use, modify, or distribute this file you
384# indicate that you have read the license and understand and accept it
385# fully.
386
387
388CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.bdf])
389
390OBJS=bdf.obj
391
392all : $(OBJS)
393 library [--.lib]freetype.olb $(OBJS)
394
395# EOF
396$ eod
397$ close out
398$ write sys$output "... [.src.cache] directory"
399$ create [.src.cache]descrip.mms
400$ open/append out [.src.cache]descrip.mms
401$ copy sys$input: out
402$ deck
403#
404# FreeType 2 Cache compilation rules for VMS
405#
406
407
408# Copyright 2001, 2002, 2003, 2004 by
409# David Turner, Robert Wilhelm, and Werner Lemberg.
410#
411# This file is part of the FreeType project, and may only be used, modified,
412# and distributed under the terms of the FreeType project license,
413# LICENSE.TXT. By continuing to use, modify, or distribute this file you
414# indicate that you have read the license and understand and accept it
415# fully.
416
417
418CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.cache])
419
420OBJS=ftcache.obj
421
422all : $(OBJS)
423 library [--.lib]freetype.olb $(OBJS)
424
425ftcache.obj : ftcache.c ftcbasic.c ftccache.c ftccmap.c ftcglyph.c ftcimage.c \
David Turner26bb2e22006-09-27 07:58:43 +0000426 ftcmanag.c ftcmru.c ftcsbits.c
Werner Lembergbbdee282004-11-17 08:19:27 +0000427
428# EOF
429$ eod
430$ close out
431$ write sys$output "... [.src.cff] directory"
432$ create [.src.cff]descrip.mms
433$ open/append out [.src.cff]descrip.mms
434$ copy sys$input: out
435$ deck
436#
437# FreeType 2 OpenType/CFF driver compilation rules for VMS
438#
439
440
441# Copyright 2001, 2002 by
442# David Turner, Robert Wilhelm, and Werner Lemberg.
443#
444# This file is part of the FreeType project, and may only be used, modified,
445# and distributed under the terms of the FreeType project license,
446# LICENSE.TXT. By continuing to use, modify, or distribute this file you
447# indicate that you have read the license and understand and accept it
448# fully.
449
450
451CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.cff])
452
453OBJS=cff.obj
454
455all : $(OBJS)
456 library [--.lib]freetype.olb $(OBJS)
457
458# EOF
459$ eod
460$ close out
461$ write sys$output "... [.src.cid] directory"
462$ create [.src.cid]descrip.mms
463$ open/append out [.src.cid]descrip.mms
464$ copy sys$input: out
465$ deck
466#
467# FreeType 2 CID driver compilation rules for VMS
468#
469
470
471# Copyright 2001 by
472# David Turner, Robert Wilhelm, and Werner Lemberg.
473#
474# This file is part of the FreeType project, and may only be used, modified,
475# and distributed under the terms of the FreeType project license,
476# LICENSE.TXT. By continuing to use, modify, or distribute this file you
477# indicate that you have read the license and understand and accept it
478# fully.
479
480
481CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.cid])
482
483OBJS=type1cid.obj
484
485all : $(OBJS)
486 library [--.lib]freetype.olb $(OBJS)
487
488# EOF
489$ eod
490$ close out
Werner Lemberg282637f2003-05-21 07:39:42 +0000491$ write sys$output "... [.src.gzip] directory"
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000492$ create [.src.gzip]descrip.mms
493$ open/append out [.src.gzip]descrip.mms
494$ copy sys$input: out
Werner Lemberg282637f2003-05-21 07:39:42 +0000495$ deck
496#
497# FreeType 2 GZip support compilation rules for VMS
498#
499
500
501# Copyright 2002 by
502# David Turner, Robert Wilhelm, and Werner Lemberg.
503#
504# This file is part of the FreeType project, and may only be used, modified,
505# and distributed under the terms of the FreeType project license,
506# LICENSE.TXT. By continuing to use, modify, or distribute this file you
507# indicate that you have read the license and understand and accept it
508# fully.
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000509$EOD
Werner Lembergbbdee282004-11-17 08:19:27 +0000510$ if libincs .nes. "" then write out "LIBINCS = ", libincs - ",", ","
511$ write out "COMP_FLAGS = ", ccopt
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000512$ copy sys$input: out
513$ deck
Werner Lemberg282637f2003-05-21 07:39:42 +0000514
515CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=($(LIBINCS)[--.include],[--.src.gzip])
516
517OBJS=ftgzip.obj
518
519all : $(OBJS)
520 library [--.lib]freetype.olb $(OBJS)
521
522# EOF
523$ eod
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000524$ close out
Werner Lembergdfa46192004-03-05 09:26:24 +0000525$ write sys$output "... [.src.lzw] directory"
526$ create [.src.lzw]descrip.mms
527$ open/append out [.src.lzw]descrip.mms
528$ copy sys$input: out
529$ deck
530#
531# FreeType 2 LZW support compilation rules for VMS
532#
533
534
535# Copyright 2004 by
536# David Turner, Robert Wilhelm, and Werner Lemberg.
537#
538# This file is part of the FreeType project, and may only be used, modified,
539# and distributed under the terms of the FreeType project license,
540# LICENSE.TXT. By continuing to use, modify, or distribute this file you
541# indicate that you have read the license and understand and accept it
542# fully.
543$EOD
Werner Lembergbbdee282004-11-17 08:19:27 +0000544$ if libincs .nes. "" then write out "LIBINCS = ", libincs - ",", ","
545$ write out "COMP_FLAGS = ", ccopt
Werner Lembergdfa46192004-03-05 09:26:24 +0000546$ copy sys$input: out
547$ deck
548
549CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=($(LIBINCS)[--.include],[--.src.lzw])
550
551OBJS=ftlzw.obj
552
553all : $(OBJS)
554 library [--.lib]freetype.olb $(OBJS)
555
556# EOF
557$ eod
558$ close out
Werner Lembergbbdee282004-11-17 08:19:27 +0000559$ write sys$output "... [.src.otlayout] directory"
560$ create [.src.otlayout]descrip.mms
561$ open/append out [.src.otlayout]descrip.mms
562$ copy sys$input: out
563$ deck
564#
565# FreeType 2 OT layout compilation rules for VMS
566#
567
568
569# Copyright 2004 by
570# David Turner, Robert Wilhelm, and Werner Lemberg.
571#
572# This file is part of the FreeType project, and may only be used, modified,
573# and distributed under the terms of the FreeType project license,
574# LICENSE.TXT. By continuing to use, modify, or distribute this file you
575# indicate that you have read the license and understand and accept it
576# fully.
577
578
579CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.otlayout])
580
581OBJS=otlbase.obj,otlcommn.obj,otlgdef.obj,otlgpos.obj,otlgsub.obj,\
582 otljstf.obj,otlparse.obj
583
584all : $(OBJS)
585 library [--.lib]freetype.olb $(OBJS)
586
587
588# EOF
589$ eod
590$ close out
Werner Lemberg71e5a592004-11-27 08:18:10 +0000591$ write sys$output "... [.src.otvalid] directory"
592$ create [.src.otvalid]descrip.mms
593$ open/append out [.src.otvalid]descrip.mms
594$ copy sys$input: out
595$ deck
596#
597# FreeType 2 OpenType validation module compilation rules for VMS
598#
599
600
601# Copyright 2004 by
602# David Turner, Robert Wilhelm, and Werner Lemberg.
603#
604# This file is part of the FreeType project, and may only be used, modified,
605# and distributed under the terms of the FreeType project license,
606# LICENSE.TXT. By continuing to use, modify, or distribute this file you
607# indicate that you have read the license and understand and accept it
608# fully.
609
610
611CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.otvalid])
612
613OBJS=otvalid.obj
614
615all : $(OBJS)
616 library [--.lib]freetype.olb $(OBJS)
617
618# EOF
619$ eod
620$ close out
Werner Lembergbbdee282004-11-17 08:19:27 +0000621$ write sys$output "... [.src.pcf] directory"
622$ create [.src.pcf]descrip.mms
623$ open/append out [.src.pcf]descrip.mms
624$ copy sys$input: out
625$ deck
626#
627# FreeType 2 pcf driver compilation rules for VMS
628#
629
630
631# Copyright (C) 2001, 2002 by
632# Francesco Zappa Nardelli
633#
634# Permission is hereby granted, free of charge, to any person obtaining a copy
635# of this software and associated documentation files (the "Software"), to deal
636# in the Software without restriction, including without limitation the rights
637# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
638# copies of the Software, and to permit persons to whom the Software is
639# furnished to do so, subject to the following conditions:
640#
641# The above copyright notice and this permission notice shall be included in
642# all copies or substantial portions of the Software.
643#
644# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
645# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
646# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
647# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
648# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
649# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
650# THE SOFTWARE.
651
652
653CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.pcf])
654
655OBJS=pcf.obj
656
657all : $(OBJS)
658 library [--.lib]freetype.olb $(OBJS)
659
660# EOF
661$ eod
662$ close out
663$ write sys$output "... [.src.pfr] directory"
664$ create [.src.pfr]descrip.mms
665$ open/append out [.src.pfr]descrip.mms
666$ copy sys$input: out
667$ deck
668#
669# FreeType 2 PFR driver compilation rules for VMS
670#
671
672
673# Copyright 2002 by
674# David Turner, Robert Wilhelm, and Werner Lemberg.
675#
676# This file is part of the FreeType project, and may only be used, modified,
677# and distributed under the terms of the FreeType project license,
678# LICENSE.TXT. By continuing to use, modify, or distribute this file you
679# indicate that you have read the license and understand and accept it
680# fully.
681
682
683CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.pfr])
684
685OBJS=pfr.obj
686
687all : $(OBJS)
688 library [--.lib]freetype.olb $(OBJS)
689
690# EOF
691$ eod
692$ close out
693$ write sys$output "... [.src.psaux] directory"
694$ create [.src.psaux]descrip.mms
695$ open/append out [.src.psaux]descrip.mms
696$ copy sys$input: out
697$ deck
698#
699# FreeType 2 PSaux driver compilation rules for VMS
700#
701
702
703# Copyright 2001, 2002 by
704# David Turner, Robert Wilhelm, and Werner Lemberg.
705#
706# This file is part of the FreeType project, and may only be used, modified,
707# and distributed under the terms of the FreeType project license,
708# LICENSE.TXT. By continuing to use, modify, or distribute this file you
709# indicate that you have read the license and understand and accept it
710# fully.
711
712
713CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.psaux])
714
715OBJS=psaux.obj
716
717all : $(OBJS)
718 library [--.lib]freetype.olb $(OBJS)
719
720# EOF
721$ eod
722$ close out
723$ write sys$output "... [.src.pshinter] directory"
724$ create [.src.pshinter]descrip.mms
725$ open/append out [.src.pshinter]descrip.mms
726$ copy sys$input: out
727$ deck
728#
729# FreeType 2 PSHinter driver compilation rules for OpenVMS
730#
731
732
733# Copyright 2001, 2002 by
734# David Turner, Robert Wilhelm, and Werner Lemberg.
735#
736# This file is part of the FreeType project, and may only be used, modified,
737# and distributed under the terms of the FreeType project license,
738# LICENSE.TXT. By continuing to use, modify, or distribute this file you
739# indicate that you have read the license and understand and accept it
740# fully.
741
742
743CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.psnames])
744
745OBJS=pshinter.obj
746
747all : $(OBJS)
748 library [--.lib]freetype.olb $(OBJS)
749
750# EOF
751$ eod
752$ close out
753$ write sys$output "... [.src.psnames] directory"
754$ create [.src.psnames]descrip.mms
755$ open/append out [.src.psnames]descrip.mms
756$ copy sys$input: out
757$ deck
758#
759# FreeType 2 PSNames driver compilation rules for VMS
760#
761
762
763# Copyright 2001, 2002 by
764# David Turner, Robert Wilhelm, and Werner Lemberg.
765#
766# This file is part of the FreeType project, and may only be used, modified,
767# and distributed under the terms of the FreeType project license,
768# LICENSE.TXT. By continuing to use, modify, or distribute this file you
769# indicate that you have read the license and understand and accept it
770# fully.
771
772
773CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.psnames])
774
775OBJS=psnames.obj
776
777all : $(OBJS)
778 library [--.lib]freetype.olb $(OBJS)
779
780# EOF
781$ eod
782$ close out
783$ write sys$output "... [.src.raster] directory"
784$ create [.src.raster]descrip.mms
785$ open/append out [.src.raster]descrip.mms
786$ copy sys$input: out
787$ deck
788#
789# FreeType 2 renderer module compilation rules for VMS
790#
791
792
793# Copyright 2001 by
794# David Turner, Robert Wilhelm, and Werner Lemberg.
795#
796# This file is part of the FreeType project, and may only be used, modified,
797# and distributed under the terms of the FreeType project license,
798# LICENSE.TXT. By continuing to use, modify, or distribute this file you
799# indicate that you have read the license and understand and accept it
800# fully.
801
802
803CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.raster])
804
805OBJS=raster.obj
806
807all : $(OBJS)
808 library [--.lib]freetype.olb $(OBJS)
809
810# EOF
811$ eod
812$ close out
813$ write sys$output "... [.src.sfnt] directory"
814$ create [.src.sfnt]descrip.mms
815$ open/append out [.src.sfnt]descrip.mms
816$ copy sys$input: out
817$ deck
818#
819# FreeType 2 SFNT driver compilation rules for VMS
820#
821
822
823# Copyright 2001, 2002 by
824# David Turner, Robert Wilhelm, and Werner Lemberg.
825#
826# This file is part of the FreeType project, and may only be used, modified,
827# and distributed under the terms of the FreeType project license,
828# LICENSE.TXT. By continuing to use, modify, or distribute this file you
829# indicate that you have read the license and understand and accept it
830# fully.
831
832
833CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.sfnt])
834
835OBJS=sfnt.obj
836
837all : $(OBJS)
838 library [--.lib]freetype.olb $(OBJS)
839
840# EOF
841$ eod
842$ close out
843$ write sys$output "... [.src.smooth] directory"
844$ create [.src.smooth]descrip.mms
845$ open/append out [.src.smooth]descrip.mms
846$ copy sys$input: out
847$ deck
848#
849# FreeType 2 smooth renderer module compilation rules for VMS
850#
851
852
853# Copyright 2001 by
854# David Turner, Robert Wilhelm, and Werner Lemberg.
855#
856# This file is part of the FreeType project, and may only be used, modified,
857# and distributed under the terms of the FreeType project license,
858# LICENSE.TXT. By continuing to use, modify, or distribute this file you
859# indicate that you have read the license and understand and accept it
860# fully.
861
862
863CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.smooth])
864
865OBJS=smooth.obj
866
867all : $(OBJS)
868 library [--.lib]freetype.olb $(OBJS)
869
870# EOF
871$ eod
872$ close out
873$ write sys$output "... [.src.truetype] directory"
874$ create [.src.truetype]descrip.mms
875$ open/append out [.src.truetype]descrip.mms
876$ copy sys$input: out
877$ deck
878#
879# FreeType 2 TrueType driver compilation rules for VMS
880#
881
882
883# Copyright 2001, 2002 by
884# David Turner, Robert Wilhelm, and Werner Lemberg.
885#
886# This file is part of the FreeType project, and may only be used, modified,
887# and distributed under the terms of the FreeType project license,
888# LICENSE.TXT. By continuing to use, modify, or distribute this file you
889# indicate that you have read the license and understand and accept it
890# fully.
891
892
893CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.truetype])
894
895OBJS=truetype.obj
896
897all : $(OBJS)
898 library [--.lib]freetype.olb $(OBJS)
899
900# EOF
901$ eod
902$ close out
Werner Lemberg26fb1bc2003-05-28 06:27:26 +0000903$ write sys$output "... [.src.type1] directory"
904$ create [.src.type1]descrip.mms
905$ open/append out [.src.type1]descrip.mms
906$ copy sys$input: out
907$ deck
908#
909# FreeType 2 Type1 driver compilation rules for VMS
910#
911
912
913# Copyright 1996-2000, 2002 by
914# David Turner, Robert Wilhelm, and Werner Lemberg.
915#
916# This file is part of the FreeType project, and may only be used, modified,
917# and distributed under the terms of the FreeType project license,
918# LICENSE.TXT. By continuing to use, modify, or distribute this file you
919# indicate that you have read the license and understand and accept it
920# fully.
921
922
923CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.type1])
924
925OBJS=type1.obj
926
927all : $(OBJS)
928 library [--.lib]freetype.olb $(OBJS)
929
930type1.obj : type1.c t1parse.c t1load.c t1objs.c t1driver.c t1gload.c t1afm.c
931
932# EOF
933$ eod
934$ close out
Werner Lembergbbdee282004-11-17 08:19:27 +0000935$ write sys$output "... [.src.type42] directory"
936$ create [.src.type42]descrip.mms
937$ open/append out [.src.type42]descrip.mms
938$ copy sys$input: out
939$ deck
940#
941# FreeType 2 Type 42 driver compilation rules for VMS
942#
943
944
945# Copyright 2002 by
946# David Turner, Robert Wilhelm, and Werner Lemberg.
947#
948# This file is part of the FreeType project, and may only be used, modified,
949# and distributed under the terms of the FreeType project license,
950# LICENSE.TXT. By continuing to use, modify, or distribute this file you
951# indicate that you have read the license and understand and accept it
952# fully.
953
954
955CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.type42])
956
957OBJS=type42.obj
958
959all : $(OBJS)
960 library [--.lib]freetype.olb $(OBJS)
961
962# EOF
963$ eod
964$ close out
965$ write sys$output "... [.src.winfonts] directory"
966$ create [.src.winfonts]descrip.mms
967$ open/append out [.src.winfonts]descrip.mms
968$ copy sys$input: out
969$ deck
970#
971# FreeType 2 Windows FNT/FON driver compilation rules for VMS
972#
973
974
975# Copyright 2001, 2002 by
976# David Turner, Robert Wilhelm, and Werner Lemberg.
977#
978# This file is part of the FreeType project, and may only be used, modified,
979# and distributed under the terms of the FreeType project license,
980# LICENSE.TXT. By continuing to use, modify, or distribute this file you
981# indicate that you have read the license and understand and accept it
982# fully.
983
984
985CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.winfonts])
986
987OBJS=winfnt.obj
988
989all : $(OBJS)
990 library [--.lib]freetype.olb $(OBJS)
991
992# EOF
993$ eod
994$ close out
Werner Lemberg282637f2003-05-21 07:39:42 +0000995$ return
996$!------------------------------------------------------------------------------
997$!
998$! Check command line options and set symbols accordingly
999$!
1000$ CHECK_OPTS:
1001$ i = 1
1002$ OPT_LOOP:
1003$ if i .lt. 9
1004$ then
1005$ cparm = f$edit(p'i',"upcase")
1006$ if cparm .eqs. "DEBUG"
1007$ then
1008$ ccopt = ccopt + "/noopt/deb"
1009$ lopts = lopts + "/deb"
1010$ endif
Werner Lembergbbdee282004-11-17 08:19:27 +00001011$ if f$locate("CCOPT=",cparm) .lt. f$length(cparm)
1012$ then
1013$ start = f$locate("=",cparm) + 1
1014$ len = f$length(cparm) - start
1015$ ccopt = ccopt + f$extract(start,len,cparm)
1016$ endif
1017$ if cparm .eqs. "LINK" then linkonly = true
David Turner26bb2e22006-09-27 07:58:43 +00001018$ if f$locate("LOPTS=",cparm) .lt. f$length(cparm)
Werner Lemberg282637f2003-05-21 07:39:42 +00001019$ then
1020$ start = f$locate("=",cparm) + 1
1021$ len = f$length(cparm) - start
1022$ lopts = lopts + f$extract(start,len,cparm)
1023$ endif
David Turner26bb2e22006-09-27 07:58:43 +00001024$ if f$locate("CC=",cparm) .lt. f$length(cparm)
Werner Lemberg282637f2003-05-21 07:39:42 +00001025$ then
Werner Lembergbbdee282004-11-17 08:19:27 +00001026$ start = f$locate("=",cparm) + 1
1027$ len = f$length(cparm) - start
1028$ cc_com = f$extract(start,len,cparm)
David Turner26bb2e22006-09-27 07:58:43 +00001029 if (cc_com .nes. "DECC") .and. -
1030 (cc_com .nes. "VAXC") .and. -
Werner Lembergbbdee282004-11-17 08:19:27 +00001031 (cc_com .nes. "GNUC")
1032$ then
1033$ write sys$output "Unsupported compiler choice ''cc_com' ignored"
1034$ write sys$output "Use DECC, VAXC, or GNUC instead"
David Turner26bb2e22006-09-27 07:58:43 +00001035$ else
1036$ if cc_com .eqs. "DECC" then its_decc = true
1037$ if cc_com .eqs. "VAXC" then its_vaxc = true
1038$ if cc_com .eqs. "GNUC" then its_gnuc = true
1039$ endif
Werner Lembergbbdee282004-11-17 08:19:27 +00001040$ endif
David Turner26bb2e22006-09-27 07:58:43 +00001041$ if f$locate("MAKE=",cparm) .lt. f$length(cparm)
Werner Lembergbbdee282004-11-17 08:19:27 +00001042$ then
1043$ start = f$locate("=",cparm) + 1
1044$ len = f$length(cparm) - start
1045$ mmks = f$extract(start,len,cparm)
David Turner26bb2e22006-09-27 07:58:43 +00001046$ if (mmks .eqs. "MMK") .or. (mmks .eqs. "MMS")
Werner Lembergbbdee282004-11-17 08:19:27 +00001047$ then
1048$ make = mmks
David Turner26bb2e22006-09-27 07:58:43 +00001049$ else
Werner Lembergbbdee282004-11-17 08:19:27 +00001050$ write sys$output "Unsupported make choice ''mmks' ignored"
1051$ write sys$output "Use MMK or MMS instead"
David Turner26bb2e22006-09-27 07:58:43 +00001052$ endif
Werner Lemberg282637f2003-05-21 07:39:42 +00001053$ endif
1054$ i = i + 1
1055$ goto opt_loop
1056$ endif
1057$ return
1058$!------------------------------------------------------------------------------
1059$!
1060$! Take care of driver file with information about external libraries
1061$!
Werner Lembergbbdee282004-11-17 08:19:27 +00001062$! Version history
1063$! 0.01 20040220 First version to receive a number
1064$! 0.02 20040229 Echo current procedure name; use general error exit handler
David Turner26bb2e22006-09-27 07:58:43 +00001065$! Remove xpm hack -> Replaced by more general dnsrl handling
Werner Lemberg282637f2003-05-21 07:39:42 +00001066$CHECK_CREATE_VMSLIB:
1067$!
1068$ if f$search("VMSLIB.DAT") .eqs. ""
1069$ then
1070$ type/out=vmslib.dat sys$input
1071!
Werner Lembergbbdee282004-11-17 08:19:27 +00001072! This is a simple driver file with information used by vms_make.com to
Werner Lemberg282637f2003-05-21 07:39:42 +00001073! check if external libraries (like t1lib and freetype) are available on
1074! the system.
1075!
1076! Layout of the file:
1077!
1078! - Lines starting with ! are treated as comments
1079! - Elements in a data line are separated by # signs
1080! - The elements need to be listed in the following order
David Turner26bb2e22006-09-27 07:58:43 +00001081! 1.) Name of the Library (only used for informative messages
Werner Lembergbbdee282004-11-17 08:19:27 +00001082! from vms_make.com)
Werner Lemberg282637f2003-05-21 07:39:42 +00001083! 2.) Location where the object library can be found
1084! 3.) Location where the include files for the library can be found
1085! 4.) Include file used to verify library location
David Turner26bb2e22006-09-27 07:58:43 +00001086! 5.) CPP define to pass to the build to indicate availability of
Werner Lemberg282637f2003-05-21 07:39:42 +00001087! the library
1088!
David Turner26bb2e22006-09-27 07:58:43 +00001089! Example: The following lines show how definitions
1090! might look like. They are site specific and the locations of the
Werner Lemberg282637f2003-05-21 07:39:42 +00001091! library and include files need almost certainly to be changed.
David Turner26bb2e22006-09-27 07:58:43 +00001092!
Werner Lemberg282637f2003-05-21 07:39:42 +00001093! Location: All of the libaries can be found at the following addresses
1094!
Werner Lembergbbdee282004-11-17 08:19:27 +00001095! ZLIB: http://zinser.no-ip.info/vms/sw/zlib.htmlx
Werner Lemberg282637f2003-05-21 07:39:42 +00001096!
Werner Lemberg71e5a592004-11-27 08:18:10 +00001097ZLIB # sys$library:libz.olb # sys$library: # zlib.h # FT_CONFIG_OPTION_SYSTEM_ZLIB
Werner Lemberg282637f2003-05-21 07:39:42 +00001098$ write sys$output "New driver file vmslib.dat created."
1099$ write sys$output "Please customize libary locations for your site"
Werner Lembergbbdee282004-11-17 08:19:27 +00001100$ write sys$output "and afterwards re-execute ''myproc'"
1101$ goto err_exit
Werner Lemberg282637f2003-05-21 07:39:42 +00001102$ endif
1103$!
Werner Lemberg4b2e83d2007-02-01 07:58:02 +00001104$! Init symbols used to hold CPP definitions and include path
Werner Lembergbbdee282004-11-17 08:19:27 +00001105$!
1106$ libdefs = ""
1107$ libincs = ""
1108$!
Werner Lemberg282637f2003-05-21 07:39:42 +00001109$! Open data file with location of libraries
1110$!
Werner Lembergbbdee282004-11-17 08:19:27 +00001111$ open/read/end=end_lib/err=err_lib libdata VMSLIB.DAT
Werner Lemberg282637f2003-05-21 07:39:42 +00001112$LIB_LOOP:
1113$ read/end=end_lib libdata libline
1114$ libline = f$edit(libline, "UNCOMMENT,COLLAPSE")
1115$ if libline .eqs. "" then goto LIB_LOOP ! Comment line
1116$ libname = f$edit(f$element(0,"#",libline),"UPCASE")
Werner Lemberg282637f2003-05-21 07:39:42 +00001117$ write sys$output "Processing ''libname' setup ..."
1118$ libloc = f$element(1,"#",libline)
1119$ libsrc = f$element(2,"#",libline)
1120$ testinc = f$element(3,"#",libline)
1121$ cppdef = f$element(4,"#",libline)
1122$ old_cpp = f$locate("=1",cppdef)
1123$ if old_cpp.lt.f$length(cppdef) then cppdef = f$extract(0,old_cpp,cppdef)
1124$ if f$search("''libloc'").eqs. ""
1125$ then
1126$ write sys$output "Can not find library ''libloc' - Skipping ''libname'"
1127$ goto LIB_LOOP
1128$ endif
1129$ libsrc_elem = 0
1130$ libsrc_found = false
1131$LIBSRC_LOOP:
1132$ libsrcdir = f$element(libsrc_elem,",",libsrc)
1133$ if (libsrcdir .eqs. ",") then goto END_LIBSRC
1134$ if f$search("''libsrcdir'''testinc'") .nes. "" then libsrc_found = true
1135$ libsrc_elem = libsrc_elem + 1
1136$ goto LIBSRC_LOOP
1137$END_LIBSRC:
1138$ if .not. libsrc_found
1139$ then
1140$ write sys$output "Can not find includes at ''libsrc' - Skipping ''libname'"
1141$ goto LIB_LOOP
1142$ endif
Werner Lembergbbdee282004-11-17 08:19:27 +00001143$ if (cppdef .nes. "") then libdefs = libdefs + cppdef + ","
Werner Lemberg282637f2003-05-21 07:39:42 +00001144$ libincs = libincs + "," + libsrc
1145$ lqual = "/lib"
Werner Lembergbbdee282004-11-17 08:19:27 +00001146$ libtype = f$edit(f$parse(libloc,,,"TYPE"),"UPCASE")
Werner Lemberg282637f2003-05-21 07:39:42 +00001147$ if f$locate("EXE",libtype) .lt. f$length(libtype) then lqual = "/share"
Werner Lembergbbdee282004-11-17 08:19:27 +00001148$ write optf libloc , lqual
1149$ if (f$trnlnm("topt") .nes. "") then write topt libloc , lqual
1150$!
1151$! Nasty hack to get the freetype includes to work
1152$!
1153$ ft2def = false
1154$ if ((libname .eqs. "FREETYPE") .and. -
1155 (f$locate("FREETYPE2",cppdef) .lt. f$length(cppdef)))
1156$ then
1157$ if ((f$search("freetype:freetype.h") .nes. "") .and. -
1158 (f$search("freetype:[internal]ftobjs.h") .nes. ""))
1159$ then
1160$ write sys$output "Will use local definition of freetype logical"
1161$ else
David Turner26bb2e22006-09-27 07:58:43 +00001162$ ft2elem = 0
Werner Lembergbbdee282004-11-17 08:19:27 +00001163$FT2_LOOP:
1164$ ft2srcdir = f$element(ft2elem,",",libsrc)
1165$ if f$search("''ft2srcdir'''testinc'") .nes. ""
1166$ then
1167$ if f$search("''ft2srcdir'internal.dir") .nes. ""
1168$ then
1169$ ft2dev = f$parse("''ft2srcdir'",,,"device","no_conceal")
1170$ ft2dir = f$parse("''ft2srcdir'",,,"directory","no_conceal")
1171$ ft2conc = f$locate("][",ft2dir)
1172$ ft2len = f$length(ft2dir)
1173$ if ft2conc .lt. ft2len
1174$ then
1175$ ft2dir = f$extract(0,ft2conc,ft2dir) + -
1176 f$extract(ft2conc+2,ft2len-2,ft2dir)
1177$ endif
1178$ ft2dir = ft2dir - "]" + ".]"
1179$ define freetype 'ft2dev''ft2dir','ft2srcdir'
1180$ ft2def = true
1181$ else
1182$ goto ft2_err
1183$ endif
1184$ else
1185$ ft2elem = ft2elem + 1
1186$ goto ft2_loop
1187$ endif
David Turner26bb2e22006-09-27 07:58:43 +00001188$ endif
Werner Lembergbbdee282004-11-17 08:19:27 +00001189$ endif
Werner Lemberg282637f2003-05-21 07:39:42 +00001190$ goto LIB_LOOP
1191$END_LIB:
1192$ close libdata
Werner Lemberg282637f2003-05-21 07:39:42 +00001193$ return
Werner Lemberg26fb1bc2003-05-28 06:27:26 +00001194$!------------------------------------------------------------------------------
Werner Lemberg282637f2003-05-21 07:39:42 +00001195$!
David Turner26bb2e22006-09-27 07:58:43 +00001196$! Analyze Object files for OpenVMS AXP to extract Procedure and Data
Werner Lemberg26fb1bc2003-05-28 06:27:26 +00001197$! information to build a symbol vector for a shareable image
1198$! All the "brains" of this logic was suggested by Hartmut Becker
1199$! (Hartmut.Becker@compaq.com). All the bugs were introduced by me
1200$! (zinser@decus.de), so if you do have problem reports please do not
1201$! bother Hartmut/HP, but get in touch with me
Werner Lemberg282637f2003-05-21 07:39:42 +00001202$!
Werner Lembergbbdee282004-11-17 08:19:27 +00001203$! Version history
1204$! 0.01 20040006 Skip over shareable images in option file
1205$!
David Turner26bb2e22006-09-27 07:58:43 +00001206$ ANAL_OBJ_AXP: Subroutine
Werner Lemberg282637f2003-05-21 07:39:42 +00001207$ V = 'F$Verify(0)
Werner Lemberg282637f2003-05-21 07:39:42 +00001208$ SAY := "WRITE_ SYS$OUTPUT"
David Turner26bb2e22006-09-27 07:58:43 +00001209$
Werner Lemberg282637f2003-05-21 07:39:42 +00001210$ IF F$SEARCH("''P1'") .EQS. ""
1211$ THEN
Werner Lemberg26fb1bc2003-05-28 06:27:26 +00001212$ SAY "ANAL_OBJ_AXP-E-NOSUCHFILE: Error, inputfile ''p1' not available"
Werner Lemberg282637f2003-05-21 07:39:42 +00001213$ goto exit_aa
1214$ ENDIF
1215$ IF "''P2'" .EQS. ""
1216$ THEN
Werner Lemberg26fb1bc2003-05-28 06:27:26 +00001217$ SAY "ANAL_OBJ_AXP: Error, no output file provided"
Werner Lemberg282637f2003-05-21 07:39:42 +00001218$ goto exit_aa
1219$ ENDIF
1220$
Werner Lemberg26fb1bc2003-05-28 06:27:26 +00001221$ open/read in 'p1
1222$ create a.tmp
1223$ open/append atmp a.tmp
1224$ loop:
1225$ read/end=end_loop in line
Werner Lembergbbdee282004-11-17 08:19:27 +00001226$ if f$locate("/SHARE",f$edit(line,"upcase")) .lt. f$length(line)
1227$ then
1228$ write sys$output "ANAL_SKP_SHR-i-skipshare, ''line'"
1229$ goto loop
1230$ endif
Werner Lemberg71e5a592004-11-27 08:18:10 +00001231$ if f$locate("/LIB",f$edit(line,"upcase")) .lt. f$length(line)
1232$ then
1233$ write libsf line
1234$ write sys$output "ANAL_SKP_LIB-i-skiplib, ''line'"
1235$ goto loop
1236$ endif
Werner Lemberg26fb1bc2003-05-28 06:27:26 +00001237$ f= f$search(line)
1238$ if f .eqs. ""
1239$ then
1240$ write sys$output "ANAL_OBJ_AXP-w-nosuchfile, ''line'"
1241$ goto loop
1242$ endif
1243$ def/user sys$output nl:
1244$ def/user sys$error nl:
1245$ anal/obj/gsd 'f /out=x.tmp
1246$ open/read xtmp x.tmp
1247$ XLOOP:
1248$ read/end=end_xloop xtmp xline
1249$ xline = f$edit(xline,"compress")
1250$ write atmp xline
1251$ goto xloop
1252$ END_XLOOP:
1253$ close xtmp
1254$ goto loop
1255$ end_loop:
1256$ close in
1257$ close atmp
1258$ if f$search("a.tmp") .eqs. "" -
1259 then $ exit
1260$ ! all global definitions
1261$ search a.tmp "symbol:","EGSY$V_DEF 1","EGSY$V_NORM 1"/out=b.tmp
1262$ ! all procedures
1263$ search b.tmp "EGSY$V_NORM 1"/wind=(0,1) /out=c.tmp
1264$ search c.tmp "symbol:"/out=d.tmp
1265$ def/user sys$output nl:
1266$ edito/edt/command=sys$input d.tmp
1267sub/symbol: "/symbol_vector=(/whole
Werner Lemberg71e5a592004-11-27 08:18:10 +00001268sub/"/=PROCEDURE)/whole
Werner Lemberg26fb1bc2003-05-28 06:27:26 +00001269exit
1270$ ! all data
1271$ search b.tmp "EGSY$V_DEF 1"/wind=(0,1) /out=e.tmp
1272$ search e.tmp "symbol:"/out=f.tmp
1273$ def/user sys$output nl:
1274$ edito/edt/command=sys$input f.tmp
1275sub/symbol: "/symbol_vector=(/whole
Werner Lemberg71e5a592004-11-27 08:18:10 +00001276sub/"/=DATA)/whole
Werner Lemberg26fb1bc2003-05-28 06:27:26 +00001277exit
1278$ sort/nodupl d.tmp,f.tmp 'p2'
1279$ delete a.tmp;*,b.tmp;*,c.tmp;*,d.tmp;*,e.tmp;*,f.tmp;*
1280$ if f$search("x.tmp") .nes. "" -
1281 then $ delete x.tmp;*
Werner Lemberg282637f2003-05-21 07:39:42 +00001282$!
Werner Lemberg71e5a592004-11-27 08:18:10 +00001283$ close libsf
Werner Lemberg282637f2003-05-21 07:39:42 +00001284$ EXIT_AA:
1285$ if V then set verify
David Turner26bb2e22006-09-27 07:58:43 +00001286$ endsubroutine