package: install bash-completion files only with bash
authorMaxim Mikityanskiy <maxtram95@gmail.com>
Mon, 19 Jan 2015 16:14:02 +0000 (18:14 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 26 Jan 2015 21:47:51 +0000 (22:47 +0100)
package/systemd, package/kmod, package/util-linux: don't install
bash-completion files if bash is not selected to be installed.
Otherwise, install bash-completion files.

package/systemd: don't install zsh-completion files is zsh is not
selected to be installed. Otherwise, install zsh-completion files.

package/util-linux: don't install empty
/usr/share/bash-completion/completions directory if bash is not going to
be installed, and install bash-completion files if bash is selected to
be installed.

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/kmod/kmod.mk
package/systemd/systemd.mk
package/util-linux/util-linux.mk

index cc185c883bf30e6bdab9b771004ed3f2e07874ce..ff07c784bdf8f709a2646f3bd7051960039f58ff 100644 (file)
@@ -64,6 +64,10 @@ else
 KMOD_CONF_OPTS += --disable-tools
 endif
 
+ifeq ($(BR2_PACKAGE_BASH),)
+KMOD_CONF_OPTS += --with-bashcompletiondir=
+endif
+
 # We only install depmod, since that's the only tool used for the
 # host.
 define HOST_KMOD_INSTALL_TOOLS
index dbfce719e7578bdd7e48eef76acdbfde171a5b18..92f99c2e01c53d61f8cc0c413e836db5609f0883 100644 (file)
@@ -133,6 +133,14 @@ else
 SYSTEMD_CONF_OPTS += --disable-smack
 endif
 
+ifeq ($(BR2_PACKAGE_BASH),)
+SYSTEMD_CONF_OPTS += --with-bashcompletiondir=
+endif
+
+ifeq ($(BR2_PACKAGE_ZSH),)
+SYSTEMD_CONF_OPTS += --with-zshcompletiondir=
+endif
+
 # mq_getattr needs -lrt
 SYSTEMD_MAKE_OPTS += LIBS=-lrt
 SYSTEMD_MAKE_OPTS += LDFLAGS+=-ldl
index a530596ea61a4b7900965008ba4e56a3d85d48c0..c8fb77c30c6c957cece23ce14cc246c4f3d45390 100644 (file)
@@ -21,9 +21,14 @@ UTIL_LINUX_CONF_ENV = scanf_cv_type_modifier=no
 UTIL_LINUX_CONF_OPTS += \
        --disable-rpath \
        --disable-makeinstall-chown \
-       --disable-bash-completion \
        --without-python
 
+ifeq ($(BR2_PACKAGE_BASH),)
+UTIL_LINUX_CONF_OPTS += \
+       --disable-bash-completion \
+       --with-bashcompletiondir=
+endif
+
 # We don't want the host-busybox dependency to be added automatically
 HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf