aboutsummaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorIgor Pashev <igor.pashev@nexenta.com>2012-09-14 12:26:38 +0400
committerIgor Pashev <igor.pashev@nexenta.com>2012-09-14 12:26:38 +0400
commitc5abe7d73eca609b9f6e09b8eeb63f9bee4b1555 (patch)
tree96a44126ff559069e2e32485a61cb2b91d55e918 /rules
parent5085f1be9cf54e9db1290ea923e933f8354207f0 (diff)
downloadcibs-c5abe7d73eca609b9f6e09b8eeb63f9bee4b1555.tar.gz
Check and install build dependencies
Diffstat (limited to 'rules')
-rw-r--r--rules/archive.mk4
-rw-r--r--rules/common.mk2
-rw-r--r--rules/ips.mk16
-rw-r--r--rules/patch.mk2
4 files changed, 20 insertions, 4 deletions
diff --git a/rules/archive.mk b/rules/archive.mk
index 24b9205..1b9108f 100644
--- a/rules/archive.mk
+++ b/rules/archive.mk
@@ -53,12 +53,12 @@ download:: download-stamp
archive-unpacker := /usr/share/cibs/scripts/unpack-archive
-unpack-%-stamp: validate-%-stamp
+unpack-%-stamp: validate-%-stamp check-build-dep-stamp
$(archive-unpacker) $* $(sourcedir_$*) $(sourcedir)
touch $@
unpack-stamp: $$(addprefix unpack-,$$(addsuffix -stamp,$$(archives) $$(archive)))
-pre-configure-stamp: unpack-stamp
+pre-configure-stamp: unpack-stamp check-build-dep-stamp
checksum:
@echo '# Insert this into Makefile:'
diff --git a/rules/common.mk b/rules/common.mk
index 9ddadae..9d283f9 100644
--- a/rules/common.mk
+++ b/rules/common.mk
@@ -81,7 +81,7 @@ destdir = $(destdir.$(bits))
# Common targets for internal usage.
# Some modules (e. g. 32.mk, autotools.mk) add dependencies
# to this, for example configure with autotools
-unpack-stamp patch-stamp pre-configure-stamp configure-stamp build-stamp install-stamp:
+check-build-dep-stamp unpack-stamp patch-stamp pre-configure-stamp configure-stamp build-stamp install-stamp:
touch $@
# Common target to use from command line
diff --git a/rules/ips.mk b/rules/ips.mk
index fa3edb0..6bd46c2 100644
--- a/rules/ips.mk
+++ b/rules/ips.mk
@@ -121,6 +121,22 @@ publish-stamp: resolve-stamp
publish: publish-stamp
+
+check-build-dep-stamp: check-ips-build-dep-stamp
+
+# issue 'make d=' to skip dependency checking:
+check-ips-build-dep-stamp: d=true
+check-ips-build-dep-stamp:
+ [ -z "$d" ] || pkg list $(build-depends)
+ touch $@
+
+
+# Install build dependencies:
+build-dep:
+ $(root) pkg install $(build-depends)
+
+.PHONY: publish build-dep
+
__ips_mk := included
endif
diff --git a/rules/patch.mk b/rules/patch.mk
index b76e3a3..bbbb7b8 100644
--- a/rules/patch.mk
+++ b/rules/patch.mk
@@ -28,7 +28,7 @@ patchdir = $(CURDIR)/patches
patches := $(shell cd "$(patchdir)" && ls -1 | sort)
# Try different path levels:
-applied-%-stamp: $(patchdir)/% unpack-stamp
+applied-%-stamp: $(patchdir)/% unpack-stamp check-build-dep-stamp
cd "$(sourcedir)" && \
patch -p1 -t < $< || \
patch -p0 -t < $< || \