]> sjero.net Git - wget/blob - vms/DESCRIP_MKDEPS.MMS
Space before closing brace. Fixes paramcheck.pl output.
[wget] / vms / DESCRIP_MKDEPS.MMS
1 #                                               28 January 2008.  SMS.
2 #
3 #    Wget 1.11 for VMS - MMS Dependency Description File.
4 #
5 #    MMS /EXTENDED_SYNTAX description file to generate a C source
6 #    dependencies file.  Unsightly errors result when /EXTENDED_SYNTAX
7 #    is not specified.  Typical usage (from the [...src] directory):
8 #
9 #    $ @ [-.VMS]VMS-WGET.COM DEPS [DASHD] [HPSSL|NOSSL] [NOSKIP] [CLEAN|PURGE]
10 #
11 # This description file uses this command procedure:
12 #
13 #    [-.VMS]COLLECT_DEPS.COM
14 #
15 # MMK users without MMS will be unable to generate the dependencies file
16 # using this description file, however there should be one supplied in
17 # the kit.  If this file has been deleted, users in this predicament
18 # will need to recover it from the original distribution kit.
19 #
20 # Note:  This dependency generation scheme assumes that the dependencies
21 # do not depend on host architecture type or other such variables. 
22 # Therefore, no "#include" directive in the C source itself should be
23 # conditional on such variables.
24 #
25 # Note:  For no apparent reason, Wget code uses "system include"
26 # brackets (<>) for "config.h", so /MMS_DEPENDENCIES =
27 # NOSYSTEM_INCLUDE_FILES is useless here.  Thus, we rely on
28 # COLLECT_DEPS.COM to filter out the system includes from the
29 # dependencies.
30 #
31
32 # Required command procedures.
33
34 COMS = [-.VMS]COLLECT_DEPS.COM
35
36 # Include the source file lists (among other data).
37
38 INCL_DESCRIP_SRC = 1
39 .INCLUDE [-.VMS]descrip_src.mms
40
41 # The ultimate product, a comprehensive dependency list.
42
43 DEPS_FILE = [-.VMS]descrip_deps.mms 
44
45 # Detect valid qualifier and/or macro options.
46
47 .IF $(FINDSTRING Skip, $(MMSQUALIFIERS)) .eq Skip
48 DELETE_MMSD = 1
49 .ELSIF NOSKIP
50 PURGE_MMSD = 1
51 .ELSE
52 UNK_MMSD = 1
53 .ENDIF
54
55 # Dependency suffixes and rules.
56 #
57 # .FIRST is assumed to be used already, so the MMS qualifier/macro check
58 # is included in each rule (one way or another).
59
60 .SUFFIXES_BEFORE .C .MMSD
61
62 .C.MMSD :
63 .IF UNK_MMSD
64         @ write sys$output -
65  "   /SKIP_INTERMEDIATES is expected on the MMS command line."
66         @ write sys$output -
67  "   For normal behavior (delete .MMSD files), specify ""/SKIP""."
68         @ write sys$output -
69  "   To retain the .MMSD files, specify ""/MACRO = NOSKIP=1""."
70         @ exit %x00000004
71 .ENDIF
72         $(CC) /NOOBJECT -
73          /define = ($(CDEFINES)) -
74          $(CFLAGS_INCL) -
75          $(CFLAGS_LIST) -
76          $(CFLAGS_PREFIX) -
77          $(MMS$SOURCE) -
78          /MMS_DEPENDENCIES = (FILE = $(MMS$TARGET))
79
80 # List of MMS dependency files.
81 # [.$(DEST)]XXX.obj -> XXX
82
83 MODS_SRC = $(FILTER-OUT *], $(PATSUBST *]*.obj, *] *, $(OBJS_SRC)))
84 MODS_VMS = $(FILTER-OUT *], $(PATSUBST *]*.obj, *] [-.vms]*, $(OBJS_VMS)))
85
86 MODS = $(MODS_SRC) $(MODS_VMS)
87
88 # Complete list of C object dependency file names.
89 # XXX -> XXX.mmsd
90
91 DEPS = $(FOREACH NAME, $(MODS), $(NAME).mmsd)
92
93 # Default target is the comprehensive dependency list.
94
95 $(DEPS_FILE) : $(CONFIG_H) $(DEPS) $(COMS)
96 .IF UNK_MMSD
97         @ write sys$output -
98  "   /SKIP_INTERMEDIATES is expected on the MMS command line."
99         @ write sys$output -
100  "   For normal behavior (delete individual .MMSD files), specify ""/SKIP""."
101         @ write sys$output -
102  "   To retain the individual .MMSD files, specify ""/MACRO = NOSKIP=1""."
103         @ exit %x00000004
104 .ENDIF
105 #
106 #       Note that the space in P3, which prevents immediate macro
107 #       expansion, is removed by COLLECT_DEPS.COM.
108 #
109         @[-.VMS]collect_deps.com -
110          "$(MMS$TARGET)" "[-...]*.mmsd" "[.$ (DEST)]" -
111          $(MMSDESCRIPTION_FILE)
112         @ write sys$output -
113          "Created a new dependency file: $(MMS$TARGET)"
114 .IF DELETE_MMSD
115         @ write sys$output -
116          "Deleting intermediate .MMSD files..."
117         if (f$search( "*.mmsd;*") .nes. "") then -
118          delete /log *.mmsd;*
119         if (f$search( "[-.vms]*.mmsd;*") .nes. "") then -
120          delete /log [-.vms]*.mmsd;*
121 .ELSE
122         @ write sys$output -
123          "Purging intermediate .MMSD files..."
124         purge /log *.mmsd, [-.vms]*.mmsd
125 .ENDIF
126
127 # CLEAN target.
128
129 CLEAN :
130         if (f$search( "$(CONFIG_H)") .nes. "") then -
131          delete /log $(CONFIG_H);*
132         if (f$search( "*.mmsd;*") .nes. "") then -
133          delete /log *.mmsd;*
134         if (f$search( "[-.vms]*.mmsd;*") .nes. "") then -
135          delete /log [-.vms]*.mmsd;*
136         if (f$search( "$(DEPS_FILE);*") .nes. "") then -
137          delete /log $(DEPS_FILE);*
138
139 # PURGE target.
140
141 PURGE :
142         if (f$search( "$(CONFIG_H);-1") .nes. "") then -
143          purge /log $(CONFIG_H)
144         if (f$search( "*.mmsd;*") .nes. "") then -
145          delete /log *.mmsd;*
146         if (f$search( "[-.vms]*.mmsd;*") .nes. "") then -
147          delete /log [-.vms]*.mmsd;*
148         if (f$search( "$(DEPS_FILE);-1") .nes. "") then -
149          purge /log $(DEPS_FILE)
150
151
152 # Include CONFIG.H dependency and rule.
153
154 INCL_CONFIG_SRC = 1
155 .INCLUDE [-.VMS]descrip_config.mms
156