diff options
author | jlam <jlam@pkgsrc.org> | 2006-06-08 15:47:10 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2006-06-08 15:47:10 +0000 |
commit | e95152039ccd64a9880b8dcd84fc2a4b2d1d24a9 (patch) | |
tree | cf00d2c70c7234836ea49502e5e77754496967df /mk/install | |
parent | 63ceb4b6f687fdffd9d1d22491cc7a51d0d62167 (diff) | |
download | pkgsrc-e95152039ccd64a9880b8dcd84fc2a4b2d1d24a9.tar.gz |
If the install cookie file exists, then we don't need to do anything.
Also, move the interactive check into a separate target as a prelude
to removing the recursive make for invoking "real-install".
Diffstat (limited to 'mk/install')
-rw-r--r-- | mk/install/install.mk | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/mk/install/install.mk b/mk/install/install.mk index 98ecd828404..8b37216333c 100644 --- a/mk/install/install.mk +++ b/mk/install/install.mk @@ -1,4 +1,4 @@ -# $NetBSD: install.mk,v 1.4 2006/06/07 10:04:04 tron Exp $ +# $NetBSD: install.mk,v 1.5 2006/06/08 15:47:10 jlam Exp $ ###################################################################### ### install (PUBLIC) @@ -20,14 +20,12 @@ install: ${_INSTALL_TARGETS} acquire-install-lock: acquire-lock release-install-lock: release-lock -${_INSTALL_COOKIE}: -.if !empty(INTERACTIVE_STAGE:Minstall) && defined(BATCH) - @${ERROR_MSG} "The installation stage of this package requires user interaction" - @${ERROR_MSG} "Please install manually with \"cd ${.CURDIR} && ${MAKE} install\"" - @${TOUCH} ${_INTERACTIVE_COOKIE} - @${FALSE} -.else +.if !exists(${_INSTALL_COOKIE}) +${_INSTALL_COOKIE}: install-check-interactive ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} real-install PKG_PHASE=install +.else +${_INSTALL_COOKIE}: + @${DO_NADA} .endif ###################################################################### @@ -51,6 +49,23 @@ install-message: @${PHASE_MSG} "Installing for ${PKGNAME}" ###################################################################### +### install-check-interactive (PRIVATE) +###################################################################### +### install-check-interactive checks whether we must do an interactive +### install or not. +### +install-check-interactive: +.if !empty(INTERACTIVE_STAGE:Minstall) && defined(BATCH) + @${ERROR_MSG} "The installation stage of this package requires user interaction" + @${ERROR_MSG} "Please install manually with:" + @${ERROR_MSG} " \"cd ${.CURDIR} && ${MAKE} install\"" + @${TOUCH} ${_INTERACTIVE_COOKIE} + @${FALSE} +.else + @${DO_NADA} +.endif + +###################################################################### ### unprivileged-install-hook (PRIVATE, override, hook) ###################################################################### ### unprivileged-install-hook is a generic hook target that is run just |