diff options
| author | Carlos Santos <casantos@datacom.com.br> | 2018-07-18 09:34:43 -0300 |
|---|---|---|
| committer | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2018-08-05 14:42:26 +0200 |
| commit | 52385d789af0d17bf12406e5c028651ccbd841f0 (patch) | |
| tree | b589c7cc01d491aed4c4820e5c32cfe0c5a35b91 /package/vim | |
| parent | 85dd98c31e93114995b36ccd398493cd5375ab94 (diff) | |
| download | buildroot-52385d789af0d17bf12406e5c028651ccbd841f0.tar.gz buildroot-52385d789af0d17bf12406e5c028651ccbd841f0.zip | |
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>
Diffstat (limited to 'package/vim')
| -rw-r--r-- | package/vim/vim.mk | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/package/vim/vim.mk b/package/vim/vim.mk index dbf71c573f..ee0c8b61e4 100644 --- a/package/vim/vim.mk +++ b/package/vim/vim.mk @@ -63,9 +63,15 @@ define VIM_REMOVE_DOCS endef # Avoid oopses with vipw/vigr, lack of $EDITOR and 'vi' command expectation +ifeq ($(BR2_ROOTFS_MERGED_USR),y) define VIM_INSTALL_VI_SYMLINK - ln -sf /usr/bin/vim $(TARGET_DIR)/bin/vi + ln -sf vim $(TARGET_DIR)/usr/bin/vi 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 ifeq ($(BR2_PACKAGE_VIM_RUNTIME),y) |

