home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ckc095.zip / ckvmak.com < prev    next >
Text File  |  1989-08-31  |  3KB  |  99 lines

  1. $! DEC/CMS REPLACEMENT HISTORY, Element CKVMAK.COM
  2. $! *7    23-APR-1989 17:23:20 BUDA "Minor fixes"
  3. $! *6    16-APR-1989 17:55:12 BUDA "General clean up"
  4. $! *5    11-APR-1989 23:41:39 BUDA "Fix build class"
  5. $! *4    11-APR-1989 23:37:05 BUDA "Fix CMS Fetching"
  6. $! *3    11-APR-1989 23:32:22 BUDA "Automatically find called procedures"
  7. $! *2    11-APR-1989 23:25:20 BUDA "Add CMS support"
  8. $! *1    11-APR-1989 22:56:36 BUDA "Initial creation"
  9. $! DEC/CMS REPLACEMENT HISTORY, Element CKVMAK.COM
  10. $    SAVE_VERIFY = 'F$VERIFY(0) + F$VERIFY(0'CKVMAK_VERIFY' .GT. 0)
  11. $    ON CONTROL_Y THEN GOTO ABNORMAL_EXIT
  12. $    ON WARNING THEN GOTO ABNORMAL_EXIT
  13. $!
  14. $! CKVMAK.COM    1.0 (002)+ 23-Mar-1989
  15. $!
  16. $! The SOURCE file is processed to create the OUTPUT file.  This command
  17. $! checks creation dates and does not compile if both files are present
  18. $! and the OUTPUT file is newer (younger) than the SOURCE file.
  19. $!
  20. $! Usage:
  21. $!
  22. $!    CKVMAK [SOURCE] [OUTPUT] [P3] [P4]
  23. $!
  24. $! input:
  25. $!    P1    Source file specification.
  26. $!    P2    Output file specification.  The name defaults to that
  27. $!        of the source file, and the type defaults to ".OBJ".
  28. $!    P3    Additional qualifiers for the CC command.
  29. $!    P4    Name of object library.
  30. $!    CKVMAK_VERIFY    If defined and positive, causes verification
  31. $!            of this command file.
  32. $!
  33. $! Modifications
  34. $!
  35. $!    24-Mar-1989    MAB
  36. $!            Add object library code
  37. $!
  38. $!    24-Jun-85    Save and restore verification, and exit on any
  39. $!            errors.  Use F$PARSE to default the name and
  40. $!            type of the output file. -- Dan Schullman
  41. $!
  42. $    delete = "delete"
  43. $    SOURCE = P1
  44. $    IF SOURCE .EQS. "" THEN INQUIRE SOURCE "C Source File"
  45. $    SOURCE = F$PARSE(SOURCE,".C")
  46. $    cms_source = f$parse(source,,,"NAME") + f$parse(".C",source,,"TYPE")
  47. $    file_present = (f$search(source) .nes. "")
  48. $    OUTPUT = F$PARSE(P2,".OBJ",SOURCE)
  49. $    name = f$parse(output,,,"NAME")
  50. $    objlib = p4
  51. $    if objlib .eqs. "" then inquire objlib "Object library name"
  52. $    objlib = f$parse(objlib,".OLB")
  53. $!
  54. $! Continue at must_process if either file is missing or the source is younger
  55. $! A missing SOURCE is, of course, an error -- but one that should be
  56. $! caught by the "normal" command.
  57. $!
  58. $    if f$search("''objlib'") .eqs. "" then libr/create/object 'objlib'
  59. $    if file_present then goto check_dates
  60. $    cms fet/nohist/nolog 'cms_source'/gen='ckv_build_class' ""
  61. $check_dates:
  62. $    @'ckv_proc_loc'ckvcdt 'source' 'objlib' ckv$flag
  63. $    if ckv$flag then goto must_process
  64. $    WRITE SYS$OUTPUT OUTPUT," is up to date."
  65. $    GOTO NORMAL_EXIT
  66. $!
  67. $! Come here to build OUTPUT from SOURCE
  68. $!
  69. $MUST_PROCESS:
  70. $    set on
  71. $!
  72. $! Insert commands to create OUTPUT from SOURCE here, for example:
  73. $!
  74. $    WRITE SYS$OUTPUT OUTPUT, " <= ", SOURCE
  75. $    CC/NOLIST/OBJECT='OUTPUT''P3' 'SOURCE'
  76. $    libr/replace 'objlib' 'output'
  77. $    GOTO NORMAL_EXIT
  78. $!
  79. $! Abnormal exit.
  80. $!
  81. $ABNORMAL_EXIT:
  82. $    STATUS = $STATUS            !save failure status
  83. $    IF STATUS THEN STATUS = "%X08000002"    !force error if neccessary
  84. $    GOTO EXIT
  85. $!
  86. $! Normal exit.
  87. $!
  88. $NORMAL_EXIT:
  89. $    STATUS = $STATUS            !save success status
  90. $!
  91. $! Exit.
  92. $!
  93. $EXIT:
  94. $    if .NOT. file_present .and. f$search(source) .nes. "" then -
  95.         delete 'source'
  96. $    if f$search("''output'") .nes. "" then delete 'output'
  97. $    EXIT ('STATUS' .OR. %X10000000) + F$VERIFY(SAVE_VERIFY) * 0
  98.  
  99.