From fbe5f38c5630b86dcf6fb4f6738508d04d85dee1 Mon Sep 17 00:00:00 2001 From: jlam Date: Wed, 23 Oct 2002 17:43:16 +0000 Subject: Unless PKG_RCD_SCRIPTS=YES and RCD_SCRIPTS is non-empty, don't create ${RCD_SCRIPTS_DIR} as it's not used at all. --- mk/bsd.pkg.install.mk | 9 +++------ mk/install/deinstall | 4 ++-- mk/install/install | 9 +++++++-- 3 files changed, 12 insertions(+), 10 deletions(-) (limited to 'mk') diff --git a/mk/bsd.pkg.install.mk b/mk/bsd.pkg.install.mk index 8fe72f05cac..69a4a125784 100644 --- a/mk/bsd.pkg.install.mk +++ b/mk/bsd.pkg.install.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.install.mk,v 1.37 2002/10/23 01:16:41 jlam Exp $ +# $NetBSD: bsd.pkg.install.mk,v 1.38 2002/10/23 17:43:16 jlam Exp $ # # This Makefile fragment is included by package Makefiles to use the common # INSTALL/DEINSTALL scripts. To use this Makefile fragment, simply: @@ -170,8 +170,8 @@ MESSAGE_SUBST+= RCD_SCRIPTS_DIR=${RCD_SCRIPTS_DIR} # created and should attempt to be destroyed by the INSTALL/DEINSTALL # scripts. MAKE_DIRS is used the same way, but the package admin # isn't prompted to remove the directory at post-deinstall time if it -# isn't empty. For convenience, ${PKG_SYSCONFDIR} and -# ${RCD_SCRIPTS_DIR} are automatically added to MAKE_DIRS. +# isn't empty. For convenience, ${PKG_SYSCONFDIR} is automatically +# added to MAKE_DIRS. # # OWN_DIRS_PERMS contains a list of "directory owner group mode" sublists # representing directories for this package that should be @@ -182,9 +182,6 @@ MESSAGE_SUBST+= RCD_SCRIPTS_DIR=${RCD_SCRIPTS_DIR} MAKE_DIRS?= # empty MAKE_DIRS_PERMS?= # empty _MAKE_DIRS= ${PKG_SYSCONFDIR} ${MAKE_DIRS} -.if !empty(RCD_SCRIPTS) -_MAKE_DIRS+= ${RCD_SCRIPTS_DIR} -.endif OWN_DIRS?= # empty OWN_DIRS_PERMS?= # empty FILES_SUBST+= MAKE_DIRS=${_MAKE_DIRS:Q} diff --git a/mk/install/deinstall b/mk/install/deinstall index cb923e9460f..debc3c768ab 100644 --- a/mk/install/deinstall +++ b/mk/install/deinstall @@ -1,6 +1,6 @@ # start of deinstall # -# $NetBSD: deinstall,v 1.13 2002/10/17 16:15:14 heinz Exp $ +# $NetBSD: deinstall,v 1.14 2002/10/23 17:43:17 jlam Exp $ eval set -- ${PKG_USERS} for userset; do @@ -41,7 +41,7 @@ while [ $# -gt 0 ]; do ALL_FILES="${ALL_FILES} \"${samplefile}\" \"${file}\"" done -eval set -- ${MAKE_DIRS} +eval set -- ${RCD_SCRIPTS_DIR} ${MAKE_DIRS} for dir; do ALL_MAKE_DIRS="${ALL_MAKE_DIRS} \"${dir}\"" done diff --git a/mk/install/install b/mk/install/install index 70db7f40f48..554e6dd0fd8 100644 --- a/mk/install/install +++ b/mk/install/install @@ -1,6 +1,6 @@ # start of install # -# $NetBSD: install,v 1.15 2002/10/04 23:46:27 jlam Exp $ +# $NetBSD: install,v 1.16 2002/10/23 17:43:17 jlam Exp $ case ${STAGE} in PRE-INSTALL) @@ -110,7 +110,12 @@ POST-INSTALL) if [ -n "${MAKE_DIRS}" -o -n "${OWN_DIRS}" -o \ -n "${MAKE_DIRS_PERMS}" -o -n "${OWN_DIRS_PERMS}" ]; then _print_dir_header=1 - eval set -- ${MAKE_DIRS} ${OWN_DIRS} + if [ -z "${RCD_SCRIPTS}" -o "${_PKG_RCD_SCRIPTS}" = "NO" ]; then + _RCD_SCRIPTS_DIR= + else + _RCD_SCRIPTS_DIR="${RCD_SCRIPTS_DIR}" + fi + eval set -- ${_RCD_SCRIPTS_DIR} ${MAKE_DIRS} ${OWN_DIRS} for dir; do if [ -d "${dir}" ]; then continue -- cgit v1.2.3