243 $(PKGDEPEND) generate $(PKGDEPEND_GENERATE_OPTIONS) $< >$@ |
243 $(PKGDEPEND) generate $(PKGDEPEND_GENERATE_OPTIONS) $< >$@ |
244 |
244 |
245 # These files should contain a list of packages that the component is known to |
245 # These files should contain a list of packages that the component is known to |
246 # depend on. Using resolve.deps is not required, but significantly speeds up |
246 # depend on. Using resolve.deps is not required, but significantly speeds up |
247 # the "pkg resolve" step. |
247 # the "pkg resolve" step. |
248 EXTDEPFILES = $(wildcard $(sort $(addsuffix ../resolve.deps, $(dir $(DEPENDED))))) |
248 EXTDEPFILES ?= $(wildcard $(sort $(addsuffix ../resolve.deps, $(dir $(DEPENDED))))) |
|
249 |
|
250 # If the package contains no automatically discoverable dependencies, then |
|
251 # we can speed up resolution by providing a dummy resolve.deps to skip loading |
|
252 # all the possible packages for resolution. Unfortunately, pkgdepend does not |
|
253 # accept a completely empty resolve.deps, so we pass the userland-incorporation |
|
254 # as a quick, content-free placeholder. |
|
255 NULLDEPFILE = $(BUILD_DIR)/null-resolve.deps |
249 |
256 |
250 # This is a target that should only be run by hand, and not something that |
257 # This is a target that should only be run by hand, and not something that |
251 # .resolved-$(MACH) should depend on. |
258 # .resolved-$(MACH) should depend on. |
252 sample-resolve.deps: |
259 sample-resolve.deps: |
253 echo "<transform depend type=(require|require-any) -> print %(fmri)>" > rd-trans |
260 echo "<transform depend type=(require|require-any) -> print %(fmri)>" > rd-trans |
263 fi |
270 fi |
264 |
271 |
265 |
272 |
266 # resolve the dependencies all at once |
273 # resolve the dependencies all at once |
267 $(BUILD_DIR)/.resolved-$(MACH): $(DEPENDED) |
274 $(BUILD_DIR)/.resolved-$(MACH): $(DEPENDED) |
|
275 if [[ $(EXTDEPFILES) == $(NULLDEPFILE) ]] ; then \ |
|
276 echo 'consolidation/userland/userland-incorporation' > $(NULLDEPFILE) ; \ |
|
277 fi |
268 $(PKGDEPEND) resolve $(EXTDEPFILES:%=-e %) -m $(DEPENDED) |
278 $(PKGDEPEND) resolve $(EXTDEPFILES:%=-e %) -m $(DEPENDED) |
269 $(TOUCH) $@ |
279 $(TOUCH) $@ |
270 |
280 |
271 # lint the manifests all at once |
281 # lint the manifests all at once |
272 $(BUILD_DIR)/.linted-$(MACH): $(BUILD_DIR)/.resolved-$(MACH) |
282 $(BUILD_DIR)/.linted-$(MACH): $(BUILD_DIR)/.resolved-$(MACH) |