pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/install It has always annoyed be that package autho...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f850f9c27d8d
branches:  trunk
changeset: 533267:f850f9c27d8d
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Thu Sep 13 09:44:58 2007 +0000

description:
It has always annoyed be that package authors had to write ${PKGMANDIR}/
in the definition of INSTALLATION_DIRS, where a short man/ would be much
shorter. Since we already have that man-transforming magic in some other
places of pkgsrc, it's also here.

While here, documented INSTALLATION_DIRS and
INSTALLATION_DIRS_FROM_PLIST so they are found by "bmake help".

diffstat:

 mk/install/install.mk |  18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r 818717755917 -r f850f9c27d8d mk/install/install.mk
--- a/mk/install/install.mk     Thu Sep 13 02:26:10 2007 +0000
+++ b/mk/install/install.mk     Thu Sep 13 09:44:58 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.46 2007/08/14 23:59:25 joerg Exp $
+# $NetBSD: install.mk,v 1.47 2007/09/13 09:44:58 rillig Exp $
 #
 # This file provides the code for the "install" phase.
 #
@@ -20,6 +20,20 @@
 #      This hook is placed _before_ switching to privileged mode
 #      in order to install the package.
 #
+# === Package-settable variables ===
+#
+# INSTALLATION_DIRS
+#      A list of directories that should be created at the very
+#      beginning of the install phase. These directories are relative
+#      to ${PREFIX}. As a convenience, a leading man/ is transformed
+#      to ${PKGMANDIR}, to save package authors from typing too much.
+#
+# INSTALLATION_DIRS_FROM_PLIST
+#      In most (or even all?) cases the PLIST files in the package
+#      directory already contain all directories that are needed.
+#      When this variable is set to "yes", all directories mentioned
+#      in the PLIST files will be created like in INSTALLATION_DIRS.
+#
 
 ######################################################################
 ### install (PUBLIC)
@@ -231,7 +245,7 @@
 .if defined(INSTALLATION_DIRS) && !empty(INSTALLATION_DIRS)
        @${STEP_MSG} "Creating installation directories"
        ${RUN}                                                          \
-       for dir in ${INSTALLATION_DIRS}; do                             \
+       for dir in ${INSTALLATION_DIRS:C,^man/,${PKGMANDIR}/,}; do      \
                case "$$dir" in                                         \
                ${PREFIX}/*)                                            \
                        dir=`${ECHO} "$$dir" | ${SED} "s|^${PREFIX}/||"` ;; \



Home | Main Index | Thread Index | Old Index