]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
build: let sed use posix ERE instead of GNU extension
authorNatanael Copa <ncopa@alpinelinux.org>
Mon, 22 Jun 2015 12:09:17 +0000 (14:09 +0200)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 22 Jun 2015 14:23:57 +0000 (11:23 -0300)
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

index 6679deb1e3632ed9923cc354386e32d455285f23..60d05e41bbb59f223a21bf2705123a5a4df26f92 100644 (file)
@@ -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