[PATCH] build: Invoke sed with portable regex

Guillem Jover guillem at hadrons.org
Thu Mar 8 01:11:41 UTC 2018


Hi!

On Fri, 2017-09-29 at 17:02:33 +0200, Rainer Müller wrote:
> 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' $< > $@

Thanks! And sorry, it seems I missed this one before cutting the last
release. Merged now and will be included in the next one.

Regards,
Guillem


More information about the libbsd mailing list