diff options
author | Mattias Andrée <maandree@kth.se> | 2020-06-21 12:33:11 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2020-06-21 12:33:11 +0200 |
commit | ff5dccc70123ed4036a268fabe12f523f45e46f4 (patch) | |
tree | d94be6572117bebca2d26363ba620b8badeeb176 /Makefile | |
parent | Fix some warnings and move include statement to common.h (diff) | |
download | sctrace-ff5dccc70123ed4036a268fabe12f523f45e46f4.tar.gz sctrace-ff5dccc70123ed4036a268fabe12f523f45e46f4.tar.bz2 sctrace-ff5dccc70123ed4036a268fabe12f523f45e46f4.tar.xz |
Use [:space:] in sed scripts
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |