-
Notifications
You must be signed in to change notification settings - Fork 403
Description
The README file currently contains about installation:
The recommended directory is
completionsdir
, which you can get withpkg-config --variable=completionsdir bash-completion
.
However, this is incorrect when using a different prefix from bash-completion. This can have 2 bad effects:
- Installation failure due to insufficient permission (for instance, when the non-root end user wants to install software somewhere under his home directory). This can also be seen with
make distcheck
(recommended use of PKG_CHECK_VAR for bashcompdir causes 'make distcheck' failures #265). - As root, e.g. with the default prefix
/usr/local
(or a directory under/opt
), whose goal is to avoid clashes with the vendor provided files, such files (e.g. from Debian) could be overwritten.
Note that pkgconf (previously pkg-config) is designed to say where things can be found for a build, not where they should be installed. It its man page: "pkgconf
is a program which helps to configure compiler and linker flags for development libraries. This allows build systems to detect other dependencies and use them with the system toolchain."
What is said later in the README file, which mentions $PREFIX
, should be put here as the recommended solution.
Note that if bash-completion really wants to suggest pkgconf as a way to get an installation directory, I think that this should be a directory relative to $PREFIX
, e.g.
completionsdirsuffix=share/bash-completion/completions
so that $PREFIX/$completionsdirsuffix
could be used by the package as the installation directory for completions.