diff options
author | jlam <jlam> | 2003-08-18 16:16:42 +0000 |
---|---|---|
committer | jlam <jlam> | 2003-08-18 16:16:42 +0000 |
commit | a7cd76e1c5bb95f5b7777ce9fad75c2a71016b54 (patch) | |
tree | 2abc277fa1b4ccf457018a505b804adbd5e0a508 /mk/bsd.pkg.mk | |
parent | 7aeb31bec207b307a866c0fdd74615f86e6d2192 (diff) | |
download | pkgsrc-a7cd76e1c5bb95f5b7777ce9fad75c2a71016b54.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.
Diffstat (limited to 'mk/bsd.pkg.mk')
-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 \ |