]> sjero.net Git - wget/blob - vms/DESCRIP.MMS
NEWS: cite --start-pos
[wget] / vms / DESCRIP.MMS
1 #                                               23 September 2009.  SMS.
2 #
3 #    Wget 1.12 for VMS - MMS (or MMK) Description File.
4 #
5 # Usage:
6 #
7 #    SET DEFAULT [.directory]   ! [.VMS] to build all products.
8 #    MMS /DESCRIPTION = [-.VMS] [/MACRO = (<see_below>)] target
9 #
10 # Optional macros:
11 #
12 #    CCOPTS=xxx     Compile with CC options xxx.  For example:
13 #                   "CCOPTS=/ARCH=HOST"
14 #
15 #    CDEFS_USER=xxx  Compile with C macro definition(s) xxx.
16 #
17 #    DASHD=1        Compile with "-d" option enabled.
18 #
19 #    DBG=1          Compile with /DEBUG /NOOPTIMIZE.
20 #                   Link with /DEBUG /TRACEBACK.
21 #                   (Default is /NOTRACEBACK.)
22 #
23 #    HPSSL=1        Enable HTTPS (and NTLM) support using HP SSL.
24 #
25 #    LARGE=1        Enable large-file (>2GB) support.  Non-VAX only.
26 #
27 #    LINKOPTS=xxx   Link with LINK options xxx.  For example:
28 #                   "LINKOPTS=/NOINFO"   
29 #
30 #    LIST=1         Compile with /LIST /SHOW = (ALL, NOMESSAGES).
31 #                   Link with /MAP /CROSS_REFERENCE /FULL.
32 #
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.
37 #
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.
44 #
45 #    OSSL=1         Enable HTTPS (and NTLM) support using OpenSSL.
46 #
47 #
48 # The default target, ALL, builds all the product executables.
49 #
50 # Other targets:
51 #
52 #    CLEAN      deletes architecture-specific files, but leaves any
53 #               individual source dependency files.
54 #
55 #    CLEAN_ALL  deletes all generated files, except the main (collected)
56 #               source dependency files.
57 #
58 #    CLEAN_EXE  deletes only the architecture-specific executables. 
59 #               Handy if all you wish to do is re-link the executables.
60 #
61 #    CLEAN_OLB  deletes only the architecture-specific object libraries. 
62 #
63 #    HELP       creates the HELP library, [.vms]WGET.HLB.
64 #
65 # Example commands:
66 #
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.):
69 #
70 #    MMS
71 #
72 # To get the large-file executables (on a non-VAX system):
73 #
74 #    MMS /MACRO = (DASHD=1, LARGE=1)
75 #
76 # To delete the architecture-specific generated files for this system
77 # type:
78 #
79 #    MMS /MACRO = (LARGE=1) CLEAN       ! Large-file.
80 # or
81 #    MMS CLEAN                          ! Small-file.
82 #
83 # To build a complete small-file product for debug with compiler
84 # listings and link maps:
85 #
86 #    MMS CLEAN
87 #    MMS /MACRO = (DBG=1, LIST=1)
88 #
89 ########################################################################
90
91 # Include primary product description file.
92
93 INCL_DESCRIP_SRC = 1
94 .INCLUDE descrip_src.mms
95
96 # Required command procedures.
97
98 CONFIG_EXTRACT_COM = [-.$(DIR_VMS)]CONFIG_EXTRACT.COM
99
100 # Generated header files.
101
102 #    Products.
103
104 LIB_GETOPT_H = $(DIR_LIB_DEST)GETOPT.H
105 SRC_CONFIG_H = $(DIR_SRC_DEST)CONFIG.H
106
107 #    Sources.
108
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
112
113 .IFDEF ODS2DU                   # ODS2DU
114 LIB_GETOPT_H_SRC = $(LIB_GETOPT_H_SRC_DU)
115 .ELSE                           # ODS2DU
116 .IFDEF ODS2UD                       # ODS2UD
117 LIB_GETOPT_H_SRC = $(LIB_GETOPT_H_SRC_UD)
118 .ELSE                               # ODS2UD
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
123
124
125 # TARGETS.
126
127 # Default subsidiary targets.
128
129 # Build LIB object library (default target).
130
131 .IFDEF TARGET_LIB               # TARGET_LIB
132
133 SUBSIDIARY = 1
134
135 LIBLIB : $(LIB_LIB)
136         @ write sys$output ""
137         @ write sys$output "   LIBLIB done."
138         @ write sys$output ""
139
140 $(LIB_LIB) : $(LIB_LIB)($(MODS_OBJS_LIB_LIB))
141         @ write sys$output "$(MMS$TARGET) updated."
142
143 .ENDIF                          # TARGET_LIB
144
145
146 # Build MD5 object library (default target).
147
148 .IFDEF TARGET_MD5               # TARGET_MD5
149
150 SUBSIDIARY = 1
151
152 LIBMD5 : $(LIB_MD5)
153         @ write sys$output ""
154         @ write sys$output "   LIBMD5 done."
155         @ write sys$output ""
156
157 $(LIB_MD5) : $(LIB_MD5)($(MODS_OBJS_LIB_MD5))
158         @ write sys$output "$(MMS$TARGET) updated."
159
160 # Special rules for MD5.C on VAX where Compaq C V6.4-005
161 # (like, probably, other versions) loops with /optimize = disjoint.
162
163 .IFDEF __VAX__                      # __VAX__
164
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)) -
170          $(MMS$SOURCE)
171
172 .ENDIF                              # __VAX__
173
174 .ENDIF                          # TARGET_MD5
175
176
177 # Build Wget executable or SRC object library (default target).
178
179 .IFDEF TARGET_SRC               # TARGET_SRC
180
181 SUBSIDIARY = 1
182
183 EXES : $(EXES)
184         @ write sys$output ""
185         @ write sys$output "   Wget done."
186         @ write sys$output ""
187
188 $(LIB_SRC) : $(LIB_SRC)($(MODS_OBJS_LIB_SRC))
189         @ write sys$output "$(MMS$TARGET) updated."
190
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 -
196          $(SSL_LINK_OPT)
197          $(LFLAGS_ARCH)
198
199 $(DECC_VER_EXE) : $(DECC_VER_OBJ)
200         $(LINK) $(LINKFLAGS) -
201          $(DECC_VER_OBJ) -
202          $(LFLAGS_ARCH)
203
204 $(DECC_VER_OBJ) : [-.$(DIR_SRC)]DECC_VER.C
205
206 .ENDIF                          # TARGET_SRC
207
208
209 # Default global target.
210
211 ALL : $(EXES)
212         @ show time
213         @ write sys$output ""
214         @ write sys$output "   ALL done."
215         @ write sys$output ""
216
217 # Global rules for executables and object libraries.
218
219 .IFDEF TARGET_LIB               # TARGET_LIB
220 .ELSE                           # TARGET_LIB
221
222 $(LIB_LIB) :
223         dev_dir = f$environment( "DEFAULT")
224         set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
225         set default [-.$(DIR_LIB)]
226         show default
227         @ write sys$output ""
228         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
229          $(LIB_LIB)
230         set default 'dev_dir'
231         show default
232         @ write sys$output ""
233
234 .ENDIF                          # TARGET_LIB [else]
235
236 .IFDEF TARGET_MD5               # TARGET_MD5
237 .ELSE                           # TARGET_MD5
238
239 $(LIB_MD5) :
240         dev_dir = f$environment( "DEFAULT")
241         set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
242         set default [-.$(DIR_MD5)]
243         show default
244         @ write sys$output ""
245         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
246          $(LIB_MD5)
247         set default 'dev_dir'
248         show default
249         @ write sys$output ""
250
251 .ENDIF                          # TARGET_MD5 [else]
252
253 .IFDEF TARGET_SRC               # TARGET_SRC
254 .ELSE                           # TARGET_SRC
255
256 $(LIB_SRC) :
257         dev_dir = f$environment( "DEFAULT")
258         set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
259         set default [-.$(DIR_SRC)]
260         show default
261         @ write sys$output ""
262         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
263          $(LIB_SRC)
264         set default 'dev_dir'
265         show default
266         @ write sys$output ""
267
268 $(WGET_EXE) :
269         set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
270         set default [-.$(DIR_SRC)]
271         show default
272         @ write sys$output ""
273         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
274          $(WGET_EXE)
275
276 $(DECC_VER_EXE) :
277         set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
278         set default [-.$(DIR_SRC)]
279         show default
280         @ write sys$output ""
281         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
282          $(DECC_VER_EXE)
283
284 .ENDIF                          # TARGET_SRC [else]
285
286
287
288 # CLEAN target.  Delete the [.$(DEST)] directory and everything in it.
289
290 .IFDEF SUBSIDIARY               # SUBSIDIARY
291
292 CLEAN :
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 -
298          delete $(DEST).dir;*
299
300 # CLEAN_ALL target.  Delete:
301 #    The [...$(DEST)] directories and everything in them.
302 #    All individual C dependency files.
303 # Also mention:
304 #    Comprehensive dependency file.
305
306 CLEAN_ALL :
307         @ write sys$output "   SUBS - CLEAN_ALL"
308         show default
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 -
329          delete [...]*.MMSD;*
330         @ write sys$output ""
331         @ write sys$output "Note:  This procedure will not"
332         @ write sys$output "   DELETE DESCRIP_DEPS.MMS;*"
333         @ write sys$output -
334  "You may choose to, but a recent version of MMS (V3.5 or newer?) is"
335         @ write sys$output -
336  "needed to regenerate it.  (It may also be recovered from the original"
337         @ write sys$output -
338  "distribution kit.)  See DESCRIP_MKDEPS.MMS for instructions on"
339         @ write sys$output -
340  "generating DESCRIP_DEPS.MMS."
341         @ write sys$output ""
342
343 # CLEAN_EXE target.  Delete the executables in [.$(DEST)].
344
345 CLEAN_EXE :
346         if (f$search( "[.$(DEST)]*.EXE") .nes. "") then -
347          delete [.$(DEST)]*.EXE;*
348
349 # CLEAN_OLB target.  Delete the object libraries in [.$(DEST)].
350
351 CLEAN_OLB :
352         if (f$search( "[.$(DEST)]*.OLB") .nes. "") then -
353          delete [.$(DEST)]*.OLB;*
354
355 .ELSE                           # SUBSIDIARY
356
357 .IFDEF MMSTARGETS                   # MMSTARGETS
358
359 #
360 # MMS (or MMK) with the MMSTARGETS macro needs only one real CLEAN rule.
361 #
362
363 CLEAN, CLEAN_ALL, CLEAN_EXE, CLEAN_OLB :
364         set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
365         set default [-.$(DIR_LIB)]
366         show default
367         @ write sys$output ""
368         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
369          $(MMSTARGETS)
370         set default [-.$(DIR_MD5)]
371         show default
372         @ write sys$output ""
373         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
374          $(MMSTARGETS)
375         set default [-.$(DIR_SRC)]
376         show default
377         @ write sys$output ""
378         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
379          $(MMSTARGETS)
380
381 .ELSE                               # MMSTARGETS
382
383 #
384 # MMK without the MMSTARGETS macro needs more rules.
385 #
386
387 CLEAN :
388         set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
389         set default [-.$(DIR_LIB)]
390         show default
391         @ write sys$output ""
392         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
393          CLEAN
394         set default [-.$(DIR_MD5)]
395         show default
396         @ write sys$output ""
397         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
398          CLEAN
399         set default [-.$(DIR_SRC)]
400         show default
401         @ write sys$output ""
402         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
403          CLEAN
404
405 CLEAN_ALL :
406         set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
407         set default [-.$(DIR_LIB)]
408         show default
409         @ write sys$output ""
410         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
411          CLEAN_ALL
412         set default [-.$(DIR_MD5)]
413         show default
414         @ write sys$output ""
415         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
416          CLEAN_ALL
417         set default [-.$(DIR_SRC)]
418         show default
419         @ write sys$output ""
420         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
421          CLEAN_ALL
422
423 CLEAN_EXE :
424         set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
425         set default [-.$(DIR_LIB)]
426         show default
427         @ write sys$output ""
428         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
429          CLEAN_EXE
430         set default [-.$(DIR_MD5)]
431         show default
432         @ write sys$output ""
433         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
434          CLEAN_EXE
435         set default [-.$(DIR_SRC)]
436         show default
437         @ write sys$output ""
438         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
439          CLEAN_EXE
440
441 CLEAN_OLB :
442         set default 'f$parse( "$(MMSDESCRIPTION_FILE)", , , "DIRECTORY")'
443         set default [-.$(DIR_LIB)]
444         show default
445         @ write sys$output ""
446         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
447          CLEAN_OLB
448         set default [-.$(DIR_MD5)]
449         show default
450         @ write sys$output ""
451         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
452          CLEAN_OLB
453         set default [-.$(DIR_SRC)]
454         show default
455         @ write sys$output ""
456         $(MMS) /description = $(MMSDESCRIPTION_FILE) $(MMSQUALIFIERS) -
457          CLEAN_OLB
458
459 .ENDIF                              # MMSTARGETS [else]
460
461 .ENDIF                          # SUBSIDIARY
462
463 DEFAULT :
464         @ write sys$output "No target, specified or default."
465
466 HELP : $(WGET_HLB)
467         @ write sys$output ""
468         @ write sys$output "   ""$<"" is ready."
469         @ write sys$output ""
470
471 $(WGET_HLB) : $(WGET_HLP)
472         LIBRARY /CREATE /HELP $(MMS$TARGET) $(MMS$SOURCE)
473
474 # Default C compile rule.
475
476 .C.OBJ :
477         $(CC) $(CFLAGS) /define = ($(CDEFS)) $(MMS$SOURCE)
478
479
480 # Generated header files.
481
482 GENERATED_HEADERS : $(LIB_GETOPT_H) $(SRC_CONFIG_H)
483         @ write sys$output "$(MMS$TARGET) updated."
484
485 # Simply copy "lib/getopt.in.h".
486
487 $(LIB_GETOPT_H) : $(LIB_GETOPT_H_SRC)
488         copy $(LIB_GETOPT_H_SRC) $(MMS$TARGET)
489
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.
493
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)
498         @ write config_h ""
499         @ write config_h "/* Data extracted from ""configure.ac"": */"
500         @ write config_h ""
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")'"""
515         @ write config_h ""
516         @ write config_h "/* Build-time info: */"
517         @ write config_h ""
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"")'"""
523         @ write config_h ""
524         @ close config_h
525
526 # Include generated source dependencies.
527
528 .IFDEF SUBSIDIARY               # SUBSIDIARY
529
530 INCL_DESCRIP_DEPS = 1
531
532 .INCLUDE descrip_deps.mms
533
534 .ENDIF                          # SUBSIDIARY
535