diff options
Diffstat (limited to 'mk/install')
-rw-r--r-- | mk/install/bsd.install.mk | 13 | ||||
-rw-r--r-- | mk/install/install.mk | 25 | ||||
-rw-r--r-- | mk/install/replace.mk | 6 |
3 files changed, 28 insertions, 16 deletions
diff --git a/mk/install/bsd.install.mk b/mk/install/bsd.install.mk index 09a68bedb96..2f8383259d6 100644 --- a/mk/install/bsd.install.mk +++ b/mk/install/bsd.install.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.install.mk,v 1.4 2006/07/05 09:08:35 jlam Exp $ +# $NetBSD: bsd.install.mk,v 1.5 2006/07/05 22:21:02 jlam Exp $ # # This Makefile fragment is included by bsd.pkg.mk and provides all # variables and targets related to installing packages. @@ -19,13 +19,16 @@ _INSTALL_COOKIE= ${WRKDIR}/.install_done ###################################################################### ### install is a public target to install the package. ### -.if defined(NO_INSTALL) .PHONY: install -. if !target(install) +.if !defined(NO_INSTALL) +. include "${PKGSRCDIR}/mk/install/install.mk" +.elif !target(install) +. if exists(${_INSTALL_COOKIE}) +install: + @${DO_NADA} +. else install: ${_PKGSRC_BUILD_TARGETS} install-cookie . endif -.else -. include "${PKGSRCDIR}/mk/install/install.mk" .endif .include "${PKGSRCDIR}/mk/install/deinstall.mk" diff --git a/mk/install/install.mk b/mk/install/install.mk index 43f2350a034..bc952a1d7b2 100644 --- a/mk/install/install.mk +++ b/mk/install/install.mk @@ -1,4 +1,4 @@ -# $NetBSD: install.mk,v 1.9 2006/07/05 09:08:35 jlam Exp $ +# $NetBSD: install.mk,v 1.10 2006/07/05 22:21:02 jlam Exp $ ###################################################################### ### install (PUBLIC) @@ -14,11 +14,13 @@ _INSTALL_TARGETS+= release-install-lock .PHONY: install .if !target(install) -. if !exists(${_INSTALL_COOKIE}) -install: ${_INSTALL_TARGETS} -. else +. if exists(${_INSTALL_COOKIE}) install: @${DO_NADA} +. elif exists(${_BARRIER_COOKIE}) +install: ${_INSTALL_TARGETS} +. else +install: barrier . endif .endif @@ -26,23 +28,26 @@ install: acquire-install-lock: acquire-lock release-install-lock: release-lock -${_INSTALL_COOKIE}: install-check-interactive - ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${SETENV} ${BUILD_ENV} ${MAKE} ${MAKEFLAGS} real-install PKG_PHASE=install +.if exists(${_INSTALL_COOKIE}) +${_INSTALL_COOKIE}: + @${DO_NADA} +.else +${_INSTALL_COOKIE}: real-install +.endif ###################################################################### ### real-install (PRIVATE) ###################################################################### -### real-install is a helper target to set the PKG_PHASE explicitly to -### "install" before running the remainder of the install targets. +### real-install is a helper target onto which one can hook all of the +### targets that do the actual installing of the built objects. ### -.if !exists(${_INSTALL_COOKIE}) +_REAL_INSTALL_TARGETS+= install-check-interactive _REAL_INSTALL_TARGETS+= install-check-version _REAL_INSTALL_TARGETS+= install-message _REAL_INSTALL_TARGETS+= install-vars _REAL_INSTALL_TARGETS+= unprivileged-install-hook _REAL_INSTALL_TARGETS+= install-all _REAL_INSTALL_TARGETS+= install-cookie -.endif .PHONY: real-install real-install: ${_REAL_INSTALL_TARGETS} diff --git a/mk/install/replace.mk b/mk/install/replace.mk index 7eb41ac3eee..a529bff3456 100644 --- a/mk/install/replace.mk +++ b/mk/install/replace.mk @@ -1,4 +1,4 @@ -# $NetBSD: replace.mk,v 1.4 2006/06/05 22:49:44 jlam Exp $ +# $NetBSD: replace.mk,v 1.5 2006/07/05 22:21:02 jlam Exp $ ###################################################################### ### replace (PUBLIC) @@ -12,7 +12,11 @@ _REPLACE_TARGETS+= unprivileged-install-hook .PHONY: replace su-replace .if !target(replace) +. if exists(${_BARRIER_COOKIE}) replace: ${_REPLACE_TARGETS} su-target +. else +replace: barrier +. endif .endif replace-message: |