home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnuawk.zip / README_d / README.VMS < prev    next >
Text File  |  1996-12-08  |  5KB  |  104 lines

  1.  
  2. Compiling GAWK on VMS:
  3.  
  4.      There's a DCL command procedure that will issue all the necessary
  5. CC and LINK commands, and there's also a Makefile for use with the MMS
  6. utility.  From the source directory, use either
  7.  |$ @[.VMS]VMSBUILD.COM
  8. or
  9.  |$ MMS/DECRIPTION=[.VMS]DECSRIP.MMS GAWK
  10.  
  11. DEC C  -- use either vmsbuild.com or descrip.mms as is.
  12. VAX C  -- use `@vmsbuild VAXC' or `MMS/MACRO=("VAXC")'.  On a system
  13.         with both VAX C and DEC C installed where DEC C is the default,
  14.         use `MMS/MACRO=("VAXC","CC=CC/VAXC")' for the MMS variant; for
  15.         the vmsbuild.com variant, any need for `/VAXC' will be detected
  16.         automatically.
  17. GNU C  -- use `@vmsbuild GNUC' or `MMS/MACRO=("GNUC")'.  On a system
  18.         where the GCC command is not already defined, use either
  19.         `@vmsbuild GNUC DO_GNUC_SETUP' or
  20.         `MMS/MACRO=("GNUC","DO_GNUC_SETUP")'.
  21.  
  22.      Tested under Alpha/VMS V6.2 using DEC C V5.2 and under VAX/VMS V6.2
  23. using DEC C V5.2, VAX C 3.2, and GNU C 2.7.1.  GAWK should work without
  24. modifications for VMS V4.6 and up.
  25.  
  26.  
  27. Installing GAWK on VMS:
  28.  
  29.      All that's needed is a 'foreign' command, which is a DCL symbol
  30. whose value begins with a dollar sign.
  31.  |$ GAWK :== $device:[directory]GAWK
  32. (Substitute the actual location of gawk.exe for 'device:[directory]'.)
  33. That symbol should be placed in the user's login.com or in the system-
  34. wide sylogin.com procedure so that it will be defined every time the
  35. user logs on.
  36.  
  37.      Optionally, the help entry can be loaded into a VMS help library.
  38.  |$ LIBRARY/HELP SYS$HELP:HELPLIB [.VMS]GAWK.HLP
  39. (You may want to substitute a site-specific help library rather than
  40. the standard VMS library 'HELPLIB'.)  After loading the help text,
  41.  |$ HELP GAWK
  42. will provide information about both the gawk implementation and the
  43. awk programming language.
  44.  
  45.      The logical name AWK_LIBRARY can designate a default location
  46. for awk program files.  For the '-f' option, if the specified filename
  47. has no device or directory path information in it, Gawk will look in
  48. the current directory first, then in the directory specified by the
  49. translation of AWK_LIBRARY if it the file wasn't found.  If the file
  50. still isn't found, then ".awk" will be appended and the file access
  51. will be re-tried.  If AWK_LIBRARY is not defined, that portion of the
  52. file search will fail benignly.
  53.  
  54.  
  55. Running GAWK on VMS:
  56.  
  57.      Command line parsing and quoting conventions are significantly
  58. different on VMS, so examples in _The_GAWK_Manual_ or the awk book
  59. often need minor changes.  They *are* minor though, and all the awk
  60. programs should run correctly.
  61.  
  62.      Here are a couple of trivial tests:
  63.  |$ gawk -- "BEGIN {print ""Hello, World!""}"
  64.  |$ gawk -"W" version     !could also be -"W version" or "-W version"
  65. Note that upper- and mixed-case text must be quoted.
  66.  
  67.      The VMS port of Gawk includes a DCL-style interface in addition
  68. to the original shell-style interface.  See the help entry for details.
  69. One side-effect of dual command line parsing is that if there's only a
  70. single parameter (as in the quoted string program above), the command
  71. becomes ambiguous.  To work-around this, the normally optional "--"
  72. flag is required to force shell rather than DCL parsing.  If any other
  73. dash-type options (or multiple parameters such as data files to be
  74. processed) are present, there is no ambiguity and "--" can be omitted.
  75.  
  76.      The logical name AWKPATH can be used to override the default
  77. search path of "SYS$DISK:[],AWK_LIBRARY:" when looking for awk program
  78. files specified by the '-f' option.  The format of AWKPATH is a comma-
  79. separated list of directory specifications.  When defining it, the
  80. value should be quoted so that it retains a single translation, not a
  81. multi-translation RMS searchlist.
  82.  
  83.  
  84. Building and using GAWK under VMS POSIX:
  85.  
  86.      Ignore the instructions above, although vms/gawk.hlp should still
  87. be made available in a help library.  The source tree should be unpacked
  88. into a container file subsystem rather than into the ordinary VMS file
  89. system.  Make sure that the two scripts, 'configure' and 'vms/posix-cc.sh',
  90. are executable; use `chmod +x' on them if necessary.  Then execute the
  91. following two commands:
  92.  |psx> CC=vms/posix-cc.sh configure
  93.  |psx> make CC=c89 gawk
  94. The first command will construct files "config.h" and "Makefile" out
  95. of templates, using a script to make the C compiler fit 'configure's
  96. expectations.  The second command will compile and link 'gawk' using
  97. the C compiler directly; ignore any warnings from `make' about being
  98. unable to redefine "CC".  The configure script will take a very long
  99. time to execute, but at least it provides incremental feedback as it
  100. runs.
  101.  
  102.      Tested with VAX/VMS V6.2 + VMS POSIX V2.0 + DEC C V5.2.
  103.  
  104.