mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-01 06:21:56 -09:00
package/vim: refactor install target logic
Instead of calling $(MAKE) multiple times, let's call it once, with
all installation targets needed. We introduce a VIM_INSTALL_TARGETS
variable to collect the list of make install targets that need to be
invoked.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 525a234303)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
committed by
Thomas Perale
parent
3bfab7709d
commit
6578fa8677
@@ -46,17 +46,18 @@ else
|
|||||||
VIM_CONF_OPTS += --disable-selinux
|
VIM_CONF_OPTS += --disable-selinux
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
VIM_INSTALL_TARGETS = \
|
||||||
|
installvimbin installpack \
|
||||||
|
installtools installlinks
|
||||||
|
|
||||||
|
ifeq ($(BR2_PACKAGE_VIM_RUNTIME),y)
|
||||||
|
VIM_INSTALL_TARGETS += installrtbase installmacros
|
||||||
|
endif
|
||||||
|
|
||||||
define VIM_INSTALL_TARGET_CMDS
|
define VIM_INSTALL_TARGET_CMDS
|
||||||
$(RM) -f $(TARGET_DIR)/usr/bin/{ex,view,rvim,rview,vimdiff}
|
$(RM) -f $(TARGET_DIR)/usr/bin/{ex,view,rvim,rview,vimdiff}
|
||||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src DESTDIR=$(TARGET_DIR) installvimbin
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src DESTDIR=$(TARGET_DIR) \
|
||||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src DESTDIR=$(TARGET_DIR) installpack
|
$(VIM_INSTALL_TARGETS)
|
||||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src DESTDIR=$(TARGET_DIR) installtools
|
|
||||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src DESTDIR=$(TARGET_DIR) installlinks
|
|
||||||
endef
|
|
||||||
|
|
||||||
define VIM_INSTALL_RUNTIME_CMDS
|
|
||||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src DESTDIR=$(TARGET_DIR) installrtbase
|
|
||||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src DESTDIR=$(TARGET_DIR) installmacros
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define VIM_REMOVE_DOCS
|
define VIM_REMOVE_DOCS
|
||||||
@@ -77,7 +78,6 @@ endif
|
|||||||
VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_VI_SYMLINK
|
VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_VI_SYMLINK
|
||||||
|
|
||||||
ifeq ($(BR2_PACKAGE_VIM_RUNTIME),y)
|
ifeq ($(BR2_PACKAGE_VIM_RUNTIME),y)
|
||||||
VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_RUNTIME_CMDS
|
|
||||||
VIM_POST_INSTALL_TARGET_HOOKS += VIM_REMOVE_DOCS
|
VIM_POST_INSTALL_TARGET_HOOKS += VIM_REMOVE_DOCS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user