home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume29 / parseargs / part02 / VMSbuild.com < prev   
Text File  |  1992-05-19  |  2KB  |  79 lines

  1. $! --- VMSbuild.com ---
  2. $!
  3. $! Build the ParseArgs suite under VMS
  4. $!
  5. $! Luke Brennan                             e-mail: brennan@coco.cchs.su.oz.AU
  6. $! EDP Unit, S209                                   lukeb@casino.cchs.su.oz.AU
  7. $!                                    brennan%coco.cchs.su.oz.au@cunyvm.BITNET
  8. $! Cumberland College of Health Sciences,                              ,-_|\  
  9. $! The University of Sydney                  voice: +61 2 646 6402    /     \ 
  10. $! East Street, Lidcombe, NSW 2141             fax: +61 2 646 4853    \_,-._* 
  11. $! AUSTRALIA                                                               v  
  12. $!
  13. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  14. $!
  15. $ If (P1 .nes. "")
  16. $ Then OPSYS := 'P1'
  17. $ Else OPSYS := 'f$getsyi("node_SWtype")'
  18. $ EndIF
  19. $!
  20. $!
  21. $ If (OPSYS .eqs. "UNIX")
  22. $ Then use_pager := /Define="""USE_PAGER"""
  23. $ Else use_pager :=
  24. $ EndIF
  25. $ os_style    = f$edit(OPSYS,"LOWERCASE") + "_style"
  26. $ os_library := LIB'opsys'ARGS.OLB
  27. $!
  28. $!
  29. $! compile the appropriate source files
  30. $!
  31. $ CC /Include=([]) 'OPSYS'_Args    /Define="''os_style'"
  32. $ CC /Include=([]) Xparse        /Define="''os_style'"
  33. $ CC /Include=([]) ArgType        /Define="''os_style'"
  34. $ CC /Include=([]) STRfuncs        /Define="''os_style'"
  35. $ CC /Include=([]) ArgList
  36. $ CC /Include=([]) PgOpen        'use_pager'
  37. $ CC /Include=([]) SYSerr
  38. $ CC /Include=([]) Vprintf
  39. $ CC /Include=([]) WinSize
  40. $!
  41. $! make the archive library
  42. $!
  43. $ If (f$search("''os_library'") .nes. "") Then Delete 'os_library';
  44. $ Library/Object/Create 'os_library'        -
  45.     'opsys'_args, arglist, argtype, pgopen,    -
  46.      strfuncs, syserr, vprintf, winsize, xparse
  47. $!
  48. $!
  49. $! VMS requires an OPTIONS file for correct linkage with the C libraries
  50. $ If (f$search("VMS_C_OPTIONS.OPT") .eqs. "") Then GoSub Make_Opts_File
  51. $!
  52. $!
  53. $! now we can build the actual executables..
  54. $!
  55. $ CC /Include=([]) Stest
  56. $ Link /Executable='OPSYS'_test -
  57.         Stest,'os_library'/Library,VMS_C_Options/OPTION
  58. $!
  59. $ CC /Include=([]) Unix_Man
  60. $ CC /Include=([]) ParseArgs
  61. $ Link /Executable=ParseArgs -
  62.         ParseArgs,Unix_Man,'os_library'/Library,VMS_C_Options/OPTION
  63. $!
  64. $ Exit
  65. $!
  66. $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  67. $!
  68. $MAKE_OPTS_FILE:
  69. $ Open/WRITE fd VMS_C_Options.opt
  70. $ Write fd -
  71. "! Default system options file to link against the sharable C runtime library"
  72. $ Write fd "!"
  73. $ Write fd "Sys$Share:VaxCrtl/share"
  74. $ Write fd " "
  75. $ Close fd
  76. $!
  77. $ Return
  78.  
  79.