[PATCH] build: Invoke sed with portable regex

Rainer Müller raimue at codingfarm.de
Fri Sep 29 15:02:33 UTC 2017


The previous sed expression only worked with GNU sed, as the '\+'
literal is an extension to basic regex. Use portable syntax instead that
also works with other implementations of sed(1), for example on macOS.
---
 src/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index fa957f7..77f07b1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -69,7 +69,7 @@ DISTCLEANFILES = \
 # Generate a simple libtool symbol export list to be used as a fallback if
 # there is no version script support.
 libmd.sym: libmd.map
-	$(AM_V_GEN) sed -ne 's/^[[:space:]]\+\([A-Za-z0-9]\+\);/\1/p' $< > $@
+	$(AM_V_GEN) sed -ne 's/^[[:space:]]\{1,\}\([A-Za-z0-9]\{1,\}\);/\1/p' $< > $@
 
 md2hl.c: helper.c
 	$(AM_V_GEN) sed -e 's/hashinc/md2.h/g' -e 's/HASH/MD2/g' $< > $@
-- 
2.14.2



More information about the libbsd mailing list