aboutsummaryrefslogtreecommitdiffstats
path: root/vms/vmsbuild.com
diff options
context:
space:
mode:
Diffstat (limited to 'vms/vmsbuild.com')
-rw-r--r--vms/vmsbuild.com46
1 files changed, 35 insertions, 11 deletions
diff --git a/vms/vmsbuild.com b/vms/vmsbuild.com
index 95c6aeb3..ff5dc929 100644
--- a/vms/vmsbuild.com
+++ b/vms/vmsbuild.com
@@ -15,9 +15,18 @@ $!
$ REL = "4.1" !release version number
$ PATCHLVL = "0"
$!
+$ if (f$getsyi("HW_MODEL") .lt. 1024)
+$ then
+$ arch_name = "VAX"
+$ else
+$ arch_name = f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
+$ endif
$!
$ CCFLAGS = "/noList" ! "/noOpt/Debug"
+$! CCFLAGS = "/list/show=(expan,incl)
$ CDEFS = "GAWK,HAVE_CONFIG_H"
+$! Do not specify _POSIX_EXIT here, we are using other tricks for that.
+$!
$!
$ if p1.eqs."" then p1 = "DECC" !default compiler
$ if p1.eqs."GNUC"
@@ -38,8 +47,16 @@ $ CFLAGS = "/Incl=[]/Obj=[]/Opt=noInline/Def=(''CDEFS')''CCFLAGS'"
$ LIBS = "sys$share:vaxcrtl.exe/Shareable"
$ else !!VAXC
$! neither GNUC nor VAXC, assume DECC (same for either VAX or Alpha)
+$ if arch_name .eqs. "vax"
+$ then
+$ cfloat = ""
+$ else
+$ cfloat = "/float=ieee/ieee_mode=denorm_results"
+$ endif
$ CC = "cc/DECC/Prefix=All"
-$ CFLAGS = "/Incl=[]/Obj=[]/Def=(''CDEFS')''CCFLAGS'"
+$ CINC = "/NESTED_INCLUDE=NONE"
+$ CFLAGS = "/Incl=([],[.vms])/Obj=[]/Def=(''CDEFS')''CINC'''CCFLAGS'"
+$ CFLAGS = cfloat + CFLAGS
$ LIBS = "" ! DECC$SHR instead of VAXCRTL, no special link option needed
$ endif !VAXC
$ endif !GNUC
@@ -47,12 +64,15 @@ $!
$ cc = CC + CFLAGS
$ show symbol cc
$!
-$ if f$search("config.h").nes."" then -
- if f$cvtime(f$file_attr("config.h","RDT")).ges.-
- f$cvtime(f$file_attr("[.vms]vms-conf.h","RDT")) then goto config_ok
-$ v = f$verify(1)
-$ copy [.vms]vms-conf.h []config.h
-$! 'f$verify(v)'
+$ if f$search("config.h") .nes. ""
+$ then
+$ if f$cvtime(f$file_attr("config.h", "RDT")) .ges. -
+ f$cvtime(f$file_attr("configh.in","RDT")) then goto config_ok
+$ endif
+$ v = f$verify(0)
+$ @[.vms]generate_config_vms_h_gawk.com
+$ @[.vms]config_h.com NOBUILTINS
+$!
$config_ok:
$ if f$search("awkgram.c").nes."" then goto awkgram_ok
$ write sys$output " You must process `awkgram.y' with ""yacc"" or ""bison"""
@@ -106,7 +126,8 @@ $ cc [.vms]vms_fwrite.c
$ cc [.vms]vms_args.c
$ cc [.vms]vms_gawk.c
$ cc [.vms]vms_cli.c
-$ set command/Object=[]gawk_cmd.obj [.vms]gawk.cld
+$ cc [.vms]vms_crtl_init.c
+$ set command/Object=[]gawk_cmd.obj sys$disk:[.vms]gawk.cld
$! 'f$verify(v)'
$!
$ close/noLog Fopt
@@ -116,15 +137,18 @@ array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,field.obj,floatcomp.obj
gawkmisc.obj,getopt.obj,getopt1.obj,io.obj
main.obj,msg.obj,node.obj
random.obj,re.obj,regex.obj,replace.obj,version.obj,eval.obj,profile.obj
-command.obj,debug.obj,int_array.obj,cint_array.obj,gawkapi.obj,mpfr.obj,str_array.obj,symbol.obj
+command.obj,debug.obj,int_array.obj,cint_array.obj,gawkapi.obj,mpfr.obj
+str_array.obj,symbol.obj
[]vms_misc.obj,vms_popen.obj,vms_fwrite.obj,vms_args.obj
-[]vms_gawk.obj,vms_cli.obj,gawk_cmd.obj
+[]vms_gawk.obj,vms_cli.obj,gawk_cmd.obj,vms_crtl_init.obj
psect_attr=environ,noshr !extern [noshare] char **
stack=48 !preallocate more pages (default is 20)
iosegment=128 !ditto (default is 32)
+$!
+$ v = f$verify(1)
+$ @[.vms]gawk_ident.com
$ open/append Fopt gawk.opt
$ write Fopt libs
-$ write Fopt "identification=""V''REL'.''PATCHLVL'"""
$ close Fopt
$!
$ v = f$verify(1)