make-rules/ips.mk
branchs11-update
changeset 2855 576d5a7857b7
parent 2732 1a65a9df6f2e
child 2881 8cae3c148a42
equal deleted inserted replaced
2854:78392507fd82 2855:576d5a7857b7
    37 
    37 
    38 PKGDEPEND =	/usr/bin/pkgdepend
    38 PKGDEPEND =	/usr/bin/pkgdepend
    39 PKGFMT =	/usr/bin/pkgfmt
    39 PKGFMT =	/usr/bin/pkgfmt
    40 PKGMOGRIFY =	/usr/bin/pkgmogrify
    40 PKGMOGRIFY =	/usr/bin/pkgmogrify
    41 PKGSEND =	/usr/bin/pkgsend
    41 PKGSEND =	/usr/bin/pkgsend
       
    42 ifeq   ($(strip $(PKGLINT_COMPONENT)),)
    42 PKGLINT =	/usr/bin/pkglint
    43 PKGLINT =	/usr/bin/pkglint
       
    44 else
       
    45 PKGLINT =	${WS_TOOLS}/pkglint
       
    46 endif
    43 PKGMANGLE =	$(WS_TOOLS)/userland-mangler
    47 PKGMANGLE =	$(WS_TOOLS)/userland-mangler
    44 
    48 
    45 # Package headers should all pretty much follow the same format
    49 # Package headers should all pretty much follow the same format
    46 METADATA_TEMPLATE =		$(WS_TOP)/transforms/manifest-metadata-template
    50 METADATA_TEMPLATE =		$(WS_TOP)/transforms/manifest-metadata-template
    47 COPYRIGHT_TEMPLATE =		$(WS_TOP)/transforms/copyright-template
    51 COPYRIGHT_TEMPLATE =		$(WS_TOP)/transforms/copyright-template
   238 	$(PKGDEPEND) generate $(PKGDEPEND_GENERATE_OPTIONS) $< >$@
   242 	$(PKGDEPEND) generate $(PKGDEPEND_GENERATE_OPTIONS) $< >$@
   239 
   243 
   240 # These files should contain a list of packages that the component is known to
   244 # These files should contain a list of packages that the component is known to
   241 # depend on.  Using resolve.deps is not required, but significantly speeds up
   245 # depend on.  Using resolve.deps is not required, but significantly speeds up
   242 # the "pkg resolve" step.
   246 # the "pkg resolve" step.
   243 EXTDEPFILES = $(wildcard $(sort $(addsuffix ../resolve.deps, $(dir $(DEPENDED)))))
   247 EXTDEPFILES ?= $(wildcard $(sort $(addsuffix ../resolve.deps, $(dir $(DEPENDED)))))
       
   248 
       
   249 # If the package contains no automatically discoverable dependencies, then
       
   250 # we can speed up resolution by providing a dummy resolve.deps to skip loading
       
   251 # all the possible packages for resolution.  Unfortunately, pkgdepend does not
       
   252 # accept a completely empty resolve.deps, so we pass the userland-incorporation
       
   253 # as a quick, content-free placeholder.
       
   254 NULLDEPFILE = $(BUILD_DIR)/null-resolve.deps
   244 
   255 
   245 # This is a target that should only be run by hand, and not something that
   256 # This is a target that should only be run by hand, and not something that
   246 # .resolved-$(MACH) should depend on.
   257 # .resolved-$(MACH) should depend on.
   247 sample-resolve.deps:
   258 sample-resolve.deps:
   248 	@echo "<transform depend type=(require|require-any) -> print %(fmri)>" > rd-trans
   259 	@echo "<transform depend type=(require|require-any) -> print %(fmri)>" > rd-trans
   257 		$(RM) resolve.deps; \
   268 		$(RM) resolve.deps; \
   258 	fi
   269 	fi
   259 
   270 
   260 # resolve the dependencies all at once
   271 # resolve the dependencies all at once
   261 $(BUILD_DIR)/.resolved-$(MACH):	$(DEPENDED)
   272 $(BUILD_DIR)/.resolved-$(MACH):	$(DEPENDED)
       
   273 	if [[ "$(EXTDEPFILES)" == "$(NULLDEPFILE)" ]] ; then \
       
   274 	  echo 'consolidation/userland/userland-incorporation' > $(NULLDEPFILE) ; \
       
   275 	fi
   262 	$(PKGDEPEND) resolve $(EXTDEPFILES:%=-e %) -m $(DEPENDED)
   276 	$(PKGDEPEND) resolve $(EXTDEPFILES:%=-e %) -m $(DEPENDED)
   263 	$(TOUCH) $@
   277 	$(TOUCH) $@
   264 
   278 
   265 # lint the manifests all at once
   279 # lint the manifests all at once
   266 $(BUILD_DIR)/.linted-$(MACH):	$(BUILD_DIR)/.resolved-$(MACH)
   280 $(BUILD_DIR)/.linted-$(MACH):	$(BUILD_DIR)/.resolved-$(MACH)