浏览代码

flex: delete broken flex++ symlink from target

When flex is built for the target without installing the
flex binary, a flex++ symlink installed by flex's Makefile
points to the missing flex executable.  This mod adds
a post target install hook to remove the broken symlink.

Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Danomi Manchego 11 年之前
父节点
当前提交
dd70b3b753
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      package/flex/flex.mk

+ 6 - 0
package/flex/flex.mk

@@ -29,6 +29,12 @@ define FLEX_DISABLE_PROGRAM
 endef
 FLEX_POST_PATCH_HOOKS += FLEX_DISABLE_PROGRAM
 
+# flex++ symlink is broken when flex binary is not installed
+define FLEX_REMOVE_BROKEN_SYMLINK
+	rm -f $(TARGET_DIR)/usr/bin/flex++
+endef
+FLEX_POST_INSTALL_TARGET_HOOKS += FLEX_REMOVE_BROKEN_SYMLINK
+
 endif
 
 $(eval $(autotools-package))