From ff5dccc70123ed4036a268fabe12f523f45e46f4 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 21 Jun 2020 12:33:11 +0200 Subject: Use [:space:] in sed scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 93e3e2f..2960cc1 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ HDR =\ list-errnos.h\ list-signums.h -S = [ ] +S = [:space:] all: sctrace $(OBJ): $(@:.o=.c) $(HDR) @@ -33,13 +33,13 @@ sctrace: $(OBJ) list-errnos.h: printf '#define LIST_ERRNOS(_)\\\n\t' > $@ cat $(ERRNO_HDRS) | sed 's/\/\/.*$$//' | tr -d '$$' | sed 's/\*\//\$$/g' | sed 's/\/\*[^$$]*\$$//g' \ - | sed -n '/^$S*#$S*define$S.*$S[0-9]*$S*$$/s/^[ #]*define$S*\([^ ]*\).*$$/_(\1)/p' \ + | sed -n '/^[$S]*#[$S]*define[$S].*[$S][0-9]*[$S]*$$/s/^[$S#]*define[$S]*\([^$S]*\).*$$/_(\1)/p' \ | sort | uniq | tr '\n' '#' | sed 's/#_/\\\n\t_/g' | tr '#' '\n' >> $@ list-signums.h: printf '#define LIST_SIGNUMS(_)\\\n ' > $@ cat $(SIGNUM_HDRS) | sed 's/\/\/.*$$//' | tr -d '$$' | sed 's/\*\//\$$/g' | sed 's/\/\*[^$$]*\$$//g' \ - | sed -n '/^$S*#$S*define$S[^_]*$S[0-9]*$S*$$/s/^[ #]*define$S*\([^ ]*\).*$$/_(\1)/p' \ + | sed -n '/^[$S]*#[$S]*define[$S][^_]*[$S][0-9]*[$S]*$$/s/^[$S#]*define[$S]*\([^$S]*\).*$$/_(\1)/p' \ | sort | uniq | tr '\n' '#' | sed 's/#_/\\\n\t_/g' | tr '#' '\n' >> $@ install: sctrace -- cgit v1.2.3-70-g09d2