94
95 #
96 # Rule to build prerequisites. The left part of the pattern will match
97 # PREREQ_TARGET.
98 #
99 # The location of the Makefile is determined by strippinng '.prereq' suffix from
100 # the target name. We add '.prereq' suffix to the target passed to the child
101 # Makefile so that it can distinguish prerequisite build from the regular one.
102 #
103 #
104 %.prereq:
105 @cd $(@:%.prereq=%); pwd; $(MAKE) $(NO_STATE) $(TARGET).prereq
106
107 #
108 # Rule to build architecture files. Build all required prerequisites and then
109 # build the rest (potentially in parallel).
110 #
111 $($(MACH)_ARCHITECTURES): $(PREREQ_TARGET) FRC
112 @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
113
114 $(PMTMO_FILE) pmtmo_file: $(PATCH_MAKEUP_TABLE)
115 @if [ -z "$(PATCH_MAKEUP_TABLE)" ] ; then \
116 echo 'ERROR: $$(PATCH_MAKEUP_TABLE) not set' \
117 'in environment' >&2 ; \
118 exit 1 ; \
119 fi
120 RELEASE="$(RELEASE)" MACH="$(MACH)" \
121 $(CTFCVTPTBL) -o $(PMTMO_FILE) $(PATCH_MAKEUP_TABLE)
122
123 #
124 # The following is the list of directories which contain Makefiles with
125 # targets to install header file. The machine independent headers are
126 # installed by invoking the Makefile in the directory containing the
127 # header files. Machine and architecture dependent headers are installed
128 # by invoking the main makefile for that architecture/machine which,
129 # in turn, is responsible for invoking the Makefiles which install headers.
130 # It is done this way so as not to assume that all of the header files in
131 # the architecture/machine dependent subdirectories are in completely
132 # isomorphic locations.
133 #
134 COMMON_HDRDIRS= common/avs \
135 common/c2 \
136 common/des \
137 common/fs \
138 common/gssapi \
139 common/idmap \
140 common/klm \
141 common/inet \
180 i386_HDRDIRS= i86pc/vm i86xpv/vm
181
182 HDRDIRS= $(COMMON_HDRDIRS) $($(MACH)_HDRDIRS)
183 install_h check: $(HDRDIRS) $($(MACH)_ARCHITECTURES)
184
185 $(HDRDIRS): FRC
186 @cd $@; pwd; $(MAKE) $(TARGET)
187
188 # ensures that headers made by rpcgen and others are available in uts source
189 # for kernel builds to reference without building install_h
190 #
191 all_h: FRC
192 @cd common/sys; pwd; $(MAKE) $@
193 @cd common/rpc; pwd; $(MAKE) $@
194 @cd common/rpcsvc; pwd; $(MAKE) $@
195 @cd common/gssapi; pwd; $(MAKE) $@
196 @cd common/idmap; pwd; $(MAKE) $@
197 @cd common/klm; pwd; $(MAKE) $@
198
199 clean clobber: $($(MACH)_ARCHITECTURES) $(DYNHDRDIRS)
200 @if [ '$(PATCH_BUILD)' != '#' ] ; then \
201 echo $(RM) $(PMTMO_FILE) ; \
202 $(RM) $(PMTMO_FILE) ; \
203 fi
204
205 # testing convenience
206 clobber_h: $(DYNHDRDIRS)
207
208 clean.lint modlist: $($(MACH)_ARCHITECTURES)
209
210 #
211 # Cross-reference customization: build a cross-reference over all of
212 # the supported architectures. Although there's no correct way to set
213 # the include path (since we don't know what architecture is the one
214 # the user will be interested in), it's historically been set to
215 # mirror the $(XRDIRS) list, and that works kinda sorta okay.
216 #
217 XRDIRS = $(sparc_ARCHITECTURES) $(i386_ARCHITECTURES) sun4 sfmmu \
218 sun common
219
220 XRINCDIRS = $(XRDIRS)
221
222 cscope.out tags: FRC
223 $(XREF) -x $@
|
94
95 #
96 # Rule to build prerequisites. The left part of the pattern will match
97 # PREREQ_TARGET.
98 #
99 # The location of the Makefile is determined by strippinng '.prereq' suffix from
100 # the target name. We add '.prereq' suffix to the target passed to the child
101 # Makefile so that it can distinguish prerequisite build from the regular one.
102 #
103 #
104 %.prereq:
105 @cd $(@:%.prereq=%); pwd; $(MAKE) $(NO_STATE) $(TARGET).prereq
106
107 #
108 # Rule to build architecture files. Build all required prerequisites and then
109 # build the rest (potentially in parallel).
110 #
111 $($(MACH)_ARCHITECTURES): $(PREREQ_TARGET) FRC
112 @cd $@; pwd; $(MAKE) $(NO_STATE) $(TARGET)
113
114
115 #
116 # The following is the list of directories which contain Makefiles with
117 # targets to install header file. The machine independent headers are
118 # installed by invoking the Makefile in the directory containing the
119 # header files. Machine and architecture dependent headers are installed
120 # by invoking the main makefile for that architecture/machine which,
121 # in turn, is responsible for invoking the Makefiles which install headers.
122 # It is done this way so as not to assume that all of the header files in
123 # the architecture/machine dependent subdirectories are in completely
124 # isomorphic locations.
125 #
126 COMMON_HDRDIRS= common/avs \
127 common/c2 \
128 common/des \
129 common/fs \
130 common/gssapi \
131 common/idmap \
132 common/klm \
133 common/inet \
172 i386_HDRDIRS= i86pc/vm i86xpv/vm
173
174 HDRDIRS= $(COMMON_HDRDIRS) $($(MACH)_HDRDIRS)
175 install_h check: $(HDRDIRS) $($(MACH)_ARCHITECTURES)
176
177 $(HDRDIRS): FRC
178 @cd $@; pwd; $(MAKE) $(TARGET)
179
180 # ensures that headers made by rpcgen and others are available in uts source
181 # for kernel builds to reference without building install_h
182 #
183 all_h: FRC
184 @cd common/sys; pwd; $(MAKE) $@
185 @cd common/rpc; pwd; $(MAKE) $@
186 @cd common/rpcsvc; pwd; $(MAKE) $@
187 @cd common/gssapi; pwd; $(MAKE) $@
188 @cd common/idmap; pwd; $(MAKE) $@
189 @cd common/klm; pwd; $(MAKE) $@
190
191 clean clobber: $($(MACH)_ARCHITECTURES) $(DYNHDRDIRS)
192
193 # testing convenience
194 clobber_h: $(DYNHDRDIRS)
195
196 clean.lint modlist: $($(MACH)_ARCHITECTURES)
197
198 #
199 # Cross-reference customization: build a cross-reference over all of
200 # the supported architectures. Although there's no correct way to set
201 # the include path (since we don't know what architecture is the one
202 # the user will be interested in), it's historically been set to
203 # mirror the $(XRDIRS) list, and that works kinda sorta okay.
204 #
205 XRDIRS = $(sparc_ARCHITECTURES) $(i386_ARCHITECTURES) sun4 sfmmu \
206 sun common
207
208 XRINCDIRS = $(XRDIRS)
209
210 cscope.out tags: FRC
211 $(XREF) -x $@
|