home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnuawk.zip / vms / vmsbuild.com < prev    next >
Text File  |  1997-04-15  |  3KB  |  108 lines

  1. $! vmsbuild.com -- Commands to build GAWK        Pat Rankin, Dec'89
  2. $!                               revised, Mar'90
  3. $!                        gawk 2.13  revised, Jun'91
  4. $!                        gawk 2.14  revised, Sep'92
  5. $!                        gawk 2.15  revised, Oct'93
  6. $!                        gawk 3.0   revised, Dec'95
  7. $!                        gawk 3.0.1 revised, Nov'96
  8. $!
  9. $ REL = "3.0"    !release version number
  10. $ PATCHLVL = "3"
  11. $!
  12. $!
  13. $ CCFLAGS = "/noList"    ! "/noOpt/Debug"
  14. $ CDEFS      = "GAWK,HAVE_CONFIG_H"
  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])/Obj=[]/Def=(''CDEFS')''CCFLAGS'"
  23. $   LIBS = "gnu_cc:[000000]gcclib.olb/Library,sys$library:vaxcrtl.olb/Library"
  24. $   if p2.eqs."DO_GNUC_SETUP" then  set command gnu_cc:[000000]gcc
  25. $ else    !!GNUC
  26. $  if p1.eqs."VAXC"
  27. $  then
  28. $!  always VAX; version V3.x of VAX C assumed (for V2.x, remove /Opt=noInline)
  29. $   CC = "cc"
  30. $   if f$trnlnm("DECC$CC_DEFAULT").nes."" then  CC = "cc/VAXC"
  31. $   CFLAGS = "/Incl=[]/Obj=[]/Opt=noInline/Def=(''CDEFS')''CCFLAGS'"
  32. $   LIBS = "sys$share:vaxcrtl.exe/Shareable"
  33. $  else  !!VAXC
  34. $!  neither GNUC nor VAXC, assume DECC (same for either VAX or Alpha)
  35. $   CC = "cc/DECC/Prefix=All"
  36. $   CFLAGS = "/Incl=[]/Obj=[]/Def=(''CDEFS')''CCFLAGS'"
  37. $   LIBS = ""    ! DECC$SHR instead of VAXCRTL, no special link option needed
  38. $  endif !VAXC
  39. $ endif !GNUC
  40. $!
  41. $ cc = CC + CFLAGS
  42. $ show symbol cc
  43. $!
  44. $ if f$search("config.h").nes."" then -
  45.     if f$cvtime(f$file_attr("config.h","RDT")).ges.-
  46.        f$cvtime(f$file_attr("[.vms]vms-conf.h","RDT")) then  goto config_ok
  47. $ v = f$verify(1)
  48. $ copy [.vms]vms-conf.h []config.h
  49. $! 'f$verify(v)'
  50. $config_ok:
  51. $ if f$search("awktab.c").nes."" then  goto awktab_ok
  52. $    write sys$output " You must process `awk.y' with ""yacc"" or ""bison"""
  53. $    if f$search("awk_tab.c").nes."" then -    !bison was run manually
  54.       write sys$output " or else rename `awk_tab.c' to `awktab.c'."
  55. $    if f$search("ytab.c").nes."" .or. f$search("y_tab.c").nes."" then - !yacc
  56.       write sys$output " or else rename `ytab.c' or `y_tab.c' to `awktab.c'."
  57. $    exit
  58. $awktab_ok:
  59. $ v = f$verify(1)
  60. $ cc array.c
  61. $ cc builtin.c
  62. $ cc eval.c
  63. $ cc field.c
  64. $ cc gawkmisc.c
  65. $ cc io.c
  66. $ cc main.c
  67. $ cc missing.c
  68. $ cc msg.c
  69. $ cc node.c
  70. $ cc re.c
  71. $ cc version.c
  72. $ cc awktab.c
  73. $ cc getopt.c
  74. $ cc getopt1.c
  75. $ cc regex.c
  76. $ cc dfa.c
  77. $ cc random.c
  78. $ cc/Define=('CDEFS',"STACK_DIRECTION=(-1)","exit=vms_exit") alloca.c
  79. $ cc [.vms]vms_misc.c
  80. $ cc [.vms]vms_popen.c
  81. $ cc [.vms]vms_fwrite.c
  82. $ cc [.vms]vms_args.c
  83. $ cc [.vms]vms_gawk.c
  84. $ cc [.vms]vms_cli.c
  85. $ set command/Object=[]gawk_cmd.obj [.vms]gawk.cld
  86. $! 'f$verify(v)'
  87. $!
  88. $ close/noLog Fopt
  89. $ create gawk.opt
  90. ! GAWK -- GNU awk
  91. array.obj,builtin.obj,eval.obj,field.obj,gawkmisc.obj
  92. io.obj,main.obj,missing.obj,msg.obj,node.obj,re.obj,version.obj,awktab.obj
  93. getopt.obj,getopt1.obj,regex.obj,dfa.obj,random.obj,alloca.obj
  94. []vms_misc.obj,vms_popen.obj,vms_fwrite.obj,vms_args.obj
  95. []vms_gawk.obj,vms_cli.obj,gawk_cmd.obj
  96. psect_attr=environ,noshr    !extern [noshare] char **
  97. stack=48    !preallocate more pages (default is 20)
  98. iosegment=128    !ditto (default is 32)
  99. $ open/append Fopt gawk.opt
  100. $ write Fopt libs
  101. $ write Fopt "identification=""V''REL'.''PATCHLVL'"""
  102. $ close Fopt
  103. $!
  104. $ v = f$verify(1)
  105. $ link/exe=gawk.exe gawk.opt/options
  106. $! 'f$verify(v)'
  107. $ exit
  108.