aboutsummaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorIgor Pashev <igor.pashev@nexenta.com>2013-04-17 19:48:42 +0400
committerIgor Pashev <igor.pashev@nexenta.com>2013-04-17 19:48:42 +0400
commitfceb7dd59defa5f07a9be22a895992462bfbf408 (patch)
tree4cccdabe4782b678853541cd0e459aa8a394e4cd /rules
parent37aabb8e1206b682d4ee3e4d794a0a650e4977c3 (diff)
downloadcibs-fceb7dd59defa5f07a9be22a895992462bfbf408.tar.gz
Do not pass proto dir if it does not exist
Diffstat (limited to 'rules')
-rw-r--r--rules/ips-manifest.mk11
-rw-r--r--rules/ips.mk4
2 files changed, 9 insertions, 6 deletions
diff --git a/rules/ips-manifest.mk b/rules/ips-manifest.mk
index 78f3d83..f8c7b5b 100644
--- a/rules/ips-manifest.mk
+++ b/rules/ips-manifest.mk
@@ -57,10 +57,7 @@ pkg-define += $(foreach _,$(variants),-D builddir.$(_)="$(builddir.$(_))")
pkg-define += -D sourcedir="$(sourcedir)"
-# Where to find files:
-pkg-protos = -d .
-pkg-protos += $(protodirs:%=-d "%")
-pkg-protos += $(foreach _,$(variants),-d "$(protodir.$(_))")
+protodirs += $(foreach _,$(variants),$(protodir.$(_)))
transformations := \
$(transdir)/defaults \
@@ -133,7 +130,11 @@ mogrify-stamp: $(mogrified-manifests)
depend-manifests := $(manifests:%=$(manifestdir)/depend-%)
$(manifestdir)/depend-% : $(manifestdir)/mogrified-%
- pkgdepend generate -m $(pkg-protos) $< > $@ || (rm -f $@; exit 1)
+ @protos="-d ."; for p in $(protodirs); do \
+ if [ -d $$p ]; then protos="$$protos -d $$p"; fi \
+ done; \
+ set -x; \
+ pkgdepend generate -m $$protos $< > $@ || (rm -f $@; exit 1)
depend-stamp: $(depend-manifests)
touch $@
$(depend-manifests): install-stamp
diff --git a/rules/ips.mk b/rules/ips.mk
index e78f2db..3dc4d25 100644
--- a/rules/ips.mk
+++ b/rules/ips.mk
@@ -39,9 +39,11 @@ pre-publish: resolve-stamp
publish-stamp: pre-publish
@if [ -n "$(ips-repo)" ]; then \
+ protos="-d ."; for p in $(protodirs); do \
+ if [ -d $$p ]; then protos="$$protos -d $$p"; fi; done; \
set -x; \
for m in $(resolved-manifests); do \
- pkgsend -s $(ips-repo) publish --fmri-in-manifest $(pkg-protos) $$m || exit 1; \
+ pkgsend -s $(ips-repo) publish --fmri-in-manifest $$protos $$m || exit 1; \
done; \
touch $@; \
else \