BUILD.COM 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. $!
  2. $! This command procedure compiles and links BISON for VMS.
  3. $! BISON has been tested with VAXC version 2.3 and VMS version 4.5
  4. $! and on VMS 4.5 with GCC 1.12.
  5. $!
  6. $! Bj|rn Larsen blarsen@ifi.uio.no
  7. $! With some contributions by Gabor Karsai,
  8. $! KARSAIG1%VUENGVAX.BITNET@jade.berkeley.edu
  9. $! All merged and cleaned by RMS.
  10. $!
  11. $! Adapted for both VAX-11 "C" and VMS/GCC compilation by
  12. $! David L. Kashtan kashtan.iu.ai.sri.com
  13. $!
  14. $! Uncomment the appropriate compilation command (CC=VAX-11 "C", GCC=VMS/GCC)
  15. $ cc_command:="CC"
  16. $! cc_command:="GCC"
  17. $!
  18. $! Note: Change the directories immediately below to whereever
  19. $! you have placed bison.simple & hairy
  20. $!
  21. $ if "''cc_command'" .nes. "CC" then goto Try_GCC
  22. $ cc_options:="/NOLIST/define=(""index=strchr"",""rindex=strrchr"",""XPFILE=""""DISK_USE:[BISON]bison.simple"""""",""XPFILE1=""""DISK_USE:[BISON]bison.hairy"""""")"
  23. $ extra_linker_files:="VMSHLP,"
  24. $ goto Compile
  25. $!
  26. $! VMS/GCC compilation:
  27. $!
  28. $ Try_GCC:
  29. $ if "''cc_command'" .nes. "GCC" then goto Fail
  30. $ cc_options:="/DEBUG"
  31. $ extra_linker_files:="GNU_CC:[000000]GCCLIB/LIB,"
  32. $ goto Compile
  33. $!
  34. $! Unknown compiler type
  35. $!
  36. $ Fail:
  37. $ write sys$output "Unknown compiler type: ''cc_command'"
  38. $ exit
  39. $!
  40. $! Do the compilation (compiler type is all set up)
  41. $!
  42. $ Compile:
  43. $ if "''p1'" .eqs. "LINK" then goto Link
  44. $ 'cc_command' 'cc_options' files.c
  45. $ 'cc_command' 'cc_options' LR0.C
  46. $ 'cc_command' 'cc_options' ALLOCATE.C
  47. $ 'cc_command' 'cc_options' CLOSURE.C
  48. $ 'cc_command' 'cc_options' CONFLICTS.C
  49. $ 'cc_command' 'cc_options' DERIVES.C
  50. $ 'cc_command' 'cc_options' VMSGETARGS.C
  51. $ 'cc_command' 'cc_options' GRAM.C
  52. $ 'cc_command' 'cc_options' LALR.C
  53. $ 'cc_command' 'cc_options' LEX.C
  54. $ 'cc_command' 'cc_options' MAIN.C
  55. $ 'cc_command' 'cc_options' NULLABLE.C
  56. $ 'cc_command' 'cc_options' OUTPUT.C
  57. $ 'cc_command' 'cc_options' PRINT.C
  58. $ 'cc_command' 'cc_options' READER.C
  59. $ 'cc_command' 'cc_options' REDUCE.C
  60. $ 'cc_command' 'cc_options' SYMTAB.C
  61. $ 'cc_command' 'cc_options' WARSHALL.C
  62. $ if "''cc_command'" .eqs. "CC" then macro vmshlp.mar
  63. $ Link:
  64. $ link/exec=bison main,LR0,allocate,closure,conflicts,derives,files,-
  65. vmsgetargs,gram,lalr,lex,nullable,output,print,reader,reduce,symtab,warshall,-
  66. 'extra_linker_files'sys$library:vaxcrtl/lib