From e414d087d90e0a6d77a12de5d4064bde5e6f116c Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 22 Jun 2015 14:09:17 +0200 Subject: [PATCH] build: let sed use posix ERE instead of GNU extension Use POSIX Extended Regular Expression (ERE) instead of the GNU extension \| in the install-exec-hook. This makes it create the symlink properly with busybox sed built with musl libc. It will silently create a broken symlink otherwise. Lucas De Marchi: fix up added newline. --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 6679deb1..60d05e41 100644 --- a/Makefile.am +++ b/Makefile.am @@ -107,7 +107,7 @@ install-exec-hook: if test "$(libdir)" != "$(rootlibdir)"; then \ $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \ so_img_name=$$(readlink $(DESTDIR)$(libdir)/libkmod.so) && \ - so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \ + so_img_rel_target_prefix=$$(echo $(libdir) | sed -E 's,(^/|)[^/][^/]*,..,g') && \ ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libkmod.so && \ mv $(DESTDIR)$(libdir)/libkmod.so.* $(DESTDIR)$(rootlibdir); \ fi -- 2.47.3