1 # 23 September 2009. SMS.
3 # Wget 1.12 for VMS - MMS (or MMK) Description File.
7 # SET DEFAULT [.directory] ! [.VMS] to build all products.
8 # MMS /DESCRIPTION = [-.VMS] [/MACRO = (<see_below>)] target
12 # CCOPTS=xxx Compile with CC options xxx. For example:
15 # CDEFS_USER=xxx Compile with C macro definition(s) xxx.
17 # DASHD=1 Compile with "-d" option enabled.
19 # DBG=1 Compile with /DEBUG /NOOPTIMIZE.
20 # Link with /DEBUG /TRACEBACK.
21 # (Default is /NOTRACEBACK.)
23 # HPSSL=1 Enable HTTPS (and NTLM) support using HP SSL.
25 # LARGE=1 Enable large-file (>2GB) support. Non-VAX only.
27 # LINKOPTS=xxx Link with LINK options xxx. For example:
30 # LIST=1 Compile with /LIST /SHOW = (ALL, NOMESSAGES).
31 # Link with /MAP /CROSS_REFERENCE /FULL.
33 # ODS2DU=1 Look for multi-dot file names (like
34 # "[.lib]getopt^.in.h") using VMSTAR-compatible,
35 # dot-under, ODS2-conforming names (like
36 # "[.lib]getopt.in_h"). See also ODS2Z, below.
38 # ODS2UD=1 Look for multi-dot file names (like
39 # "[.lib]getopt^.in.h") using [Un]Zip-compatible,
40 # under-dot ODS2-conforming names (like
41 # "[.lib]getopt_in.h"). Also use this macro if the
42 # source kit was extracted using VMSTAR with the
43 # /UNDERDOT ("-u") option.
45 # OSSL=1 Enable HTTPS (and NTLM) support using OpenSSL.
48 # The default target, ALL, builds all the product executables.
52 # CLEAN deletes architecture-specific files, but leaves any
53 # individual source dependency files.
55 # CLEAN_ALL deletes all generated files, except the main (collected)
56 # source dependency files.
58 # CLEAN_EXE deletes only the architecture-specific executables.
59 # Handy if all you wish to do is re-link the executables.
61 # CLEAN_OLB deletes only the architecture-specific object libraries.
63 # HELP creates the HELP library, [.vms]WGET.HLB.
67 # To build the conventional small-file product using the DEC/Compaq/HP C
68 # compiler (Note: DESCRIP.MMS is the default description file name.):
72 # To get the large-file executables (on a non-VAX system):
74 # MMS /MACRO = (DASHD=1, LARGE=1)
76 # To delete the architecture-specific generated files for this system
79 # MMS /MACRO = (LARGE=1) CLEAN ! Large-file.
81 # MMS CLEAN ! Small-file.
83 # To build a complete small-file product for debug with compiler
84 # listings and link maps:
87 # MMS /MACRO = (DBG=1, LIST=1)
89 ########################################################################
91 # Include primary product description file.
94 .INCLUDE descrip_src.mms
96 # Required command procedures.
98 CONFIG_EXTRACT_COM = [-.$(DIR_VMS)]CONFIG_EXTRACT.COM
100 # Generated header files.
104 LIB_GETOPT_H = $(DIR_LIB_DEST)GETOPT.H
105 SRC_CONFIG_H = $(DIR_SRC_DEST)CONFIG.H
109 LIB_GETOPT_H_SRC_DD = [-.$(DIR_LIB)]getopt^.in.h
110 LIB_GETOPT_H_SRC_DU = [-.$(DIR_LIB)]getopt.in_h
111 LIB_GETOPT_H_SRC_UD = [-.$(DIR_LIB)]getopt_in.h
113 .IFDEF ODS2DU # ODS2DU
114 LIB_GETOPT_H_SRC = $(LIB_GETOPT_H_SRC_DU)
116 .IFDEF ODS2UD # ODS2UD
117 LIB_GETOPT_H_SRC = $(LIB_GETOPT_H_SRC_UD)
119 LIB_GETOPT_H_SRC = $(LIB_GETOPT_H_SRC_DD)
120 .ENDIF # ODS2UD [else]
121 .ENDIF # ODS2DU [else]
122 SRC_CONFIG_H_SRC = [-.$(DIR_VMS)]CONFIG.H_VMS
127 # Default subsidiary targets.
129 # Build LIB object library (default target).
131 .IFDEF TARGET_LIB # TARGET_LIB
136 @ write sys$output ""
137 @ write sys$output " LIBLIB done."
138 @ write sys$output ""
140 $(LIB_LIB) : $(LIB_LIB)($(MODS_OBJS_LIB_LIB))
141 @ write sys$output "$(MMS$TARGET) updated."
146 # Build MD5 object library (default target).
148 .IFDEF TARGET_MD5 # TARGET_MD5
153 @ write sys$output ""
154 @ write sys$output " LIBMD5 done."
155 @ write sys$output ""
157 $(LIB_MD5) : $(LIB_MD5)($(MODS_OBJS_LIB_MD5))
158 @ write sys$output "$(MMS$TARGET) updated."
160 # Special rules for MD5.C on VAX where Compaq C V6.4-005
161 # (like, probably, other versions) loops with /optimize = disjoint.
163 .IFDEF __VAX__ # __VAX__
165 [.$(DEST)]MD5.OBJ : MD5.C
166 @ write sys$output "***************************************"
167 @ write sys$output "* Note: Exceptional rule in use here: *"
168 @ write sys$output "***************************************"
169 $(CC) $(CFLAGS) /optimize = nodisjoint /define = ($(CDEFS)) -
177 # Build Wget executable or SRC object library (default target).
179 .IFDEF TARGET_SRC # TARGET_SRC
184 @ write sys$output ""
185 @ write sys$output " Wget done."
186 @ write sys$output ""
188 $(LIB_SRC) : $(LIB_SRC)($(MODS_OBJS_LIB_SRC))
189 @ write sys$output "$(MMS$TARGET) updated."
191 $(WGET_EXE) : $(LIB_MD5) $(LIB_LIB) $(LIB_SRC)
192 $(LINK) $(LINKFLAGS) -
193 $(LIB_SRC) /library /include = (main), -
194 $(LIB_LIB) /library, -
195 $(LIB_MD5) /library -
199 $(DECC_VER_EXE) : $(DECC_VER_OBJ)
200 $(LINK) $(LINKFLAGS) -
204 $(DECC_VER_OBJ) : [-.$(DIR_SRC)]DECC_VER.C
209 # Default global target.
213 @ write sys$output ""
214 @ write sys$output " ALL done."
215 @ write sys$output ""
217 # Global rules for executables and object libraries.
219 .IFDEF TARGET_LIB # TARGET_LIB
223 dev_dir = f$environment( "DEFAULT")
224 set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
225 set default [-.$(DIR_LIB)]
227 @ write sys$output ""
228 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
230 set default 'dev_dir'
232 @ write sys$output ""
234 .ENDIF # TARGET_LIB [else]
236 .IFDEF TARGET_MD5 # TARGET_MD5
240 dev_dir = f$environment( "DEFAULT")
241 set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
242 set default [-.$(DIR_MD5)]
244 @ write sys$output ""
245 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
247 set default 'dev_dir'
249 @ write sys$output ""
251 .ENDIF # TARGET_MD5 [else]
253 .IFDEF TARGET_SRC # TARGET_SRC
257 dev_dir = f$environment( "DEFAULT")
258 set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
259 set default [-.$(DIR_SRC)]
261 @ write sys$output ""
262 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
264 set default 'dev_dir'
266 @ write sys$output ""
269 set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
270 set default [-.$(DIR_SRC)]
272 @ write sys$output ""
273 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
277 set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
278 set default [-.$(DIR_SRC)]
280 @ write sys$output ""
281 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
284 .ENDIF # TARGET_SRC [else]
288 # CLEAN target. Delete the [.$(DEST)] directory and everything in it.
290 .IFDEF SUBSIDIARY # SUBSIDIARY
293 if (f$search( "[.$(DEST)]*.*") .nes. "") then -
294 delete [.$(DEST)]*.*;*
295 if (f$search( "$(DEST).dir", 1) .nes. "") then -
296 set protection = w:d $(DEST).dir;*
297 if (f$search( "$(DEST).dir", 2) .nes. "") then -
300 # CLEAN_ALL target. Delete:
301 # The [...$(DEST)] directories and everything in them.
302 # All individual C dependency files.
304 # Comprehensive dependency file.
307 @ write sys$output " SUBS - CLEAN_ALL"
309 @ write sys$output ""
310 if (f$search( "[...ALPHA*]*.*") .nes. "") then -
311 delete [...ALPHA*]*.*;*
312 if (f$search( "[...]ALPHA*.dir", 1) .nes. "") then -
313 set protection = w:d [...]ALPHA*.dir;*
314 if (f$search( "[...]ALPHA*.dir", 2) .nes. "") then -
315 delete [...]ALPHA*.dir;*
316 if (f$search( "[...IA64*]*.*") .nes. "") then -
317 delete [...IA64*]*.*;*
318 if (f$search( "[...]IA64*.dir", 1) .nes. "") then -
319 set protection = w:d [...]IA64*.dir;*
320 if (f$search( "[...]IA64*.dir", 2) .nes. "") then -
321 delete [...]IA64*.dir;*
322 if (f$search( "[...VAX*]*.*") .nes. "") then -
323 delete [...VAX*]*.*;*
324 if (f$search( "[...]VAX*.dir", 1) .nes. "") then -
325 set protection = w:d [...]VAX*.dir;*
326 if (f$search( "[...]VAX*.dir", 2) .nes. "") then -
327 delete [...]VAX*.dir;*
328 if (f$search( "[...]*.MMSD") .nes. "") then -
330 @ write sys$output ""
331 @ write sys$output "Note: This procedure will not"
332 @ write sys$output " DELETE DESCRIP_DEPS.MMS;*"
334 "You may choose to, but a recent version of MMS (V3.5 or newer?) is"
336 "needed to regenerate it. (It may also be recovered from the original"
338 "distribution kit.) See DESCRIP_MKDEPS.MMS for instructions on"
340 "generating DESCRIP_DEPS.MMS."
341 @ write sys$output ""
343 # CLEAN_EXE target. Delete the executables in [.$(DEST)].
346 if (f$search( "[.$(DEST)]*.EXE") .nes. "") then -
347 delete [.$(DEST)]*.EXE;*
349 # CLEAN_OLB target. Delete the object libraries in [.$(DEST)].
352 if (f$search( "[.$(DEST)]*.OLB") .nes. "") then -
353 delete [.$(DEST)]*.OLB;*
357 .IFDEF MMSTARGETS # MMSTARGETS
360 # MMS (or MMK) with the MMSTARGETS macro needs only one real CLEAN rule.
363 CLEAN, CLEAN_ALL, CLEAN_EXE, CLEAN_OLB :
364 set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
365 set default [-.$(DIR_LIB)]
367 @ write sys$output ""
368 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
370 set default [-.$(DIR_MD5)]
372 @ write sys$output ""
373 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
375 set default [-.$(DIR_SRC)]
377 @ write sys$output ""
378 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
384 # MMK without the MMSTARGETS macro needs more rules.
388 set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
389 set default [-.$(DIR_LIB)]
391 @ write sys$output ""
392 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
394 set default [-.$(DIR_MD5)]
396 @ write sys$output ""
397 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
399 set default [-.$(DIR_SRC)]
401 @ write sys$output ""
402 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
406 set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
407 set default [-.$(DIR_LIB)]
409 @ write sys$output ""
410 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
412 set default [-.$(DIR_MD5)]
414 @ write sys$output ""
415 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
417 set default [-.$(DIR_SRC)]
419 @ write sys$output ""
420 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
424 set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
425 set default [-.$(DIR_LIB)]
427 @ write sys$output ""
428 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
430 set default [-.$(DIR_MD5)]
432 @ write sys$output ""
433 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
435 set default [-.$(DIR_SRC)]
437 @ write sys$output ""
438 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
442 set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
443 set default [-.$(DIR_LIB)]
445 @ write sys$output ""
446 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
448 set default [-.$(DIR_MD5)]
450 @ write sys$output ""
451 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
453 set default [-.$(DIR_SRC)]
455 @ write sys$output ""
456 $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
459 .ENDIF # MMSTARGETS [else]
464 @ write sys$output "No target, specified or default."
467 @ write sys$output ""
468 @ write sys$output " ""$<"" is ready."
469 @ write sys$output ""
471 $(WGET_HLB) : $(WGET_HLP)
472 LIBRARY /CREATE /HELP $(MMS$TARGET) $(MMS$SOURCE)
474 # Default C compile rule.
477 $(CC) $(CFLAGS) /define = ($(CDEFS)) $(MMS$SOURCE)
480 # Generated header files.
482 GENERATED_HEADERS : $(LIB_GETOPT_H) $(SRC_CONFIG_H)
483 @ write sys$output "$(MMS$TARGET) updated."
485 # Simply copy "lib/getopt.in.h".
487 $(LIB_GETOPT_H) : $(LIB_GETOPT_H_SRC)
488 copy $(LIB_GETOPT_H_SRC) $(MMS$TARGET)
490 # Copy "vms/config.h_vms", and append:
491 # Wget version, and other information extracted from "configure.ac",
492 # Current OS ("VMS"), host architecture, and OS version.
494 $(SRC_CONFIG_H) : $(SRC_CONFIG_H_SRC) $(CONFIG_EXTRACT_COM)
495 @ @$(CONFIG_EXTRACT_COM) [-]CONFIGURE.AC wget_name wget_vers wget_email
496 @ copy $(SRC_CONFIG_H_SRC) $(MMS$TARGET)
497 @ open /append config_h $(MMS$TARGET)
499 @ write config_h "/* Data extracted from ""configure.ac"": */"
501 @ write config_h "#define PACKAGE "+ -
502 """''f$trnlnm( "wget_name")'"""
503 @ write config_h "#define PACKAGE_BUGREPORT "+ -
504 """''f$trnlnm( "wget_email")'"""
505 @ write config_h "#define PACKAGE_NAME "+ -
506 """''f$trnlnm( "wget_name")'"""
507 @ write config_h "#define PACKAGE_STRING "+ -
508 """''f$trnlnm( "wget_name")' ''f$trnlnm( "wget_vers")'"""
509 @ write config_h "#define PACKAGE_TARNAME "+ -
510 """''f$trnlnm( "wget_name")'"""
511 @ write config_h "#define PACKAGE_VERSION "+ -
512 """''f$trnlnm( "wget_vers")'"""
513 @ write config_h "#define VERSION "+ -
514 """''f$trnlnm( "wget_vers")'"""
516 @ write config_h "/* Build-time info: */"
518 @ if (f$getsyi( "hw_model") .lt. 1024) then arch_name = "VAX"
519 @ if (f$getsyi( "hw_model") .ge. 1024) then -
520 arch_name = f$getsyi( "arch_name")
521 @ write config_h "#define OS_TYPE "+ -
522 """VMS ''arch_name' ''f$edit( f$getsyi( ""version""), ""trim"")'"""
526 # Include generated source dependencies.
528 .IFDEF SUBSIDIARY # SUBSIDIARY
530 INCL_DESCRIP_DEPS = 1
532 .INCLUDE descrip_deps.mms