package/vim: inline the VIM_REMOVE_DOCS variable

The VIM_REMOVE_DOCS variable is currently a post install target hook,
but it can just as well be done inside VIM_INSTALL_TARGET_CMDS
directly.

The hook was registered conditionally based on BR2_PACKAGE_VIM_RUNTIME
because prior to commit f7a07f42f7, the
hook's logic was:

    find $(TARGET_DIR)/usr/share/vim -type f -name "*.txt" -delete

which was failing if BR2_PACKAGE_VIM_RUNTIME was not enabled, as
$(TARGET_DIR)/usr/share/vim would not exist.

But since this commit, the hook logic is:

    $(RM) -rf $(TARGET_DIR)/usr/share/vim/vim*/doc/

which obviously won't fail if $(TARGET_DIR)/usr/share/vim doesn't
exist.

So let's simplify the whole logic.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 7bcc99b57b)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
Thomas Petazzoni
2025-12-23 19:10:11 +01:00
committed by Thomas Perale
parent 6578fa8677
commit d6bba36979

View File

@@ -58,9 +58,6 @@ define VIM_INSTALL_TARGET_CMDS
$(RM) -f $(TARGET_DIR)/usr/bin/{ex,view,rvim,rview,vimdiff}
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src DESTDIR=$(TARGET_DIR) \
$(VIM_INSTALL_TARGETS)
endef
define VIM_REMOVE_DOCS
$(RM) -rf $(TARGET_DIR)/usr/share/vim/vim*/doc/
endef
@@ -77,10 +74,6 @@ endef
endif
VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_VI_SYMLINK
ifeq ($(BR2_PACKAGE_VIM_RUNTIME),y)
VIM_POST_INSTALL_TARGET_HOOKS += VIM_REMOVE_DOCS
endif
HOST_VIM_DEPENDENCIES = host-ncurses
HOST_VIM_CONF_OPTS = \
--with-tlib=ncurses \