]> git.feebdaed.xyz Git - 0xmirror/buildroot.git/commitdiff
package/vim: inline the VIM_REMOVE_DOCS variable
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 23 Dec 2025 18:10:11 +0000 (19:10 +0100)
committerJulien Olivain <ju.o@free.fr>
Tue, 23 Dec 2025 20:38:01 +0000 (21:38 +0100)
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 f7a07f42f70a73806fd2f6bf3662fc6907845fe9, 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>
package/vim/vim.mk

index a1a484c673dbaf59a8f6850681187b377d5af198..4fe8800bead302c5cf9cf8be66b5dd27b569fc52 100644 (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 \