make-rules/ips.mk
changeset 99 c15c9099bb44
parent 93 b579c7b1bb44
child 117 8f634eb6f66b
--- a/make-rules/ips.mk	Tue Feb 22 10:12:42 2011 -0800
+++ b/make-rules/ips.mk	Wed Feb 23 10:37:11 2011 -0800
@@ -75,6 +75,8 @@
 
 PKG_OPTIONS +=		$(PKG_MACROS:%=-D %)
 
+PKG_PROTO_DIRS += $(PROTO_DIR) $(@D) $(COMPONENT_DIR)
+
 MANIFEST_BASE =		$(BUILD_DIR)/manifest-$(MACH)
 
 CANONICAL_MANIFESTS =	$(wildcard *.p5m)
@@ -117,8 +119,9 @@
 		sed -e '/^$$/d' -e '/^#.*$$/d' | uniq >[email protected]
 
 # generate dependencies
+PKGDEPEND_GENERATE_OPTIONS = -m $(PKG_PROTO_DIRS:%=-d %)
 $(MANIFEST_BASE)-%.depend:	$(MANIFEST_BASE)-%.mogrified
-	$(PKGDEPEND) generate -m $< $(PROTO_DIR) >[email protected]
+	$(PKGDEPEND) generate $(PKGDEPEND_GENERATE_OPTIONS) $< >[email protected]
 
 # resolve dependencies, prepend the mogrified manifest, less the unresolved
 # dependencies to the result.
@@ -137,9 +140,10 @@
 	$(PKGFMT) <$< >[email protected]
 
 # published
+PKGSEND_PUBLISH_OPTIONS = -s $(PKG_REPO) publish --fmri-in-manifest
+PKGSEND_PUBLISH_OPTIONS += $(PKG_PROTO_DIRS:%=-d %)
 $(MANIFEST_BASE)-%.published:	$(MANIFEST_BASE)-%.linted
-	$(PKGSEND) -s $(PKG_REPO) publish --fmri-in-manifest \
-		-d $(PROTO_DIR) -d $(@D) -d . $<
+	$(PKGSEND) $(PKGSEND_PUBLISH_OPTIONS) $<
 	$(PKGFMT) <$< >[email protected]
 
 $(BUILD_DIR)/.published:	$(PUBLISHED)