diff options
author | rillig <rillig@pkgsrc.org> | 2021-08-14 08:38:01 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2021-08-14 08:38:01 +0000 |
commit | 77df23a2c8fc658111222db2ea6b04950861b3c1 (patch) | |
tree | e418c0f35e677df8f1cbbbbb8f8a17a053a8e718 /mk/install | |
parent | deb77f318f9df716ac374e058c942107a548d02d (diff) | |
download | pkgsrc-77df23a2c8fc658111222db2ea6b04950861b3c1.tar.gz |
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 (limited to 'mk/install')
-rw-r--r-- | mk/install/install.mk | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mk/install/install.mk b/mk/install/install.mk index 67dbc84dc8c..23426aa9bc0 100644 --- a/mk/install/install.mk +++ b/mk/install/install.mk @@ -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 @@ install-makedirs: 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 @@ install-dirs-from-PLIST: -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 |