PROCEDURE compile_site_tape_hooks, comsth (
  list, l: file = $list
  alternate_catalog, ac: file = $optional
  status)

*IF $variable(wev$proc_doc,declared)<>'UNKNOWN'

" The purpose of this procedure is to compile the RMM$VALIDATE_TAPE_OPERATIONS and
" RMM$ENFORCE_TAPE_SECURITY source decks (found on the source library under
" the SITE_OS_MAINTENANCE catalog) and place the resulting binary onto
" OSF$BOUND_JOB_TEMPLATE_23D (also under the SITE_OS_MAINTENANCE catalog).
" The presence of the library OSF$BOUND_JOB_TEMPLATE_23D under the
" SITE_OS_MAINTENANCE catalog causes the load modules
" to be automatically merged onto the released OSF$BOUND_JOB_TEMPLATE_23D
" library upon the next execution of MAKE_VE_DEADSTART_FILE.
"
" If the OS files have been installed to an alternate catalog this should be
" specified by the ALTERNATE_CATALOG parameter.
*IFEND


  VAR
    binary_output: file = $unique($local)
    compile_source: file = $unique($local)
    ignore_status: status
    local_status: status
    osf$bound_job_template_23d: file = $system.site_os_maintenance.osf$bound_job_template_23d
    osf$program_interface: file = $system.cybil.osf$program_interface
    osf$subsystem_interface: file = $system.cybil.osf$subsystem_interface
  VAREND

  SOURCE_CODE_UTILITY
    IF $specified(alternate_catalog) THEN
      use_library b=alternate_catalog.source_library r=$null
    ELSE
      use_library b=$system.site_os_maintenance.source_library r=$null
    IFEND

    expand_deck d=(rmm$enforce_tape_security rmm$validate_tape_operations) ..
          c=compile_source ab=(osf$program_interface osf$subsystem_interface)
  QUIT

  cybil i=compile_source b=binary_output l=list opt=high rc=none da=none

  CREATE_OBJECT_LIBRARY
    file_attrib = $file_attributes(osf$bound_job_template_23d (registered, ..
          size))
    IF file_attrib(1).registered AND (file_attrib(1).size > 0) THEN
      add_modules l=osf$bound_job_template_23d
    IFEND
    combine_module l=binary_output
    generate_library l=osf$bound_job_template_23d
    put_line ' Compiled to '//osf$bound_job_template_23d.$high o=$response
  QUIT

  delete_file binary_output status=ignore_status
  delete_file compile_source status=ignore_status

  EXIT_PROC WITH local_status

PROCEND compile_site_tape_hooks
