From 3e2a4318cc6eabeea13857e46b820bde222b7111 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 23 Dec 2025 19:10:11 +0100 Subject: [PATCH] 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 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 Signed-off-by: Julien Olivain (cherry picked from commit 7bcc99b57b2b021daf72cfc4604708e3138736f6) Signed-off-by: Thomas Perale --- package/vim/vim.mk | 7 ------- 1 file changed, 7 deletions(-) diff --git a/package/vim/vim.mk b/package/vim/vim.mk index d250ac6b59..77d3ac35ad 100644 --- a/package/vim/vim.mk +++ b/package/vim/vim.mk @@ -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 \