make-rules/ips.mk
changeset 53 e398cb2c4b45
parent 49 13d31a6d756e
child 59 7500d63edb42
equal deleted inserted replaced
52:709174c893d4 53:e398cb2c4b45
   117 # copy the canonical manifest(s) to the build tree
   117 # copy the canonical manifest(s) to the build tree
   118 $(MANIFEST_BASE)-%.generate:	%.p5m canonical-manifests
   118 $(MANIFEST_BASE)-%.generate:	%.p5m canonical-manifests
   119 	cat $(METADATA_TEMPLATE) $< >[email protected]
   119 	cat $(METADATA_TEMPLATE) $< >[email protected]
   120 
   120 
   121 # mogrify the manifest
   121 # mogrify the manifest
   122 $(MANIFEST_BASE)-%.mogrified:	%.p5m $(METADATA_TEMPLATE) canonical-manifests
   122 $(MANIFEST_BASE)-%.mogrified:	%.p5m canonical-manifests
   123 	$(PKGMOGRIFY) $(PKG_OPTIONS) $(METADATA_TEMPLATE) $< \
   123 	$(PKGMOGRIFY) $(PKG_OPTIONS) $< \
   124 		$(PUBLISH_TRANSFORMS) | \
   124 		$(PUBLISH_TRANSFORMS) | \
   125 		sed -e '/^$$/d' -e '/^#.*$$/d' | uniq >[email protected]
   125 		sed -e '/^$$/d' -e '/^#.*$$/d' | uniq >[email protected]
   126 
   126 
   127 # generate dependencies, drop variant.arch in set and depend actions because
   127 # generate dependencies, drop variant.arch in set and depend actions because
   128 # "pkgdepend resolve" fails when it's present.
   128 # "pkgdepend resolve" fails when it's present.
   129 $(MANIFEST_BASE)-%.depend:	$(MANIFEST_BASE)-%.mogrified
   129 $(MANIFEST_BASE)-%.depend:	$(MANIFEST_BASE)-%.mogrified
   130 	$(PKGDEPEND) generate -m $< $(PROTO_DIR) | \
   130 	$(PKGDEPEND) generate -m $< $(PROTO_DIR) >[email protected]
   131 	$(PKGMOGRIFY) /dev/fd/0 $(WS_TOP)/transforms/drop-variant.arch >[email protected]
       
   132 
   131 
   133 # resolve dependencies, prepend the mogrified manifest, less the unresolved
   132 # resolve dependencies, prepend the mogrified manifest, less the unresolved
   134 # dependencies to the result.
   133 # dependencies to the result.
   135 $(MANIFEST_BASE)-%.resolved:	$(MANIFEST_BASE)-%.depend
   134 $(MANIFEST_BASE)-%.resolved:	$(MANIFEST_BASE)-%.depend
   136 	$(PKGMOGRIFY) $(@:%.resolved=%.mogrified) \
   135 	($(PKGMOGRIFY) $(@:%.resolved=%.mogrified) \
   137 		$(WS_TOP)/transforms/drop-unresolved-dependencies | \
   136 		$(WS_TOP)/transforms/drop-unresolved-dependencies | \
   138 		sed -e '/^$$/d' -e '/^#.*$$/d' | uniq >[email protected]
   137 		sed -e '/^$$/d' -e '/^#.*$$/d' ; \
   139 	echo "depend fmri=consolidation/$(CONSOLIDATION)/$(CONSOLIDATION)-incorporation type=require">>[email protected]
   138 	 $(PKGDEPEND) resolve -o $< | sed -e '1d') | uniq >[email protected]
   140 	$(PKGDEPEND) resolve -o $< | sed -e '1d' >>[email protected]
       
   141 
   139 
   142 # lint the manifest before we publish with it.
   140 # lint the manifest before we publish with it.
   143 $(MANIFEST_BASE)-%.linted:	$(MANIFEST_BASE)-%.resolved
   141 $(MANIFEST_BASE)-%.linted:	$(MANIFEST_BASE)-%.resolved
   144 	@echo "VALIDATING MANIFEST CONTENT: $<"
   142 	@echo "VALIDATING MANIFEST CONTENT: $<"
   145 	PYTHONPATH=$(WS_TOP)/tools/python $(PKGLINT) -f $(WS_TOP)/tools/pkglintrc $<
   143 	PYTHONPATH=$(WS_TOOLS)/python $(PKGLINT) \
       
   144 		$(CANONICAL_REPO:%=-r % -c $(WS_LINT_CACHE)) \
       
   145 		-f $(WS_TOOLS)/pkglintrc $<
   146 	$(PKGFMT) <$< >[email protected]
   146 	$(PKGFMT) <$< >[email protected]
   147 
   147 
   148 # published
   148 # published
   149 $(MANIFEST_BASE)-%.published:	$(MANIFEST_BASE)-%.linted
   149 $(MANIFEST_BASE)-%.published:	$(MANIFEST_BASE)-%.linted
   150 	$(PKGSEND) -s $(PKG_REPO) publish --fmri-in-manifest \
   150 	$(PKGSEND) -s $(PKG_REPO) publish --fmri-in-manifest \
   151 		-d $(PROTO_DIR) -d $(@D) -d . $<
   151 		-d $(PROTO_DIR) -d $(@D) -d . $<
   152 	$(PKGFMT) <$< >[email protected]
   152 	$(PKGFMT) <$< >[email protected]
   153 	$(PKGMOGRIFY) $(PKG_OPTIONS) [email protected] \
       
   154 			$(WS_TOP)/transforms/print-consolidation-depend | \
       
   155  		sed -e '/^$$/d' -e '/^#.*$$/d' | sort -u > $(WS_INCORPORATIONS)/userland/$(@:$(MANIFEST_BASE)-%.published=%.fragment)
       
   156 
   153 
   157 $(COMPONENT_SRC)/.published:	$(PUBLISHED)
   154 $(COMPONENT_SRC)/.published:	$(PUBLISHED)
   158 	$(TOUCH) [email protected]
   155 	$(TOUCH) [email protected]
   159 
   156 
   160 print-package-names:	canonical-manifests
   157 print-package-names:	canonical-manifests