mirror of
https://github.com/godotengine/buildroot.git
synced 2026-01-06 18:09:44 +03:00
vim: install /bin/vi as a relative symlink
Prevent creating a dangling symlink when vim is not present on the host
machine. With BR2_ROOTFS_MERGED_USR, just link to "vim", since they are
on the same directory, otherwise link to "../usr/bin/vim".
Signed-off-by: Carlos Santos <casantos@datacom.com.br>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 52385d789a)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
6059e4d6c5
commit
9867b138e1
@@ -65,9 +65,15 @@ define VIM_REMOVE_DOCS
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
# Avoid oopses with vipw/vigr, lack of $EDITOR and 'vi' command expectation
|
# Avoid oopses with vipw/vigr, lack of $EDITOR and 'vi' command expectation
|
||||||
|
ifeq ($(BR2_ROOTFS_MERGED_USR),y)
|
||||||
define VIM_INSTALL_VI_SYMLINK
|
define VIM_INSTALL_VI_SYMLINK
|
||||||
ln -sf /usr/bin/vim $(TARGET_DIR)/bin/vi
|
ln -sf vim $(TARGET_DIR)/usr/bin/vi
|
||||||
endef
|
endef
|
||||||
|
else
|
||||||
|
define VIM_INSTALL_VI_SYMLINK
|
||||||
|
ln -sf ../usr/bin/vim $(TARGET_DIR)/bin/vi
|
||||||
|
endef
|
||||||
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user