pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/install mk/install: fix documentation and speed up ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/784b64603b8e
branches:  trunk
changeset: 457024:784b64603b8e
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat Aug 14 08:38:01 2021 +0000

description:
mk/install: fix documentation and speed up install-dirs-from-PLIST

The documentation did not mention that conditional entries in PLIST
files are skipped.  Pkglint doesn't know this either and issues wrong
notes that some directories are redundant in INSTALLATION_DIRS when in
reality they need to be listed there.

While here, filter out some duplicate directories.  This invokes the
command for creating a single directory less often.  Since PLIST files
are usually sorted, files in the same directory tend to be listed near
each other.

The fallback to the plain 'uniq' is needed for SCO_SV, which does not
define TOOLS_PLATFORM.uniq.

diffstat:

 mk/install/install.mk |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (33 lines):

diff -r 4a5a34d3931e -r 784b64603b8e mk/install/install.mk
--- a/mk/install/install.mk     Sat Aug 14 08:20:00 2021 +0000
+++ b/mk/install/install.mk     Sat Aug 14 08:38:01 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: install.mk,v 1.79 2020/07/08 12:37:13 jperkin Exp $
+# $NetBSD: install.mk,v 1.80 2021/08/14 08:38:01 rillig Exp $
 #
 # This file provides the code for the "install" phase.
 #
@@ -278,12 +278,11 @@
        done
 .endif # INSTALLATION_DIRS
 
-# Creates the directories for all files that are mentioned in the static
-# PLIST files of the package, to make the declaration of
+# Creates the directories for all files that are listed unconditionally
+# in the static PLIST files of the package, to make the declaration of
 # INSTALLATION_DIRS redundant in some cases.
 #
-# To enable this, the variable INSTALLATION_DIRS_FROM_PLIST must be set
-# to "yes".
+# To enable this, set AUTO_MKDIRS to "yes".
 #
 .PHONY: install-dirs-from-PLIST
 install-dirs-from-PLIST:
@@ -298,6 +297,7 @@
                -e 's,^info/,${PKGINFODIR}/,'                           \
                -e 's,^share/locale/,${PKGLOCALEDIR}/locale/,'          \
                -e 's,^\([^$$@]*\)/[^/]*$$,\1,p'                        \
+       | ${TOOLS_PLATFORM.uniq:Uuniq}                                  \
        | while read dir; do                                            \
                ${_INSTALL_ONE_DIR_CMD};                                \
        done



Home | Main Index | Thread Index | Old Index