| 1 |
$! vmsbuild.com -- Commands to build GAWK Pat Rankin, Dec'89 |
| 2 |
$! |
| 3 |
$ if (f$getsyi("HW_MODEL") .lt. 1024) |
| 4 |
$ then |
| 5 |
$ arch_name = "VAX" |
| 6 |
$ else |
| 7 |
$ arch_name = f$edit(f$getsyi("ARCH_NAME"), "UPCASE") |
| 8 |
$ endif |
| 9 |
$! |
| 10 |
$ CCFLAGS = "/noList" ! "/noOpt/Debug" |
| 11 |
$! CCFLAGS = "/list/show=(expan,incl) |
| 12 |
$ CDEFS = "GAWK,HAVE_CONFIG_H" |
| 13 |
$! Do not specify _POSIX_EXIT here, we are using other tricks for that. |
| 14 |
$! |
| 15 |
$! |
| 16 |
$ if p1.eqs."" then p1 = "DECC" !default compiler |
| 17 |
$ if p1.eqs."GNUC" |
| 18 |
$ then |
| 19 |
$! assumes VAX |
| 20 |
$ CC = "gcc" |
| 21 |
$ if f$type(gcc).eqs."STRING" then CC = gcc |
| 22 |
$ CFLAGS = "/Incl=([],[.vms],[.SUPPORT],[.SUPPORT.MALLOC])" |
| 23 |
$ CFLAGS = CFLAGS + "/Obj=[]/Def=(''CDEFS')''CCFLAGS'" |
| 24 |
$ LIBS = "gnu_cc:[000000]gcclib.olb/Library,sys$library:vaxcrtl.olb/Library" |
| 25 |
$ if p2.eqs."DO_GNUC_SETUP" then set command gnu_cc:[000000]gcc |
| 26 |
$ else !!GNUC |
| 27 |
$ if p1.eqs."VAXC" |
| 28 |
$ then |
| 29 |
$! always VAX; version V3.x of VAX C assumed (for V2.x, remove /Opt=noInline) |
| 30 |
$ CC = "cc" |
| 31 |
$ if f$trnlnm("DECC$CC_DEFAULT").nes."" then CC = "cc/VAXC" |
| 32 |
$ CFLAGS = "/Incl=[]/Obj=[]/Opt=noInline/Def=(''CDEFS')''CCFLAGS'" |
| 33 |
$ LIBS = "sys$share:vaxcrtl.exe/Shareable" |
| 34 |
$ else !!VAXC |
| 35 |
$! neither GNUC nor VAXC, assume DECC (same for either VAX or Alpha) |
| 36 |
$ if arch_name .eqs. "VAX" |
| 37 |
$ then |
| 38 |
$ CFLOAT = "" |
| 39 |
$ else |
| 40 |
$ CFLOAT = "/float=ieee/ieee_mode=denorm_results" |
| 41 |
$ endif |
| 42 |
$ CC = "cc/DECC/Prefix=All" |
| 43 |
$ CNAME = "/NAME=(AS_IS,SHORT) |
| 44 |
$ CINC = "/NESTED_INCLUDE=NONE" |
| 45 |
$ CINC1 = "[],[.vms],[.support],[.support.malloc]" |
| 46 |
$ CFLAGS = "/Incl=(''CINC1')/Obj=[]/Def=(''CDEFS')''CINC'''CCFLAGS'" |
| 47 |
$ CFLAGS = CNAME + CFLOAT + CFLAGS |
| 48 |
$ LIBS = "" ! DECC$SHR instead of VAXCRTL, no special link option needed |
| 49 |
$ endif !VAXC |
| 50 |
$ endif !GNUC |
| 51 |
$! |
| 52 |
$ cc = CC + CFLAGS |
| 53 |
$ show symbol cc |
| 54 |
$! |
| 55 |
$ if f$search("config.h") .nes. "" |
| 56 |
$ then |
| 57 |
$ if f$cvtime(f$file_attr("config.h", "RDT")) .ges. - |
| 58 |
f$cvtime(f$file_attr("configh.in","RDT")) then goto config_ok |
| 59 |
$ endif |
| 60 |
$ v = f$verify(0) |
| 61 |
$ @[.vms]generate_config_vms_h_gawk.com |
| 62 |
$ @[.vms]config_h.com NOBUILTINS |
| 63 |
$! |
| 64 |
$config_ok: |
| 65 |
$ if f$search("awkgram.c").nes."" then goto awkgram_ok |
| 66 |
$ write sys$output " You must process `awkgram.y' with ""yacc"" or ""bison""" |
| 67 |
$ if f$search("awkgram_tab.c").nes."" then - !bison was run manually |
| 68 |
write sys$output " or else rename `awkgram_tab.c' to `awkgram.c'." |
| 69 |
$ if f$search("ytab.c").nes."" .or. f$search("y_tab.c").nes."" then - !yacc |
| 70 |
write sys$output " or else rename `ytab.c' or `y_tab.c' to `awkgram.c'." |
| 71 |
$ exit |
| 72 |
$awkgram_ok: |
| 73 |
$ if f$search("command.c").nes."" then goto command_ok |
| 74 |
$ write sys$output " You must process `command.y' with ""yacc"" or ""bison""" |
| 75 |
$ if f$search("command_tab.c").nes."" then - !bison was run manually |
| 76 |
write sys$output " or else rename `command_tab.c' to `command.c'." |
| 77 |
$ if f$search("ytab.c").nes."" .or. f$search("y_tab.c").nes."" then - !yacc |
| 78 |
write sys$output " or else rename `ytab.c' or `y_tab.c' to `command.c'." |
| 79 |
$ exit |
| 80 |
$command_ok: |
| 81 |
$ v1 = f$verify(1) |
| 82 |
$ cc array.c |
| 83 |
$ cc awkgram.c |
| 84 |
$ cc builtin.c |
| 85 |
$ cc [.support]dfa.c |
| 86 |
$ define/user malloc sys$disk:[.support.malloc] |
| 87 |
$ cc [.support.malloc]dynarray_resize.c |
| 88 |
$ cc ext.c |
| 89 |
$ cc field.c |
| 90 |
$ cc floatcomp.c |
| 91 |
$ cc gawkmisc.c |
| 92 |
$ cc [.support]getopt.c |
| 93 |
$ cc [.support]getopt1.c |
| 94 |
$ cc io.c |
| 95 |
$ cc [.support]localeinfo.c |
| 96 |
$ cc main.c |
| 97 |
$ cc msg.c |
| 98 |
$ cc node.c |
| 99 |
$ cc [.support]random.c |
| 100 |
$ cc re.c |
| 101 |
$ define/user malloc sys$disk:[.support.malloc] |
| 102 |
$ cc [.support]regex.c |
| 103 |
$ cc replace.c |
| 104 |
$ cc version.c |
| 105 |
$ cc eval.c |
| 106 |
$ cc profile.c |
| 107 |
$ cc command.c |
| 108 |
$ cc debug.c |
| 109 |
$ cc int_array.c |
| 110 |
$ cc cint_array.c |
| 111 |
$ cc gawkapi.c |
| 112 |
$ cc mpfr.c |
| 113 |
$ cc str_array.c |
| 114 |
$ cc symbol.c |
| 115 |
$ cc printf.c |
| 116 |
$ cc [.vms]vms_misc.c |
| 117 |
$ cc [.vms]vms_popen.c |
| 118 |
$ cc [.vms]vms_fwrite.c |
| 119 |
$ cc [.vms]vms_args.c |
| 120 |
$ cc [.vms]vms_gawk.c |
| 121 |
$ cc [.vms]vms_cli.c |
| 122 |
$ cc [.vms]vms_crtl_init.c |
| 123 |
$ set command/Object=[]gawk_cmd.obj sys$disk:[.vms]gawk.cld |
| 124 |
$! 'f$verify(v)' |
| 125 |
$! |
| 126 |
$ close/noLog Fopt |
| 127 |
$ create gawk.opt |
| 128 |
! GAWK -- GNU awk |
| 129 |
array.obj,awkgram.obj,builtin.obj,dfa.obj,dynarray_resize.obj |
| 130 |
ext.obj,field.obj,floatcomp.obj |
| 131 |
gawkmisc.obj,getopt.obj,getopt1.obj,io.obj,localeinfo.obj |
| 132 |
main.obj,msg.obj,node.obj |
| 133 |
random.obj,re.obj,regex.obj,replace.obj,version.obj,eval.obj,profile.obj |
| 134 |
command.obj,debug.obj,int_array.obj,cint_array.obj,gawkapi.obj,mpfr.obj |
| 135 |
str_array.obj,symbol.obj,printf.obj |
| 136 |
[]vms_misc.obj,vms_popen.obj,vms_fwrite.obj,vms_args.obj |
| 137 |
[]vms_gawk.obj,vms_cli.obj,gawk_cmd.obj,vms_crtl_init.obj |
| 138 |
psect_attr=environ,noshr !extern [noshare] char ** |
| 139 |
stack=48 !preallocate more pages (default is 20) |
| 140 |
iosegment=128 !ditto (default is 32) |
| 141 |
$! |
| 142 |
$ @[.vms]gawk_ident.com |
| 143 |
$ v1 = f$verify(1) |
| 144 |
$ open/append Fopt gawk.opt |
| 145 |
$ write Fopt libs |
| 146 |
$ close Fopt |
| 147 |
$! |
| 148 |
$ v1 = f$verify(1) |
| 149 |
$ link/exe=gawk.exe gawk.opt/options |
| 150 |
$! 'f$verify(v)' |
| 151 |
$ exit |