diff options
Diffstat (limited to 'rules')
-rw-r--r-- | rules/archive.mk | 4 | ||||
-rw-r--r-- | rules/common.mk | 2 | ||||
-rw-r--r-- | rules/ips.mk | 16 | ||||
-rw-r--r-- | rules/patch.mk | 2 |
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 < $< || \ |