pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/install If the install cookie file exists, then we ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/87667850da2f
branches:  trunk
changeset: 514176:87667850da2f
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Thu Jun 08 15:47:10 2006 +0000

description:
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:

 mk/install/install.mk |  31 +++++++++++++++++++++++--------
 1 files changed, 23 insertions(+), 8 deletions(-)

diffs (53 lines):

diff -r 1b41ef732611 -r 87667850da2f mk/install/install.mk
--- a/mk/install/install.mk     Thu Jun 08 15:45:52 2006 +0000
+++ b/mk/install/install.mk     Thu Jun 08 15:47:10 2006 +0000
@@ -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 @@
 acquire-install-lock: acquire-lock
 release-install-lock: release-lock
 
+.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}:
-.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
-       ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} real-install PKG_PHASE=install
+       @${DO_NADA}
 .endif
 
 ######################################################################
@@ -51,6 +49,23 @@
        @${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



Home | Main Index | Thread Index | Old Index