From a5c7cf36dcb4f85a88734b17114448d8a466d84b Mon Sep 17 00:00:00 2001 From: jlam Date: Mon, 1 Oct 2001 21:15:11 +0000 Subject: Allow customizing the message for _SU_TARGET by substituting for "$action", where action can be "install", "package", "create user for", etc., instead of blindly always saying "install". Define "action" before calling ${_SU_TARGET} whereever it is used. --- mk/bsd.pkg.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mk/bsd.pkg.mk') diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index cfc4c32bf65..a7385fb6511 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.817 2001/10/01 17:14:40 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.818 2001/10/01 21:15:11 jlam Exp $ # # This file is in the public domain. # @@ -2014,7 +2014,7 @@ _SU_TARGET= \ ${ECHO} "*** WARNING *** Running: ${PRE_ROOT_CMD}"; \ ${PRE_ROOT_CMD}; \ fi; \ - ${ECHO_MSG} "${_PKGSRC_IN}> Becoming root@`/bin/hostname` to install ${PKGNAME}."; \ + ${ECHO_MSG} "${_PKGSRC_IN}> Becoming root@`/bin/hostname` to $$action ${PKGNAME}."; \ ${ECHO_MSG} -n "`${ECHO} ${SU_CMD} | ${AWK} '{ print $$1 }'` ";\ ${SU_CMD} "cd ${.CURDIR}; ${MAKE} $$args ${MAKEFLAGS} $$realtarget $$realflags"; \ fi @@ -2033,12 +2033,14 @@ do-su-install: @${ECHO_MSG} "${_PKGSRC_IN}> Installing for ${PKGNAME}" ${_PKG_SILENT}${_PKG_DEBUG} \ realtarget="real-su-install"; \ + action="install"; \ ${_SU_TARGET} do-su-package: @${ECHO_MSG} "${_PKGSRC_IN}> Packaging ${PKGNAME}" ${_PKG_SILENT}${_PKG_DEBUG} \ realtarget="real-su-package"; \ + action="package"; \ ${_SU_TARGET} @@ -2081,6 +2083,7 @@ do-su-deinstall: uptodate-pkgtools ${_PKG_SILENT}${_PKG_DEBUG} \ realtarget="real-su-deinstall"; \ realflags="DEINSTALLDEPENDS=${DEINSTALLDEPENDS}"; \ + action="deinstall"; \ ${_SU_TARGET} . if (${DEINSTALLDEPENDS} != "NO") -- cgit v1.2.3