home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / zip / gnu / gawk213s.lzh / GAWK213S / DESCRIP.MMS < prev    next >
Text File  |  1993-07-29  |  7KB  |  201 lines

  1. # Descrip.MMS -- Makefile for building GNU Awk on VMS with VAXC and MMS.
  2. #
  3. # usage:
  4. #  $ MMS /Description=[.vms]Descrip.MMS gawk
  5. #
  6. # gawk.exe :
  7. #    You'll need to modify this Makefile to use gcc or vaxc v2.x rather
  8. #    than vaxc v3.x.  Change the CFLAGS macro definition (move '#' from
  9. #    beginning of 2nd alternative to beginning of 1st), and also perhaps
  10. #    enable the following ".first" rule and its associated action.  For
  11. #    GNU C, change the LIBS macro definition.
  12. #
  13. # awk_tab.c :
  14. #    If you have DEC/Shell, change the PARSER and PASERINIT macros to use
  15. #    yacc rather than bison.  If you have neither yacc nor bison, you'll
  16. #    have to make sure that the distributed version of "awk.tab.c" is
  17. #    named "awk_tab.c" and that its modification date is later than the
  18. #    date of "awk.y", so that MMS won't try to build that target.  If you
  19. #    use bison and it is already defined system-wide, comment out the
  20. #    PARSERINIT definition.
  21. #
  22. # install.help :
  23. #    You can make the target 'install.help' to load the VMS help text
  24. #    into a help library.  Modify the HELPLIB macro if you don't want
  25. #    to put entry into the regular VMS library.  (If you use an alternate
  26. #    help library, it must already exist; this target won't create it.)
  27. #
  28. # gawk.dvi :
  29. #    If you have TeX, you can make the target 'gawk.dvi' to process
  30. #    _The_GAWK_Manual_ from gawk.texinfo.  You'll need to use a device
  31. #    specific post-processor on gawk.dvi in order to get printable data.
  32. #
  33.  
  34. # location of the VMS-specific files, relative to the 'main' directory
  35. VMSDIR    = [.vms]
  36. MAKEFILE = $(VMSDIR)Descrip.MMS
  37.  
  38. # debugging &c        !'ccflags' is an escape to allow external compile flags
  39. #CCFLAGS = /noOpt/Debug
  40.  
  41. # work within the main directory, even when handling files in [.vms]
  42. #    note: use 2nd variant for either VAX C V2.x or for GNU C
  43. CFLAGS    = /Include=[]/Object=[]/Opt=noInline $(CCFLAGS)
  44. #CFLAGS    = /Include=([],$(VMSDIR))/Object=[] $(CCFLAGS)
  45.  
  46. # uncomment this for GNU C
  47. #CC    = gcc
  48.  
  49. # uncomment these two lines for GNU C _if_ it's not installed system-wide
  50. #.first        !compiler init, needed if there's no system-wide setup
  51. #    set command gnu_cc:[000000]gcc
  52.  
  53. # uncomment these three lines for VAX C V2.x
  54. #.first        !compiler init, find all #include files
  55. #    define/nolog vaxc$library sys$library:,sys$disk:$(VMSDIR)
  56. #    define/nolog c$library [],$(VMSDIR)
  57. #!(it appears that if vaxc$library is defined, then the /Include
  58. #! qualifier is ignored, making a c$library definition essential)
  59.  
  60. # run-time libraries; use the 2nd one for GNU C
  61. LIBS    = sys$share:vaxcrtl.exe/Shareable
  62. #LIBS    = gnu_cc:[000000]gcclib.olb/Library,sys$library:vaxcrtl.olb/Library
  63.  
  64. PARSER    = bison
  65. PARSERINIT = set command gnu_bison:[000000]bison
  66. #PARSER    = yacc
  67. #PARSERINIT = yacc := $shell$exe:yacc
  68.  
  69. # this is used for optional target 'install.help'
  70. HELPLIB = sys$help:helplib.hlb
  71. #HELPLIB = sys$help:local.hlb
  72.  
  73. #
  74. ########  nothing below this line should need to be changed  ########
  75. #
  76.  
  77. # ALLOCA
  78. ALLOCA    = alloca.obj
  79.  
  80. # object files
  81. AWKOBJS = main.obj,eval.obj,builtin.obj,msg.obj,iop.obj,io.obj,\
  82.     field.obj,array.obj,node.obj,version.obj,missing.obj,re.obj
  83.  
  84. ALLOBJS = $(AWKOBJS),awk_tab.obj
  85.  
  86. # GNUOBJS
  87. #    GNU stuff that gawk uses as library routines.
  88. GNUOBJS = regex.obj,dfa.obj,$(ALLOCA)
  89.  
  90. # VMSOBJS
  91. #    VMS specific stuff
  92. VMSCODE = vms_misc.obj,vms_popen.obj,vms_fwrite.obj,vms_args.obj,\
  93.     vms_gawk.obj,vms_cli.obj
  94. VMSCMD    = gawk_cmd.obj            # built from .cld file
  95. VMSOBJS = $(VMSCODE),$(VMSCMD)
  96.  
  97. VMSSRCS = $(VMSDIR)vms_misc.c,$(VMSDIR)vms_popen.c,$(VMSDIR)vms_fwrite.c,\
  98.     $(VMSDIR)vms_args.c,$(VMSDIR)vms_gawk.c,$(VMSDIR)vms_cli.c
  99. VMSHDRS = $(VMSDIR)vms.h,$(VMSDIR)fcntl.h,$(VMSDIR)varargs.h,$(VMSDIR)unixlib.h
  100. VMSOTHR = $(VMSDIR)Descrip.MMS,$(VMSDIR)vmsbuild.com,$(VMSDIR)version.com,\
  101.     $(VMSDIR)gawk.hlp
  102.  
  103. # Release of gawk
  104. REL=2.13
  105. PATCHLVL=2
  106.  
  107. # dummy target to allow building "gawk" in addition to explicit "gawk.exe"
  108. gawk : gawk.exe
  109.     write sys$output " GAWK "
  110.  
  111. # rules to build gawk
  112. gawk.exe : $(ALLOBJS) $(GNUOBJS) $(VMSOBJS) gawk.opt
  113.     $(LINK) $(LINKFLAGS) gawk.opt/options
  114.  
  115. gawk.opt : $(MAKEFILE)            # create linker options file
  116.     open/write opt gawk.opt        ! ~ 'cat <<close >gawk.opt'
  117.     write opt "! GAWK -- Gnu AWK"
  118.       @ write opt "$(ALLOBJS)"
  119.       @ write opt "$(GNUOBJS)"
  120.       @ write opt "$(VMSOBJS)"
  121.       @ write opt "$(LIBS)"
  122.       @ write opt "psect_attr=environ,noshr        !extern [noshare] char **"
  123.       @ write opt "stack=50        !preallocate more pages (default is 20)"
  124.     write opt "identification=""V$(REL).$(PATCHLVL)"""
  125.     close opt
  126.  
  127. $(AWKOBJS)    : awk.h config.h
  128. $(VMSCODE)    : awk.h config.h $(VMSDIR)vms.h
  129. vms_misc.obj    : $(VMSDIR)vms_misc.c
  130. vms_popen.obj    : $(VMSDIR)vms_popen.c
  131. vms_fwrite.obj    : $(VMSDIR)vms_fwrite.c
  132. vms_args.obj    : $(VMSDIR)vms_args.c
  133. vms_gawk.obj    : $(VMSDIR)vms_gawk.c
  134. vms_cli.obj    : $(VMSDIR)vms_cli.c
  135. dfa.obj        : awk.h config.h dfa.h
  136. regex.obj    : awk.h config.h regex.h
  137. main.obj    : patchlevel.h
  138. awk_tab.obj    : awk.h awk_tab.c
  139.  
  140. # bison or yacc required
  141. awk_tab.c    : awk.y        # foo.y :: yacc => y_tab.c, bison => foo_tab.c
  142.      @- if f$search("y_tab.c").nes."" then  delete y_tab.c;*
  143.       - $(PARSERINIT)
  144.     $(PARSER) $(YFLAGS) $<
  145.      @- if f$search("y_tab.c").nes."" then  rename/new_vers y_tab.c $@    !yacc
  146.  
  147. ##version.c    : version.sh $(MAKEFILE)
  148. ##     @$(VMSDIR)version.com "$(REL)"
  149.  
  150. config.h    : [.config]vms-conf.h
  151.     copy $< $@
  152.  
  153. # Alloca - C simulation
  154. alloca.obj    : alloca.c
  155.     $(CC) $(CFLAGS) /define=("STACK_DIRECTION=(-1)","exit=vms_exit") $<
  156.  
  157. $(VMSCMD)    : $(VMSDIR)gawk.cld
  158.     set command/object=$@ $(CLDFLAGS) $<
  159.  
  160. # special target for loading the help text into a VMS help library
  161. install.help    : $(VMS)gawk.hlp
  162.     library/help $(HELPLIB) $< /log
  163.  
  164. # miscellaneous other targets
  165. tidy :
  166.       - if f$search("*.*;-1").nes."" then  purge
  167.       - if f$search("[.*]*.*;-1").nes."" then  purge [.*]
  168.  
  169. clean :
  170.       - delete *.obj;*,gawk.opt;*
  171.  
  172. spotless : clean tidy
  173.       - delete gawk.dvi;*,gawk.exe;*,[.support]texindex.exe;*
  174.  
  175. #
  176. # build gawk.dvi from within the 'support' subdirectory
  177. #
  178. gawk.dvi : [.support]texindex.exe gawk.texinfo
  179.       @ set default [.support]
  180.       @ write sys$output " Warnings from TeX are expected during the first pass"
  181.     TeX [-]gawk.texinfo
  182.     mcr []texindex gawk.cp gawk.fn gawk.ky gawk.pg gawk.tp gawk.vr
  183.       @ write sys$output " Second pass"
  184.     TeX [-]gawk.texinfo
  185.     mcr []texindex gawk.cp gawk.fn gawk.ky gawk.pg gawk.tp gawk.vr
  186.       @ write sys$output " Third (final) pass"
  187.     TeX [-]gawk.texinfo
  188.      -@ purge
  189.      -@ delete gawk.lis;,.aux;,gawk.%%;,.cps;,.fns;,.kys;,.pgs;,.toc;,.tps;,.vrs;
  190.       @ rename/new_vers gawk.dvi [-]*.*
  191.       @ set default [-]
  192.  
  193. [.support]texindex.exe : [.support]texindex.c
  194.       @ set default [.support]
  195.     $(CC) /noOpt/noList/Define=("lines=tlines") texindex.c
  196.     $(LINK) /noMap texindex.obj,sys$library:vaxcrtl.olb/Lib
  197.      -@ delete texindex.obj;*
  198.       @ set default [-]
  199.  
  200. #eof
  201.