home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / gcc / make-cccp.com < prev    next >
Text File  |  1994-07-11  |  2KB  |  80 lines

  1. $! Set the def dir to proper place for use in batch. Works for interactive too.
  2. $flnm = f$enviroment("PROCEDURE")     ! get current procedure name
  3. $set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")'
  4. $!
  5. $!    Build the GNU "C" pre-processor on VMS
  6. $!
  7. $!  Note:  to build with DEC's VAX C compiler, uncomment the 2nd CC, CFLAGS,
  8. $!       and LIBS alternatives, and also execute the following command:
  9. $!    DEFINE SYS SYS$LIBRARY:
  10. $
  11. $!
  12. $!    C compiler
  13. $!
  14. $ CC    =    "gcc"
  15. $! CC    =    "cc"    !uncomment for VAXC
  16. $ BISON    =    "bison"
  17. $ RENAME=    "rename/New_Version"
  18. $ LINK    =    "link"
  19. $ echo    =    "write sys$output"
  20. $!
  21. $!    Compiler options
  22. $!
  23. $ CFLAGS =    "/Debug/noVerbos"
  24. $! CFLAGS =    "/noOpt"    !uncomment for VAXC
  25. $!
  26. $!    Link options
  27. $!
  28. $ LDFLAGS =    "/noMap"
  29. $!
  30. $!    Link libraries
  31. $!
  32. $ LIBS = "gnu_cc:[000000]gcclib.olb/Libr,sys$library:vaxcrtl.olb/Libr"
  33. $! LIBS = "alloca.obj,sys$library:vaxcrtl.olb/Libr"    !uncomment for VAXC
  34. $
  35. $!!!!!!!
  36. $!    Nothing beyond this point should need any local configuration changes.
  37. $!!!!!!!
  38. $
  39. $ if "''p1'" .eqs. "LINK" then goto Link
  40. $ echo " Building the preprocessor."
  41. $ set verify
  42. $ 'CC''CFLAGS' cccp.c
  43. $!'f$verify(0)
  44. $ t1:='f$search("CEXP.C")'
  45. $ if "''t1'" .eqs. "" then goto 10$
  46. $ t1:='f$file_attributes("CEXP.Y","RDT")'
  47. $ t1:='f$cvtime(t1)'
  48. $ t2:='f$file_attributes("CEXP.C","RDT")'
  49. $ t2:='f$cvtime(t2)'
  50. $ if t1 .les. t2 then goto 20$
  51. $10$:
  52. $ set verify
  53. $ 'BISON' cexp.y
  54. $ 'RENAME' cexp_tab.c cexp.c
  55. $!'f$verify(0)
  56. $20$:
  57. $!
  58. $ if f$locate("alloca.obj",f$edit(LIBS,"lowercase")).lt.f$length(LIBS)
  59. $ then
  60. $  set verify
  61. $ 'CC''CFLAGS'/Define="STACK_DIRECTION=(-1)" alloca.c        !#'f$verify(1)
  62. $!'f$verify(0)
  63. $ endif
  64. $!
  65. $ echo " (Ignore any warning about not finding file ""bison.simple"".)"
  66. $ set verify
  67. $ 'CC''CFLAGS' cexp.c
  68. $ 'CC''CFLAGS' version.c
  69. $!'f$verify(0)
  70. $Link:
  71. $ echo " Linking the preprocessor."
  72. $ set verify
  73. $ 'LINK''LDFLAGS'/Exe=gcc-cpp.exe cccp.obj,cexp.obj,version.obj,version.opt/Opt,-
  74.       'LIBS'
  75. $!'f$verify(0)
  76. $!
  77. $!    Done
  78. $!
  79. $ exit
  80.