From: Natanael Copa Date: Mon, 22 Jun 2015 12:09:17 +0000 (+0200) Subject: build: let sed use posix ERE instead of GNU extension X-Git-Tag: v22~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e414d087d90e0a6d77a12de5d4064bde5e6f116c;p=thirdparty%2Fkmod.git 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. --- 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