package: Remove shell completion at finalize stage
authorMaxime Hadjinlian <maxime.hadjinlian@gmail.com>
Sun, 12 Jul 2015 15:25:57 +0000 (17:25 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 12 Jul 2015 19:55:14 +0000 (21:55 +0200)
Instead of doing a removal of the completion file package per package,
do it all at the finalize stage so it's done once and for all.

Note: This fixes an issue with systemd where passing a --bashcompletiondir
or --zshcompletiondir would be evaluated to '.' by the autotools macro.
This would create a 'target./' directory.

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Makefile
package/kmod/kmod.mk
package/systemd/systemd.mk
package/util-linux/util-linux.mk

index 35818f08f2d71f3a92daf8d9fbdb019a91530f6e..daf692e59105fa2c5c27959c62bf1c6e5183ba68 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -555,6 +555,12 @@ target-finalize: $(PACKAGES)
        find $(TARGET_DIR)/usr/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
 ifneq ($(BR2_PACKAGE_GDB),y)
        rm -rf $(TARGET_DIR)/usr/share/gdb
+endif
+ifneq ($(BR2_PACKAGE_BASH),y)
+       rm -rf $(TARGET_DIR)/usr/share/bash-completion
+endif
+ifneq ($(BR2_PACKAGE_ZSH),y)
+       rm -rf $(TARGET_DIR)/usr/share/zsh
 endif
        rm -rf $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/man
        rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/share/info
index 98d9998b8e059f22f0467d3939672a30f6ea4c43..ae0933042e376b8d9cabce92db1f679a1d845216 100644 (file)
@@ -59,10 +59,6 @@ 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 7eb7abe7d5fb0d71ef6cb1f4bac10024cef5002b..5c9effa9ffd62ba64a8a0f511bb82293374377b9 100644 (file)
@@ -123,14 +123,6 @@ 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 3ca147a1ab2bebd6264c5ff5f380ece73c812458..a44a45e6e17f87bb95fc290207d4a34639914561 100644 (file)
@@ -26,12 +26,6 @@ UTIL_LINUX_CONF_OPTS += \
        --disable-makeinstall-chown \
        --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