home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / c-kermit / cklmak.cm < prev    next >
Text File  |  2020-01-01  |  4KB  |  137 lines

  1. &begin_parameters
  2.  SRCDIR option(-source_dir),pathname,='(current_dir)'
  3.  BLDDIR option(-build_dir),pathname,='(current_dir)>build_dir'
  4.  COPTS  option(-compile_options),string,='-type_checking normal'
  5.  BOPTS  option(-bind_options),string,=''
  6.  KNAME  option(-kermit_name),name,length(29),='kermit'
  7.  KOPTS  option(-kermit_options),string, &+
  8.     ='STRATUS DYNAMIC DCMDBUF CLSOPN STRATUSX25 MYCURSES TCPSOCKET NOTCPOPTS'
  9.  TOOL   switch(-tools),=1
  10.  DBG    switch(-debug),secret,=0
  11. &end_parameters
  12.  
  13. & Modified May 1998 by David Lane for C-Kermit 6.1 and add TCP/IP support.
  14. &
  15. & Modified March 7,1997 by Kernie Brashier <kernie@stratosphere.com>
  16. & to support C-Kermit Version 6 for VOS. Wherever possible I have left David's
  17. & original port in tact.
  18. &
  19. & Command macro to produce C-Kermit for VOS.  This has been successfully
  20. & tested on VOS 10.5 CISC, and 11.5.1, both RISC and CISC versions, with and
  21. & without X.25 and/or OS TCP/IP support.  This command macro rebuilds the
  22. & world every time it is run, there is no "incremental" build of only
  23. & changed modules.  This is left as an exercise for the reader.
  24.  
  25. &if &DBG& &then &echo macro_lines input_lines command_lines
  26.  
  27. &if &BLDDIR& = &SRCDIR& &then &goto same_dir_error
  28. &if (process_type) = batch &then &goto noterm
  29. &set PLINES (terminal_info pause_lines)
  30. !set_terminal_parameters -pause_lines 0
  31.  
  32. &label noterm
  33.  
  34. & Work around an incompatible include file change...
  35. &set_string rel (reverse (before (reverse (module_info system_release)) ' '))
  36. &set_string rel (before &$rel& '.')
  37. &if &rel& < 13
  38.    &then &set_string KOPTS (concat (quote &KOPTS&) ' GET_PORT_INFO_IS_STRUCT')
  39.  
  40. &set_string mydir (current_dir)
  41. !change_current_dir &BLDDIR&
  42.  
  43. !add_library_path include &SRCDIR&
  44. !c &SRCDIR&>ckldef &COPTS&
  45. !bind ckldef &BOPTS&
  46. &if (quote (current_dir)) ^= &$SRCDIR&
  47.    &then !copy_file &SRCDIR&>ckcsym.h -delete
  48. !ckldef ckcsym.h -read &KOPTS&
  49. !c &SRCDIR&>ckwart.c &COPTS&
  50. !bind ckwart &BOPTS&
  51. !ckwart &SRCDIR&>ckcpro.w ckcpro.c
  52. & drl - This was commented out and used a cklpro.c file in 6.0
  53. & ckcpro.c gets created in the build dir!
  54. !c &SRCDIR&>ckcpro.c &COPTS&
  55. !delete_file ckcpro.c
  56.  
  57. !c &SRCDIR&>ckclib.c &COPTS&
  58. !c &SRCDIR&>ckcfn2.c &COPTS&
  59. !c &SRCDIR&>ckcfn3.c &COPTS&
  60. !c &SRCDIR&>ckcfns.c &COPTS&
  61. !c &SRCDIR&>ckcmai.c &COPTS&
  62. !c &SRCDIR&>ckctel.c &COPTS&
  63. !c &SRCDIR&>cklcon.c &COPTS&
  64. !c &SRCDIR&>cklfio.c &COPTS&
  65. !c &SRCDIR&>cklnet.c &COPTS&
  66. !c &SRCDIR&>ckltio.c &COPTS&
  67. !c &SRCDIR&>ckucmd.c &COPTS&
  68. !c &SRCDIR&>ckudia.c &COPTS&
  69. !c &SRCDIR&>ckuscr.c &COPTS&
  70. !c &SRCDIR&>ckusig.c &COPTS&
  71. !c &SRCDIR&>ckuus2.c &COPTS&
  72. !c &SRCDIR&>ckuus3.c &COPTS&
  73. !c &SRCDIR&>ckuus4.c &COPTS&
  74. !c &SRCDIR&>ckuus5.c &COPTS&
  75. !c &SRCDIR&>ckuus6.c &COPTS&
  76. !c &SRCDIR&>ckuus7.c &COPTS&
  77. !c &SRCDIR&>ckuusr.c &COPTS&
  78. !c &SRCDIR&>ckuusx.c &COPTS&
  79. !c &SRCDIR&>ckuusy.c &COPTS&
  80. !c &SRCDIR&>ckuxla.c &COPTS&
  81.  
  82. &if (index &$KOPTS& MDEBUG) ^= 0
  83.   &then &set_string MDOBJ , ckcmdb
  84.   &else &set_string MDOBJ
  85.  
  86. &if &$MDOBJ& ^= '' &then !c &SRCDIR&>ckcmdb.c &COPTS&
  87.  
  88. &if (index &$KOPTS& TCPSOCKET) ^= 0
  89.   &then &set_string TCPOBJ , tcp_runtime, tcp_gethost
  90.   &else &set_string TCPOBJ
  91.  
  92. &attach_input
  93. line_edit -no_backup -no_verbose
  94. i
  95. name:     &KNAME&;
  96. size:     large;
  97. modules:  ckcmai, ckclib, ckcfns, ckcfn2, ckcfn3, ckcpro, ckudia,
  98.           ckuscr, ckltio, cklfio, cklcon, ckctel, cklnet, ckuusr,
  99.           ckuus2, ckuus3, ckuus4, ckuus5, ckuus6, ckuus7,
  100.           ckuusx, ckuusy, ckucmd, ckuxla, ckusig  &TCPOBJ& &MDOBJ&;
  101. end;
  102. .
  103. w kermit.bind
  104. q
  105. &detach_input
  106.  
  107. !bind -control kermit &BOPTS&
  108.  
  109. &if &TOOL& = 0 &then &goto notools
  110.  
  111. !c &SRCDIR&>ckltxt.c &COPTS&
  112. !c &SRCDIR&>cklxtr.c &COPTS&
  113. !bind ckltxt &BOPTS&
  114. !bind cklxtr &BOPTS&
  115. &goto build_done
  116.  
  117. &label notools
  118.  
  119. & delete the ones needed to build C-Kermit itself
  120.  
  121. !delete_file ckldef.pm
  122. !delete_file ckwart.pm
  123.  
  124. &label build_done
  125. & !delete_file *.obj -no_ask -brief
  126. & !delete_file kermit.bind
  127. & &if &$SRCDIR& ^= (quote (current_dir)) &then !delete_file ckcsym.h
  128. &if (process_type) ^= batch
  129.   &then !set_terminal_parameters -pause_lines &PLINES&
  130.  
  131. !change_current_dir &mydir&
  132. &return
  133.  
  134. &label same_dir_error
  135. display_line (message e$same_object)
  136. &return e$same_object
  137.