summaryrefslogtreecommitdiff
path: root/vms/descrip.mms
diff options
context:
space:
mode:
Diffstat (limited to 'vms/descrip.mms')
-rw-r--r--vms/descrip.mms322
1 files changed, 209 insertions, 113 deletions
diff --git a/vms/descrip.mms b/vms/descrip.mms
index 967a312e..a0b7bd6a 100644
--- a/vms/descrip.mms
+++ b/vms/descrip.mms
@@ -12,14 +12,6 @@
# gawk.exe :
# This is the default target. DEC C has become the default compiler.
#
-# pgawk.exe :
-# An alternate version which generates some profiling feedback for
-# the awk programs it executes. Included with `make all'.
-#
-# dgawk.exe :
-# An alternate version which supports debugging.
-# Included with `make all'.
-#
# awkgram.c :
# If you don't have bison but do have VMS POSIX or DEC/Shell,
# change the PARSER and PASERINIT macros to use yacc. If you don't
@@ -48,12 +40,14 @@
# location of various source files, relative to the 'main' directory
VMSDIR = [.vms]
DOCDIR = [.doc]
+MISSNGD = [.missing_d]
MAKEFILE = $(VMSDIR)Descrip.MMS
# debugging &c !'ccflags' is an escape to allow external compile flags
#CCFLAGS = /noOpt/Debug
# a comma separated list of macros to define
+# Do not specify _POSIX_EXIT here, other tricks are used for this.
CDEFS = "GAWK","HAVE_CONFIG_H"
.ifdef GNUC
@@ -74,8 +68,15 @@ 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)
-CC = cc/DECC/Prefix=All
-CFLAGS = /Incl=[]/Obj=[]/Def=($(CDEFS)) $(CCFLAGS)
+.ifdef __VAX__
+CFLOAT =
+.else
+CFLOAT = /float=ieee/ieee_mode=denorm_results
+.endif
+CNAME = /NAME=(AS_IS,SHORT)
+CC = cc/DECC/Prefix=All/NESTED_INCLUDE=NONE$(CFLOAT)
+CFLAGS = /Incl=([],[.vms])/Obj=[]/Def=($(CDEFS))$(CNAME) $(CCFLAGS)
+CEFLAGS = /Incl=([],[.vms],[.missing_d],[.extension])$(CNAME) $(CCFLAGS)
LIBS = # DECC$SHR instead of VAXCRTL, no special link option needed
.endif !VAXC
.endif !GNUC
@@ -99,73 +100,45 @@ ECHO = write sys$output
NOOP = continue
# object files
-GAWKOBJ = eval.obj,profile.obj
-PGAWKOBJ = eval_p.obj,profile_p.obj
-DGAWKOBJ = eval_d.obj,profile.obj,command.obj,debug.obj
-AWKOBJ1 = array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,\
- field.obj,floatcomp.obj,gawkmisc.obj,getopt.obj,getopt1.obj,\
- io.obj
-AWKOBJ2 = main.obj,msg.obj,node.obj,random.obj,re.obj,\
- regex.obj,replace.obj,version.obj
+GAWKOBJ = eval.obj,profile.obj
+AWKOBJ1 = array.obj,awkgram.obj,builtin.obj,cint_array.obj,\
+ command.obj,debug.obj,dfa.obj,ext.obj,field.obj,\
+ floatcomp.obj,gawkapi.obj,gawkmisc.obj,getopt.obj,getopt1.obj
+
+AWKOBJ2 = int_array.obj,io.obj,main.obj,mpfr.obj,msg.obj,node.obj,\
+ random.obj,re.obj,regex.obj,replace.obj,\
+ str_array.obj,symbol.obj,version.obj
+
AWKOBJS = $(AWKOBJ1),$(AWKOBJ2)
# VMSOBJS
# VMS specific stuff
VMSCODE = vms_misc.obj,vms_popen.obj,vms_fwrite.obj,vms_args.obj,\
- vms_gawk.obj,vms_cli.obj
+ vms_gawk.obj,vms_cli.obj,vms_crtl_init.obj
VMSCMD = gawk_cmd.obj # built from .cld file
VMSOBJS = $(VMSCODE),$(VMSCMD)
-# primary source files
-AWKSRC = array.c,builtin.c,dfa.c,eval.c,eval_p.c,ext.c,field.c,\
- floatcomp.c,gawkmisc.c,getopt.c,getopt1.c,io.c,main.c,\
- msg.c,node.c,profile.c,profile_p.c,random.c,re.c,regcomp.c,\
- regex.c,regex_internal.c,regexec.c,replace.c,version.c
-
-DBGSRC = eval_d.c,debug.c,command.y,cmd.h
-
-ALLSRC = $(AWKSRC),awkgram.y,awk.h,custom.h,dfa.h,getopt.h,\
- gettext.h,mbsupport.h,protos.h,random.h
-
-VMSSRC = $(VMSDIR)gawkmisc.vms,$(VMSDIR)vms_misc.c,$(VMSDIR)vms_popen.c,\
- $(VMSDIR)vms_fwrite.c,$(VMSDIR)vms_args.c,$(VMSDIR)vms_gawk.c,\
- $(VMSDIR)vms_cli.c
-VMSHDRS = $(VMSDIR)redirect.h,$(VMSDIR)vms.h,$(VMSDIR)fcntl.h,\
- $(VMSDIR)varargs.h,$(VMSDIR)unixlib.h
-VMSOTHR = $(VMSDIR)descrip.mms,$(VMSDIR)vmsbuild.com,$(VMSDIR)version.com,\
- $(VMSDIR)gawk.hlp
-
DOCS= $(DOCDIR)gawk.1,$(DOCDIR)gawk.texi,$(DOCDIR)texinfo.tex
# Release of gawk
-REL=4.0
-PATCHLVL=0
+REL=4.1
+PATCHLVL=1
# generic target
-all : gawk,pgawk,dgawk
- $(NOOP)
+all : gawk
+ @ $(NOOP)
# dummy target to allow building "gawk" in addition to explicit "gawk.exe"
gawk : gawk.exe
- $(ECHO) " GAWK "
-pgawk : pgawk.exe
- $(ECHO) " PGAWK "
-dgawk : dgawk.exe
- $(ECHO) " DGAWK "
+ @ $(ECHO) "$< is upto date"
# rules to build gawk
gawk.exe : $(GAWKOBJ) $(AWKOBJS) $(VMSOBJS) gawk.opt
$(LINK) $(LINKFLAGS) gawk.opt/options
-# rules to build pgawk and dgawk
-pgawk.exe : $(PGAWKOBJ) $(AWKOBJS) $(VMSOBJS) pgawk.opt
- $(LINK) $(LINKFLAGS) pgawk.opt/options
-dgawk.exe : $(DGAWKOBJ) $(AWKOBJS) $(VMSOBJS) dgawk.opt
- $(LINK) $(LINKFLAGS) dgawk.opt/options
-
-gawk.opt : $(MAKEFILE) # create linker options file
- open/write opt gawk.opt ! ~ 'cat <<close >gawk.opt'
- write opt "! GAWK -- GNU awk"
+gawk.opt : $(MAKEFILE) config.h # create linker options file
+ @ open/write opt sys$disk:[]gawk.opt ! ~ 'cat <<close >gawk.opt'
+ @ write opt "! GAWK -- GNU awk"
@ write opt "$(GAWKOBJ)"
@ write opt "$(AWKOBJ1)"
@ write opt "$(AWKOBJ2)"
@@ -173,59 +146,64 @@ gawk.opt : $(MAKEFILE) # create linker options file
@ write opt "psect_attr=environ,noshr !extern [noshare] char **"
@ write opt "stack=48 !preallocate more pages (default is 20)"
@ write opt "iosegment=128 !ditto (default is 32)"
- write opt "$(LIBS)"
- write opt "identification=""V$(REL).$(PATCHLVL)"""
- close opt
-
-pgawk.opt : $(MAKEFILE) # create linker options file
- open/write opt pgawk.opt
- write opt "! PGAWK -- GNU awk w/ run-time profiling"
- @ write opt "$(PGAWKOBJ)"
- @ write opt "$(AWKOBJ1)"
- @ write opt "$(AWKOBJ2)"
- @ write opt "$(VMSOBJS)"
- @ write opt "psect_attr=environ,noshr !extern [noshare] char **"
- @ write opt "stack=48 !preallocate more pages (default is 20)"
- @ write opt "iosegment=128 !ditto (default is 32)"
- write opt "$(LIBS)"
- write opt "identification=""V$(REL).$(PATCHLVL)"""
- close opt
-
-dgawk.opt : $(MAKEFILE) # create linker options file
- open/write opt dgawk.opt
- write opt "! DGAWK -- GNU awk w/ debugging"
- @ write opt "$(DGAWKOBJ)"
- @ write opt "$(AWKOBJ1)"
- @ write opt "$(AWKOBJ2)"
- @ write opt "$(VMSOBJS)"
- @ write opt "psect_attr=environ,noshr !extern [noshare] char **"
- @ write opt "stack=48 !preallocate more pages (default is 20)"
- @ write opt "iosegment=128 !ditto (default is 32)"
- write opt "$(LIBS)"
- write opt "identification=""V$(REL).$(PATCHLVL)"""
- close opt
+ @ write opt "$(LIBS)"
+ @ close opt
+ $ @$(VMSDIR)gawk_ident.com
+
+$(VMSCODE) : awk.h config.h $(VMSDIR)redirect.h $(VMSDIR)vms.h
+$(AWKOBJS) : awk.h gettext.h mbsupport.h regex.h dfa.h config.h \
+ $(VMSDIR)redirect.h
+$(GAWKOBJ) : awk.h config.h $(VMSDIR)redirect.h
+
+#-----------------------------------------------------------------------------
+# Older versions of MMS have problems handling lower case file names typically
+# found on ODS-5 disks. Fix this by adding explicit dependencies.
+#_____________________________________________________________________________
+array.obj : array.c
+awkgram.obj : awkgram.c awk.h
+builtin.obj : builtin.c floatmagic.h random.h
+cint_array.obj : cint_array.c
+command.obj : command.c cmd.h
+debug.obj : debug.c cmd.h
+dfa.obj : dfa.c dfa.h
+ext.obj : ext.c
+eval.obj : eval.c
+field.obj : field.c
+floatcomp.obj : floatcomp.c
+gawkaoi.obj : gawkapi.c
+gawkmisc.obj : gawkmisc.c $(VMSDIR)gawkmisc.vms
+getopt.obj : getopt.c
+getopt1.obj : getopt1.c
+int_array.obj : int_array.c
+io.obj : io.c
+main.obj : main.c
+msg.obj : msg.c
+mpfr.obj : mpfr.c
+node.obj : node.c
+profile.obj : profile.c
+random.obj : random.c random.h
+re.obj : re.c
+regex.obj : regex.c regcomp.c regex_internal.c regexec.c regex.h \
+ regex_internal.h
+str_array.obj : str_array.c
+symbol.obj : symbol.c
+version.obj : version.c
vms_misc.obj : $(VMSDIR)vms_misc.c
vms_popen.obj : $(VMSDIR)vms_popen.c
vms_fwrite.obj : $(VMSDIR)vms_fwrite.c
vms_args.obj : $(VMSDIR)vms_args.c
vms_gawk.obj : $(VMSDIR)vms_gawk.c
vms_cli.obj : $(VMSDIR)vms_cli.c
-$(VMSCODE) : awk.h config.h $(VMSDIR)redirect.h $(VMSDIR)vms.h
-
-gawkmisc.obj : gawkmisc.c $(VMSDIR)gawkmisc.vms
-
-$(AWKOBJS) : awk.h gettext.h mbsupport.h regex.h dfa.h \
- config.h $(VMSDIR)redirect.h
-$(GAWKOBJ) : awk.h config.h $(VMSDIR)redirect.h
-$(PGAWKOBJ) : awk.h config.h $(VMSDIR)redirect.h
-$(DGAWKOBJ) : awk.h config.h $(VMSDIR)redirect.h
-random.obj : random.h
-builtin.obj : floatmagic.h random.h
-awkgram.obj : awkgram.c awk.h
-dfa.obj : dfa.c dfa.h
-regex.obj : regex.c regcomp.c regex_internal.c regexec.c regex.h regex_internal.h
-command.obj,debug.obj : cmd.h
+vms_crtl_init.obj : $(VMSDIR)vms_crtl_init.c
+replace.obj : replace.c $(MISSNGD)system.c $(MISSNGD)memcmp.c \
+ $(MISSNGD)memcpy.c $(MISSNGD)memset.c $(MISSNGD)memmove.c \
+ $(MISSNGD)strncasecmp.c $(MISSNGD)strerror.c \
+ $(MISSNGD)strftime.c $(MISSNGD)strchr.c $(MISSNGD)strtod.c \
+ $(MISSNGD)strtoul.c $(MISSNGD)tzset.c $(MISSNGD)mktime.c \
+ $(MISSNGD)snprintf.c $(MISSNGD)getaddrinfo.c \
+ $(MISSNGD)usleep.c \
+ $(MISSNGD)setenv.c $(MISSNGD)strcoll.c $(MISSNGD)wcmisc.c
# bison or yacc required
awkgram.c : awkgram.y # foo.y :: yacc => y[_]tab.c, bison => foo_tab.c
@@ -236,7 +214,9 @@ awkgram.c : awkgram.y # foo.y :: yacc => y[_]tab.c, bison => foo_tab.c
$(PARSER) $(YFLAGS) $<
@- if f$search("ytab.c") .nes."" then rename/new_vers ytab.c $@
@- if f$search("y_tab.c") .nes."" then rename/new_vers y_tab.c $@
- @- if f$search("awkgram_tab.c").nes."" then rename/new_vers awkgram_tab.c $@
+ @- if f$search("awkgram_tab.c").nes."" then \
+ rename/new_vers awkgram_tab.c $@
+
command.c : command.y
@- if f$search("ytab.c") .nes."" then delete ytab.c;*
@- if f$search("y_tab.c") .nes."" then delete y_tab.c;*
@@ -245,33 +225,148 @@ command.c : command.y
$(PARSER) $(YFLAGS) $<
@- if f$search("ytab.c") .nes."" then rename/new_vers ytab.c $@
@- if f$search("y_tab.c") .nes."" then rename/new_vers y_tab.c $@
- @- if f$search("command_tab.c").nes."" then rename/new_vers command_tab.c $@
+ @- if f$search("command_tab.c").nes."" then \
+ rename/new_vers command_tab.c $@
+
+config_vms.h : $(VMSDIR)generate_config_vms_h_gawk.com
+ $ @$(VMSDIR)generate_config_vms_h_gawk.com
-config.h : $(VMSDIR)vms-conf.h
- copy $< $@
+config.h : configh.in config_vms.h $(VMSDIR)config_h.com
+ $ @$(VMSDIR)config_h.com
$(VMSCMD) : $(VMSDIR)gawk.cld
set command $(CLDFLAGS)/object=$@ $<
# special target for loading the help text into a VMS help library
-install.help : $(VMS)gawk.hlp
+install.help : $(VMSDIR)gawk.hlp
library/help $(HELPLIB) $< /log
+
+# Build dynamic extensions - Alpha/Itanium only.
+.ifdef __VAX__
+# VAX not complete yet.
+plug_opt = [.VMS.VAX]gawk_plugin_xfer.opt
+.else
+plug_opt = [.vms]gawk_plugin.opt
+.endif
+
+ext_gawkdirfd_h = [.extension]gawkdirfd.h config.h nonposix.h
+
+extensions : filefuncs.exe fnmatch.exe inplace.exe ordchr.exe readdir.exe \
+ revoutput.exe revtwoway.exe rwarray.exe testext.exe time.exe
+
+filefuncs.exe : filefuncs.obj stack.obj gawkfts.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), stack.obj, gawkfts.obj, \
+ $(plug_opt)/opt
+
+fnmatch.exe : fnmatch.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+inplace.exe : inplace.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+ordchr.exe : ordchr.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+readdir.exe : readdir.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+revoutput.exe : revoutput.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+revtwoway.exe : revtwoway.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+rwarray.exe : rwarray.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+testext.exe : testext.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+time.exe : time.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+stack.obj : [.extension]stack.c config.h gawkapi.h \
+ [.extension]gawkfts.h, [.extension]stack.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+gawkfts.obj : [.extension]gawkfts.c config.h [.extension]gawkfts.h \
+ $(ext_gawkdirfd_h)
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H, ZOS_USS, "fchdir(x)=(-1)") \
+ /object=$(MMS$TARGET) $(MMS$SOURCE)
+
+filefuncs.obj : [.extension]filefuncs.c config.h gawkapi.h \
+ [.extension]gawkfts.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+fnmatch.obj : [.extension]fnmatch.c config.h gawkapi.h \
+ [.missing_d]fnmatch.h [.missing_d]fnmatch.c
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+inplace.obj : [.extension]inplace.c config.h gawkapi.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+ordchr.obj : [.extension]ordchr.c config.h gawkapi.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+readdir.obj : [.extension]readdir.c config.h gawkapi.h \
+ $(ext_gawkdirfd_h)
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H, HAVE_DIRENT_H) \
+ /object=$(MMS$TARGET) $(MMS$SOURCE)
+
+revoutput.obj : [.extension]revoutput.c config.h gawkapi.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+revtwoway.obj : [.extension]revtwoway.c config.h gawkapi.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H, HAVE_GETDTABLESIZE) \
+ /object=$(MMS$TARGET) $(MMS$SOURCE)
+
+rwarray.obj : [.extension]rwarray.c config.h gawkapi.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+testext.obj : [.extension]testext.c config.h gawkapi.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+time.obj : [.extension]time.c config.h gawkapi.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+
# miscellaneous other targets
tidy :
- if f$search("*.*;-1").nes."" then purge
- if f$search("[.*]*.*;-1").nes."" then purge [.*]
clean :
- - delete *.obj;*,gawk.opt;*,pgawk.opt;*,dgawk.opt;*
+ - if f$search ("*.obj") .nes. "" then delete *.obj;*
+ - if f$search ("*.lis") .nes. "" then delete *.lis;*
+ - if f$search ("gawk.opt") .nes. "" then delete gawk.opt;*
spotless : clean tidy
- - if f$search("config.h").nes."" then rename config.h config.h-old/New
+ - if f$search("config.h").nes."" then delete config.h;*
+ - if f$search("config_vms.h").nes."" then delete config_vms.h;*
- if f$search("gawk.exe").nes."" then delete gawk.exe;*
- - if f$search("pgawk.exe").nes."" then delete pgawk.exe;*
- - if f$search("dgawk.exe").nes."" then delete dgawk.exe;*
+ - if f$search("*.dsf").nes."" then delete *.dsf;*
+ - if f$search("*.map").nes."" then delete *.map;*
+ - if f$search("*.pcsi$desc").nes."" then delete *.pcsi$desc;*
+ - if f$search("*.pcsi$text").nes."" then delete *.pcsi$text;*
+ - if f$search("gawk*_src.bck").nes."" then delete gawk*_src.bck;*
+ - if f$search("*.release_notes").nes."" then delete *.release_notes;*
+ - if f$search("filefuncs.exe").nes."" then delete filefuncs.exe;*
+ - if f$search("fnmatch.exe").nes."" then delete fnmatch.exe;*
+ - if f$search("inplace.exe").nes."" then delete inplace.exe;*
+ - if f$search("ordchr.exe").nes."" then delete ordchr.exe;*
+ - if f$search("readdir.exe").nes."" then delete readdir.exe;*
+ - if f$search("revoutput.exe").nes."" then delete revoutput.exe;*
+ - if f$search("revtwoway.exe").nes."" then delete revtwoway.exe;*
+ - if f$search("rwarray.exe").nes."" then delete rwarray.exe;*
+ - if f$search("testext.exe").nes."" then delete testext.exe;*
+ - if f$search("time.exe").nes."" then delete time.exe;*
+ - if f$search("gawk_verb.cld").nes."" then delete gawk_verb.cld;*
- if f$search("gawk.dvi").nes."" then delete gawk.dvi;*
- - if f$search("[.doc]texindex.exe").nes."" then delete [.doc]texindex.exe;*
+ - if f$search("[.doc]texindex.exe").nes."" then \
+ delete [.doc]texindex.exe;*
+ - if f$search("[.cxx_repository]*.*;").nes."" then \
+ delete [.cxx_repository]*.*;*
#
# Note: this only works if you kept a copy of [.support]texindex.c
@@ -293,7 +388,8 @@ gawk.dvi : [.doc]texindex.exe [.doc]gawk.texi
@ write sys$output " Third (final) pass"
TeX gawk.texi
-@ purge
- -@ delete gawk.lis;,.aux;,gawk.%%;,.cps;,.fns;,.kys;,.pgs;,.toc;,.tps;,.vrs;
+ -@ delete \
+ gawk.lis;,.aux;,gawk.%%;,.cps;,.fns;,.kys;,.pgs;,.toc;,.tps;,.vrs;
@ rename/new_vers gawk.dvi [-]*.*
@ set default [-]