summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-06-22 14:09:17 +0200
committerLucas De Marchi <lucas.demarchi@intel.com>2015-06-22 11:23:57 -0300
commite414d087d90e0a6d77a12de5d4064bde5e6f116c (patch)
treeafc5bde78fde22833adccbf5104a3d329c1f7635 /Makefile.am
parent114ec87c85c35a2bd3682f9f891e494127be6fb5 (diff)
downloadkmod-e414d087d90e0a6d77a12de5d4064bde5e6f116c.tar.gz
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.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 6679deb..60d05e4 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