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 $(addsuffix resolve.deps, $(subst build/, , $(dir $(DEPENDED))))) |
248 EXTDEPFILES = $(wildcard $(sort $(addsuffix ../resolve.deps, $(dir $(DEPENDED))))) |
249 |
249 |
250 # This is a target that should only be run by hand, and not something that |
250 # This is a target that should only be run by hand, and not something that |
251 # .resolved-$(MACH) should depend on. |
251 # .resolved-$(MACH) should depend on. |
252 sample-resolve.deps: |
252 sample-resolve.deps: |
253 echo "<transform depend type=require -> print %(fmri)>" > rd-trans |
253 echo "<transform depend type=(require|require-any) -> print %(fmri)>" > rd-trans |
254 for i in build/*.depend; do \ |
254 for i in build/*.depend; do \ |
255 $(PKGMOGRIFY) -O /dev/null $$i rd-trans | sort -u > m1; \ |
255 $(PKGMOGRIFY) -O /dev/null $$i rd-trans | tr " " "\n" | sort -u > m1; \ |
256 $(PKGMOGRIFY) -O /dev/null $$i.res rd-trans | sort -u > m2; \ |
256 $(PKGMOGRIFY) -O /dev/null $$i.res rd-trans | tr " " "\n" | sort -u > m2; \ |
257 comm -13 m1 m2; \ |
257 comm -13 m1 m2; \ |
258 done | sed -e 's/@.*//' -e 's,^pkg:/,,' | sort -u > resolve.deps |
258 done | sed -e 's/@[^ ]*//g' -e 's,pkg:/,,g' | sort -u > resolve.deps |
259 $(RM) rd-trans m1 m2 |
259 $(RM) rd-trans m1 m2 |
260 if [[ ! -s resolve.deps ]]; then \ |
260 if [[ ! -s resolve.deps ]]; then \ |
261 echo "No computed dependencies found; removing empty resolve.deps."; \ |
261 echo "No computed dependencies found; removing empty resolve.deps."; \ |
262 $(RM) resolve.deps; \ |
262 $(RM) resolve.deps; \ |
263 fi |
263 fi |