From 5c202efea72d9419a722b9be991bf44868a43ca6 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 7 Dec 2023 21:58:14 +0100 Subject: Fix latest commit and prove portability further by replaceing \s with [[:space:]] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a4fdd34..bcd7f66 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ $(MAN1): xsum.man algorithm-map set -e; \ f="$$(printf '%s\n' "$@" | sed 's/\.1$$//')"; \ u="$$(printf '%s\n' "$$f" | tr a-z A-Z)"; \ - a="$$(sed -n 's/^'"$$f"'\s*=\s*//p' < algorithm-map | sed 's/\s*$$//')"; \ + a="$$(sed -n 's/^'"$$f"'[[:space:]]*=[[:space:]]*//p' < algorithm-map | sed 's/[[:space:]]*$$//')"; \ if test "$$f" = sha3sum; then \ sed -e "s/xsum/$$f/g" -e "s/XSUM/$$u/g" -e "s/Xsum/$$a/g" -e 's/^\\# ONLY SHA3: //' < xsum.man > $@; \ else \ @@ -103,7 +103,7 @@ $(BIN_SPECIFIC:=.c): +@set -e; \ f="$$(\ set -e; \ - sed -n 's/^\([a-z][a-z0-9-]\+\)%\([^:]*\):.*$$/\1 \2/p' < unportable.mk | while read start end; do \ + sed -n 's/^\([a-z][a-z0-9-]*\)%\([^:]*\):.*$$/\1 \2/p' < unportable.mk | while read start end; do \ end="$$(printf '%s\n' "$$end" | sed 's/\./\\\./g')"; \ x="$$(printf '%s\n' '$@' | sed -n 's/^'"$$start"'\(.*\)'"$$end"'$$/\1/p')"; \ if test -n "$$x"; then \ -- cgit v1.2.3-70-g09d2