make-rules/ips.mk
changeset 1235 413599fe2d31
parent 1205 6c6c27bcf9ac
child 1238 fb93a6ad84e5
equal deleted inserted replaced
1234:6f834970c557 1235:413599fe2d31
   240 # generate dependencies
   240 # generate dependencies
   241 PKGDEPEND_GENERATE_OPTIONS = -m $(PKG_PROTO_DIRS:%=-d %)
   241 PKGDEPEND_GENERATE_OPTIONS = -m $(PKG_PROTO_DIRS:%=-d %)
   242 $(MANIFEST_BASE)-%.depend:	$(MANIFEST_BASE)-%.mangled
   242 $(MANIFEST_BASE)-%.depend:	$(MANIFEST_BASE)-%.mangled
   243 	$(PKGDEPEND) generate $(PKGDEPEND_GENERATE_OPTIONS) $< >[email protected]
   243 	$(PKGDEPEND) generate $(PKGDEPEND_GENERATE_OPTIONS) $< >[email protected]
   244 
   244 
       
   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
       
   247 # the "pkg resolve" step.
       
   248 EXTDEPFILES = $(wildcard $(addsuffix resolve.deps, $(subst build/, , $(dir $(DEPENDED)))))
       
   249 
       
   250 # This is a target that should only be run by hand, and not something that
       
   251 # .resolved-$(MACH) should depend on.
       
   252 sample-resolve.deps:
       
   253 	echo "<transform depend type=require -> print %(fmri)>" > rd-trans
       
   254 	for i in build/*.depend; do \
       
   255 		$(PKGMOGRIFY) -O /dev/null $$i rd-trans | sort -u > m1; \
       
   256 		$(PKGMOGRIFY) -O /dev/null $$i.res rd-trans | sort -u > m2; \
       
   257 		comm -13 m1 m2; \
       
   258 	done | sed -e 's/@.*//' -e 's,^pkg:/,,' | sort -u > resolve.deps
       
   259 	$(RM) rd-trans m1 m2
       
   260 	if [[ ! -s resolve.deps ]]; then \
       
   261 		echo "No computed dependencies found; removing empty resolve.deps."; \
       
   262 		$(RM) resolve.deps; \
       
   263 	fi
       
   264 
       
   265 
   245 # resolve the dependencies all at once
   266 # resolve the dependencies all at once
   246 $(BUILD_DIR)/.resolved-$(MACH):	$(DEPENDED)
   267 $(BUILD_DIR)/.resolved-$(MACH):	$(DEPENDED)
   247 	$(PKGDEPEND) resolve -m $(DEPENDED)
   268 	$(PKGDEPEND) resolve $(EXTDEPFILES:%=-e %) -m $(DEPENDED)
   248 	$(TOUCH) [email protected]
   269 	$(TOUCH) [email protected]
   249 
   270 
   250 # lint the manifests all at once
   271 # lint the manifests all at once
   251 $(BUILD_DIR)/.linted-$(MACH):	$(BUILD_DIR)/.resolved-$(MACH)
   272 $(BUILD_DIR)/.linted-$(MACH):	$(BUILD_DIR)/.resolved-$(MACH)
   252 	@echo "VALIDATING MANIFEST CONTENT: $(RESOLVED)"
   273 	@echo "VALIDATING MANIFEST CONTENT: $(RESOLVED)"