descrip.mms 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. # 23 February 2007. SMS.
  2. #
  3. # Zip 3.0 for VMS - MMS (or MMK) Description File.
  4. #
  5. # Usage:
  6. #
  7. # MMS /DESCRIP = [.VMS]DESCRIP.MMS [/MACRO = (<see_below>)] [target]
  8. #
  9. # Note that this description file must be used from the main
  10. # distribution directory, not from the [.VMS] subdirectory.
  11. #
  12. # Optional macros:
  13. #
  14. # CCOPTS=xxx Compile with CC options xxx. For example:
  15. # CCOPTS=/ARCH=HOST
  16. #
  17. # DBG=1 Compile with /DEBUG /NOOPTIMIZE.
  18. # Link with /DEBUG /TRACEBACK.
  19. # (Default is /NOTRACEBACK.)
  20. #
  21. # IM=1 Use the old "IM" scheme for storing VMS/RMS file
  22. # atributes, instead of the newer "PK" scheme.
  23. #
  24. # IZ_BZIP2=dev:[dir] Add optional BZIP2 support. The valus of the
  25. # MMS macro IZ_BZIP2 ("dev:[dir]", or a suitable
  26. # logical name) tells where to find "bzlib.h". The
  27. # BZIP2 object library (LIBBZ2_NS.OLB) is expected to
  28. # be in a "[.dest]" directory under that one
  29. # ("dev:[dir.ALPHAL]", for example), or in that
  30. # directory itself.
  31. #
  32. # LARGE=1 Enable large-file (>2GB) support. Non-VAX only.
  33. #
  34. # LINKOPTS=xxx Link with LINK options xxx. For example:
  35. # LINKOPTS=/NOINFO
  36. #
  37. # LIST=1 Compile with /LIST /SHOW = (ALL, NOMESSAGES).
  38. # Link with /MAP /CROSS_REFERENCE /FULL.
  39. #
  40. # "LOCAL_ZIP=c_macro_1=value1 [, c_macro_2=value2 [...]]"
  41. # Compile with these additional C macros defined.
  42. #
  43. # VAX-specific optional macros:
  44. #
  45. # VAXC=1 Use the VAX C compiler, assuming "CC" runs it.
  46. # (That is, DEC C is not installed, or else DEC C is
  47. # installed, but VAX C is the default.)
  48. #
  49. # FORCE_VAXC=1 Use the VAX C compiler, assuming "CC /VAXC" runs it.
  50. # (That is, DEC C is installed, and it is the
  51. # default, but you want VAX C anyway, you fool.)
  52. #
  53. # GNUC=1 Use the GNU C compiler. (Seriously under-tested.)
  54. #
  55. #
  56. # The default target, ALL, builds the selected product executables and
  57. # help files.
  58. #
  59. # Other targets:
  60. #
  61. # CLEAN deletes architecture-specific files, but leaves any
  62. # individual source dependency files and the help files.
  63. #
  64. # CLEAN_ALL deletes all generated files, except the main (collected)
  65. # source dependency file.
  66. #
  67. # CLEAN_EXE deletes only the architecture-specific executables.
  68. # Handy if all you wish to do is re-link the executables.
  69. #
  70. # Example commands:
  71. #
  72. # To build the conventional small-file product using the DEC/Compaq/HP C
  73. # compiler (Note: DESCRIP.MMS is the default description file name.):
  74. #
  75. # MMS /DESCRIP = [.VMS]
  76. #
  77. # To get the large-file executables (on a non-VAX system):
  78. #
  79. # MMS /DESCRIP = [.VMS] /MACRO = (LARGE=1)
  80. #
  81. # To delete the architecture-specific generated files for this system
  82. # type:
  83. #
  84. # MMS /DESCRIP = [.VMS] /MACRO = (LARGE=1) CLEAN ! Large-file.
  85. # or
  86. # MMS /DESCRIP = [.VMS] CLEAN ! Small-file.
  87. #
  88. # To build a complete small-file product for debug with compiler
  89. # listings and link maps:
  90. #
  91. # MMS /DESCRIP = [.VMS] CLEAN
  92. # MMS /DESCRIP = [.VMS] /MACRO = (DBG=1, LIST=1)
  93. #
  94. ########################################################################
  95. # Include primary product description file.
  96. INCL_DESCRIP_SRC = 1
  97. .INCLUDE [.VMS]DESCRIP_SRC.MMS
  98. # Object library names.
  99. LIB_ZIP = [.$(DEST)]ZIP.OLB
  100. LIB_ZIPCLI = [.$(DEST)]ZIPCLI.OLB
  101. LIB_ZIPUTILS = [.$(DEST)]ZIPUTILS.OLB
  102. # Help file names.
  103. ZIP_HELP = ZIP.HLP ZIP_CLI.HLP
  104. # Message file names.
  105. ZIP_MSG_MSG = [.VMS]ZIP_MSG.MSG
  106. ZIP_MSG_EXE = [.$(DEST)]ZIP_MSG.EXE
  107. ZIP_MSG_OBJ = [.$(DEST)]ZIP_MSG.OBJ
  108. # TARGETS.
  109. # Default target, ALL. Build All Zip executables, utility executables,
  110. # and help files.
  111. ALL : $(ZIP) $(ZIP_CLI) $(ZIPUTILS) $(ZIP_HELP) $(ZIP_MSG_EXE)
  112. @ write sys$output "Done."
  113. # CLEAN target. Delete the [.$(DEST)] directory and everything in it.
  114. CLEAN :
  115. if (f$search( "[.$(DEST)]*.*") .nes. "") then -
  116. delete /noconfirm [.$(DEST)]*.*;*
  117. if (f$search( "$(DEST).DIR") .nes. "") then -
  118. set protection = w:d $(DEST).DIR;*
  119. if (f$search( "$(DEST).DIR") .nes. "") then -
  120. delete /noconfirm $(DEST).DIR;*
  121. # CLEAN_ALL target. Delete:
  122. # The [.$(DEST)] directories and everything in them.
  123. # All help-related derived files,
  124. # All individual C dependency files.
  125. # Also mention:
  126. # Comprehensive dependency file.
  127. CLEAN_ALL :
  128. if (f$search( "[.ALPHA*]*.*") .nes. "") then -
  129. delete /noconfirm [.ALPHA*]*.*;*
  130. if (f$search( "ALPHA*.DIR", 1) .nes. "") then -
  131. set protection = w:d ALPHA*.DIR;*
  132. if (f$search( "ALPHA*.DIR", 2) .nes. "") then -
  133. delete /noconfirm ALPHA*.DIR;*
  134. if (f$search( "[.IA64*]*.*") .nes. "") then -
  135. delete /noconfirm [.IA64*]*.*;*
  136. if (f$search( "IA64*.DIR", 1) .nes. "") then -
  137. set protection = w:d IA64*.DIR;*
  138. if (f$search( "IA64*.DIR", 2) .nes. "") then -
  139. delete /noconfirm IA64*.DIR;*
  140. if (f$search( "[.VAX*]*.*") .nes. "") then -
  141. delete /noconfirm [.VAX*]*.*;*
  142. if (f$search( "VAX*.DIR", 1) .nes. "") then -
  143. set protection = w:d VAX*.DIR;*
  144. if (f$search( "VAX*.DIR", 2) .nes. "") then -
  145. delete /noconfirm VAX*.DIR;*
  146. if (f$search( "[.vms]ZIP_CLI.RNH") .nes. "") then -
  147. delete /noconfirm [.vms]ZIP_CLI.RNH;*
  148. if (f$search( "ZIP_CLI.HLP") .nes. "") then -
  149. delete /noconfirm ZIP_CLI.HLP;*
  150. if (f$search( "ZIP.HLP") .nes. "") then -
  151. delete /noconfirm ZIP.HLP;*
  152. if (f$search( "*.MMSD") .nes. "") then -
  153. delete /noconfirm *.MMSD;*
  154. if (f$search( "[.vms]*.MMSD") .nes. "") then -
  155. delete /noconfirm [.vms]*.MMSD;*
  156. @ write sys$output ""
  157. @ write sys$output "Note: This procedure will not"
  158. @ write sys$output " DELETE [.VMS]DESCRIP_DEPS.MMS;*"
  159. @ write sys$output -
  160. "You may choose to, but a recent version of MMS (V3.5 or newer?) is"
  161. @ write sys$output -
  162. "needed to regenerate it. (It may also be recovered from the original"
  163. @ write sys$output -
  164. "distribution kit.) See [.VMS]DESCRIP_MKDEPS.MMS for instructions on"
  165. @ write sys$output -
  166. "generating [.VMS]DESCRIP_DEPS.MMS."
  167. @ write sys$output ""
  168. @ write sys$output -
  169. "It also does not delete the error message source file:"
  170. @ write sys$output " DELETE [.VMS]ZIP_MSG.MSG;*"
  171. @ write sys$output -
  172. "but it can regenerate it if needed."
  173. @ write sys$output ""
  174. # CLEAN_EXE target. Delete the executables in [.$(DEST)].
  175. CLEAN_EXE :
  176. if (f$search( "[.$(DEST)]*.EXE") .nes. "") then -
  177. delete /noconfirm [.$(DEST)]*.EXE;*
  178. # Object library module dependencies.
  179. $(LIB_ZIP) : $(LIB_ZIP)($(MODS_OBJS_LIB_ZIP))
  180. @ write sys$output "$(MMS$TARGET) updated."
  181. $(LIB_ZIPCLI) : $(LIB_ZIPCLI)($(MODS_OBJS_LIB_ZIPCLI))
  182. @ write sys$output "$(MMS$TARGET) updated."
  183. $(LIB_ZIPUTILS) : $(LIB_ZIPUTILS)($(MODS_OBJS_LIB_ZIPUTILS))
  184. @ write sys$output "$(MMS$TARGET) updated."
  185. # Module ID options file.
  186. OPT_ID = SYS$DISK:[.VMS]ZIP.OPT
  187. # Default C compile rule.
  188. .C.OBJ :
  189. $(CC) $(CFLAGS) $(CDEFS_UNX) $(MMS$SOURCE)
  190. # Normal sources in [.VMS].
  191. [.$(DEST)]VMS.OBJ : [.VMS]VMS.C
  192. [.$(DEST)]VMSMUNCH.OBJ : [.VMS]VMSMUNCH.C
  193. [.$(DEST)]VMSZIP.OBJ : [.VMS]VMSZIP.C
  194. # Command-line interface files.
  195. [.$(DEST)]CMDLINE.OBJ : [.VMS]CMDLINE.C
  196. $(CC) $(CFLAGS) $(CDEFS_CLI) $(MMS$SOURCE)
  197. [.$(DEST)]ZIPCLI.OBJ : ZIP.C
  198. $(CC) $(CFLAGS) $(CDEFS_CLI) $(MMS$SOURCE)
  199. [.$(DEST)]ZIP_CLI.OBJ : [.VMS]ZIP_CLI.CLD
  200. # Utility variant sources.
  201. [.$(DEST)]CRC32_.OBJ : CRC32.C
  202. $(CC) $(CFLAGS) $(CDEFS_UTIL) $(MMS$SOURCE)
  203. [.$(DEST)]CRYPT_.OBJ : CRYPT.C
  204. $(CC) $(CFLAGS) $(CDEFS_UTIL) $(MMS$SOURCE)
  205. [.$(DEST)]FILEIO_.OBJ : FILEIO.C
  206. $(CC) $(CFLAGS) $(CDEFS_UTIL) $(MMS$SOURCE)
  207. [.$(DEST)]UTIL_.OBJ : UTIL.C
  208. $(CC) $(CFLAGS) $(CDEFS_UTIL) $(MMS$SOURCE)
  209. [.$(DEST)]ZIPFILE_.OBJ : ZIPFILE.C
  210. $(CC) $(CFLAGS) $(CDEFS_UTIL) $(MMS$SOURCE)
  211. [.$(DEST)]VMS_.OBJ : [.VMS]VMS.C
  212. $(CC) $(CFLAGS) $(CDEFS_UTIL) $(MMS$SOURCE)
  213. # Utility main sources.
  214. [.$(DEST)]ZIPCLOAK.OBJ : ZIPCLOAK.C
  215. $(CC) $(CFLAGS) $(CDEFS_UTIL) $(MMS$SOURCE)
  216. [.$(DEST)]ZIPNOTE.OBJ : ZIPNOTE.C
  217. $(CC) $(CFLAGS) $(CDEFS_UTIL) $(MMS$SOURCE)
  218. [.$(DEST)]ZIPSPLIT.OBJ : ZIPSPLIT.C
  219. $(CC) $(CFLAGS) $(CDEFS_UTIL) $(MMS$SOURCE)
  220. # VAX C LINK options file.
  221. .IFDEF OPT_FILE
  222. $(OPT_FILE) :
  223. open /write opt_file_ln $(OPT_FILE)
  224. write opt_file_ln "SYS$SHARE:VAXCRTL.EXE /SHARE"
  225. close opt_file_ln
  226. .ENDIF
  227. # Normal Zip executable.
  228. $(ZIP) : [.$(DEST)]ZIP.OBJ $(LIB_ZIP) $(OPT_FILE)
  229. $(LINK) $(LINKFLAGS) $(MMS$SOURCE), -
  230. $(LIB_ZIP) /include = (GLOBALS $(INCL_BZIP2_M)) /library, -
  231. $(LIB_BZIP2_OPTS) -
  232. $(LFLAGS_ARCH) -
  233. $(OPT_ID) /options
  234. # CLI Zip executable.
  235. $(ZIP_CLI) : [.$(DEST)]ZIPCLI.OBJ \
  236. $(LIB_ZIPCLI) $(OPT_ID) $(OPT_FILE)
  237. $(LINK) $(LINKFLAGS) $(MMS$SOURCE), -
  238. $(LIB_ZIPCLI) /library, -
  239. $(LIB_ZIP) /include = (GLOBALS $(INCL_BZIP2_M)) /library, -
  240. $(LIB_BZIP2_OPTS) -
  241. $(LFLAGS_ARCH) -
  242. $(OPT_ID) /options
  243. # Utility executables.
  244. [.$(DEST)]ZIPCLOAK.EXE : [.$(DEST)]ZIPCLOAK.OBJ \
  245. $(LIB_ZIPUTILS) \
  246. $(OPT_ID) $(OPT_FILE)
  247. $(LINK) $(LINKFLAGS) $(MMS$SOURCE), -
  248. $(LIB_ZIPUTILS) /include = (GLOBALS) /library, -
  249. $(LFLAGS_ARCH) -
  250. $(OPT_ID) /options
  251. [.$(DEST)]ZIPNOTE.EXE : [.$(DEST)]ZIPNOTE.OBJ \
  252. $(LIB_ZIPUTILS) \
  253. $(OPT_ID) $(OPT_FILE)
  254. $(LINK) $(LINKFLAGS) $(MMS$SOURCE), -
  255. $(LIB_ZIPUTILS) /include = (GLOBALS) /library, -
  256. $(LFLAGS_ARCH) -
  257. $(OPT_ID) /options
  258. [.$(DEST)]ZIPSPLIT.EXE : [.$(DEST)]ZIPSPLIT.OBJ \
  259. $(LIB_ZIPUTILS) \
  260. $(OPT_ID) $(OPT_FILE)
  261. $(LINK) $(LINKFLAGS) $(MMS$SOURCE), -
  262. $(LIB_ZIPUTILS) /include = (GLOBALS) /library, -
  263. $(LFLAGS_ARCH) -
  264. $(OPT_ID) /options
  265. # Help files.
  266. ZIP.HLP : [.VMS]VMS_ZIP.RNH
  267. runoff /output = $(MMS$TARGET) $(MMS$SOURCE)
  268. ZIP_CLI.HLP : [.VMS]ZIP_CLI.HELP [.VMS]CVTHELP.TPU
  269. edit := edit
  270. edit /tpu /nosection /nodisplay /command = [.VMS]CVTHELP.TPU -
  271. $(MMS$SOURCE)
  272. rename /noconfirm ZIP_CLI.RNH; [.VMS];
  273. purge /noconfirm /nolog /keep = 1 [.VMS]ZIP_CLI.RNH
  274. runoff /output = $(MMS$TARGET) [.VMS]ZIP_CLI.RNH
  275. # Message file.
  276. $(ZIP_MSG_EXE) : $(ZIP_MSG_OBJ)
  277. link /shareable = $(MMS$TARGET) $(ZIP_MSG_OBJ)
  278. $(ZIP_MSG_OBJ) : $(ZIP_MSG_MSG)
  279. message /object = $(MMS$TARGET) /nosymbols $(ZIP_MSG_MSG)
  280. $(ZIP_MSG_MSG) : ZIPERR.H [.VMS]STREAM_LF.FDL [.VMS]VMS_MSG_GEN.C
  281. $(CC) /include = [] /object = [.$(DEST)]VMS_MSG_GEN.OBJ -
  282. [.VMS]VMS_MSG_GEN.C
  283. $(LINK) /executable = [.$(DEST)]VMS_MSG_GEN.EXE -
  284. $(LFLAGS_ARCH) -
  285. [.$(DEST)]VMS_MSG_GEN.OBJ
  286. create /fdl = [.VMS]STREAM_LF.FDL $(MMS$TARGET)
  287. define /user_mode sys$output $(MMS$TARGET)
  288. run [.$(DEST)]VMS_MSG_GEN.EXE
  289. purge $(MMS$TARGET)
  290. delete [.$(DEST)]VMS_MSG_GEN.EXE;*, [.$(DEST)]VMS_MSG_GEN.OBJ;*
  291. # Include generated source dependencies.
  292. INCL_DESCRIP_DEPS = 1
  293. .INCLUDE [.VMS]DESCRIP_DEPS.MMS