source: trunk/essentials/sys-apps/gawk/vms/vmsbuild.com

Last change on this file was 3076, checked in by bird, 18 years ago

gawk 3.1.5

File size: 3.3 KB
Line 
1$! vmsbuild.com -- Commands to build GAWK Pat Rankin, Dec'89
2$! revised, Mar'90
3$! gawk 2.13 revised, Jun'91
4$! gawk 2.14 revised, Sep'92
5$! gawk 2.15 revised, Oct'93
6$! gawk 3.0 revised, Dec'95
7$! gawk 3.0.1 revised, Nov'96
8$! gawk 3.1.0 revised, Mar'01
9$! gawk 3.1.1 revised, Apr'02
10$!
11$ REL = "3.1" !release version number
12$ PATCHLVL = "5"
13$!
14$!
15$ CCFLAGS = "/noList" ! "/noOpt/Debug"
16$ CDEFS = "GAWK,HAVE_CONFIG_H"
17$!
18$ if p1.eqs."" then p1 = "DECC" !default compiler
19$ if p1.eqs."GNUC"
20$ then
21$! assumes VAX
22$ CC = "gcc"
23$ if f$type(gcc).eqs."STRING" then CC = gcc
24$ CFLAGS = "/Incl=([],[.vms])/Obj=[]/Def=(''CDEFS')''CCFLAGS'"
25$ LIBS = "gnu_cc:[000000]gcclib.olb/Library,sys$library:vaxcrtl.olb/Library"
26$ if p2.eqs."DO_GNUC_SETUP" then set command gnu_cc:[000000]gcc
27$ else !!GNUC
28$ if p1.eqs."VAXC"
29$ then
30$! always VAX; version V3.x of VAX C assumed (for V2.x, remove /Opt=noInline)
31$ CC = "cc"
32$ if f$trnlnm("DECC$CC_DEFAULT").nes."" then CC = "cc/VAXC"
33$ CFLAGS = "/Incl=[]/Obj=[]/Opt=noInline/Def=(''CDEFS')''CCFLAGS'"
34$ LIBS = "sys$share:vaxcrtl.exe/Shareable"
35$ else !!VAXC
36$! neither GNUC nor VAXC, assume DECC (same for either VAX or Alpha)
37$ CC = "cc/DECC/Prefix=All"
38$ CFLAGS = "/Incl=[]/Obj=[]/Def=(''CDEFS')''CCFLAGS'"
39$ LIBS = "" ! DECC$SHR instead of VAXCRTL, no special link option needed
40$ endif !VAXC
41$ endif !GNUC
42$!
43$ cc = CC + CFLAGS
44$ show symbol cc
45$!
46$ if f$search("config.h").nes."" then -
47 if f$cvtime(f$file_attr("config.h","RDT")).ges.-
48 f$cvtime(f$file_attr("[.vms]vms-conf.h","RDT")) then goto config_ok
49$ v = f$verify(1)
50$ copy [.vms]vms-conf.h []config.h
51$! 'f$verify(v)'
52$config_ok:
53$ if f$search("awkgram.c").nes."" then goto awkgram_ok
54$ write sys$output " You must process `awkgram.y' with ""yacc"" or ""bison"""
55$ if f$search("awkgram_tab.c").nes."" then - !bison was run manually
56 write sys$output " or else rename `awkgram_tab.c' to `awkgramtab.c'."
57$ if f$search("ytab.c").nes."" .or. f$search("y_tab.c").nes."" then - !yacc
58 write sys$output " or else rename `ytab.c' or `y_tab.c' to `awkgramtab.c'."
59$ exit
60$awkgram_ok:
61$ v = f$verify(1)
62$ cc array.c
63$ cc awkgram.c
64$ cc builtin.c
65$ cc dfa.c
66$ cc ext.c
67$ cc field.c
68$ cc gawkmisc.c
69$ cc getopt.c
70$ cc getopt1.c
71$ cc io.c
72$ cc main.c
73$ cc msg.c
74$ cc node.c
75$ cc random.c
76$ cc re.c
77$ cc regex.c
78$ cc replace.c
79$ cc version.c
80$ cc eval.c
81$ cc profile.c
82$ cc [.vms]vms_misc.c
83$ cc [.vms]vms_popen.c
84$ cc [.vms]vms_fwrite.c
85$ cc [.vms]vms_args.c
86$ cc [.vms]vms_gawk.c
87$ cc [.vms]vms_cli.c
88$ set command/Object=[]gawk_cmd.obj [.vms]gawk.cld
89$! 'f$verify(v)'
90$!
91$ close/noLog Fopt
92$ create gawk.opt
93! GAWK -- GNU awk
94array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,field.obj,gawkmisc.obj
95getopt.obj,getopt1.obj,io.obj,main.obj,msg.obj,node.obj,random.obj
96re.obj,regex.obj,replace.obj,version.obj,eval.obj,profile.obj
97[]vms_misc.obj,vms_popen.obj,vms_fwrite.obj,vms_args.obj
98[]vms_gawk.obj,vms_cli.obj,gawk_cmd.obj
99psect_attr=environ,noshr !extern [noshare] char **
100stack=48 !preallocate more pages (default is 20)
101iosegment=128 !ditto (default is 32)
102$ open/append Fopt gawk.opt
103$ write Fopt libs
104$ write Fopt "identification=""V''REL'.''PATCHLVL'"""
105$ close Fopt
106$!
107$ v = f$verify(1)
108$ link/exe=gawk.exe gawk.opt/options
109$! 'f$verify(v)'
110$ exit
Note: See TracBrowser for help on using the repository browser.