diff options
author | jlam <jlam@pkgsrc.org> | 2003-08-18 16:16:42 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2003-08-18 16:16:42 +0000 |
commit | 2eef8f8aac727deb78c564e77919f5439b315d60 (patch) | |
tree | 2abc277fa1b4ccf457018a505b804adbd5e0a508 | |
parent | 4aee46fde4edb887ca33af782a821a956454767f (diff) | |
download | pkgsrc-2eef8f8aac727deb78c564e77919f5439b315d60.tar.gz |
If INSTALLATION_DIRS is defined, then create the listed subdirectories
under ${PREFIX} prior to calling the do-install target. Try to be smart
about using the right ${INSTALL_*_DIR} to create the directory. This is a
cheap way to list some directories we want to create for a "pkgviews"
package since we don't run mtree.
-rw-r--r-- | mk/bsd.pkg.mk | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index cbfeb9d05b1..bb4627a6ac3 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1216.2.22 2003/08/18 15:35:08 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1216.2.23 2003/08/18 16:16:42 jlam Exp $ # # This file is in the public domain. # @@ -2438,6 +2438,21 @@ real-su-install: ${MESSAGE} ${ECHO_MSG} "If this is not desired, set it to an appropriate value (${DEF_UMASK})"; \ ${ECHO_MSG} "and install this package again by \`\`${MAKE} deinstall reinstall''."; \ fi +.if defined(INSTALLATION_DIRS) && !empty(INSTALLATION_DIRS) + ${_PKG_SILENT}${_PKG_DEBUG}${ECHO_MSG} "${_PKGSRC_IN}> Creating installation directories" + ${_PKG_SILENT}${_PKG_DEBUG} \ + for dir in ${INSTALLATION_DIRS}; do \ + case $$dir in \ + /*) ;; \ + *bin|*bin/*|*libexec|*libexec/*) + ${INSTALL_PROGRAM_DIR} ${PREFIX}/$$dir ;; \ + *man/*) \ + ${INSTALL_MAN_DIR} ${PREFIX}/$$dir ;; \ + *) \ + ${INSTALL_DATA_DIR} ${PREFIX}/$$dir ;; \ + esac; \ + done +.endif # INSTALLATION_DIRS .if !defined(NO_MTREE) ${_PKG_SILENT}${_PKG_DEBUG}if [ `${ID} -u` = 0 ]; then \ if [ ! -f ${MTREE_FILE} ]; then \ |