diff options
author | Mattias Andrée <maandree@kth.se> | 2023-11-26 16:10:58 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-11-26 16:10:58 +0100 |
commit | 67a942381096679d1d9c6982e4d0988f88ae389b (patch) | |
tree | 490c01b6db75cd2e70827b619a5465be40e41234 /Makefile | |
parent | m (diff) | |
download | sctrace-67a942381096679d1d9c6982e4d0988f88ae389b.tar.gz sctrace-67a942381096679d1d9c6982e4d0988f88ae389b.tar.bz2 sctrace-67a942381096679d1d9c6982e4d0988f88ae389b.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -32,14 +32,17 @@ sctrace: $(OBJ) list-errnos.h: printf '#define LIST_ERRNOS(_)\\\n\t' > $@ - cat $(ERRNO_HDRS) | sed 's/\/\/.*$$//' | tr -d '$$' | sed 's/\*\//\$$/g' | sed 's/\/\*[^$$]*\$$//g' \ + cat $(ERRNO_HDRS) | tr '\n' '\0' \ + | sed 's/\/\/.*$$//' | tr -d '$$' | sed 's/\*\//\$$/g' | sed 's/\/\*[^$$]*\$$//g' | tr '\0' '\n' \ | 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' \ + printf '#define LIST_SIGNUMS(_)\\\n\t' > $@ + cat $(SIGNUM_HDRS) | tr '\n' '\0' \ + | sed 's/\/\/.*$$//' | tr -d '$$' | sed 's/\*\//\$$/g' | sed 's/\/\*[^$$]*\$$//g' | tr '\0' '\n' \ | sed -n '/^[$S]*#[$S]*define[$S][^_]*[$S][0-9]*[$S]*$$/s/^[$S#]*define[$S]*\([^$S]*\).*$$/_(\1)/p' \ + | grep -v 'SIG\(UNUSED\|RTMIN\|RTMAX\|STKSZ\)' | grep '(SIG' \ | sort | uniq | tr '\n' '#' | sed 's/#_/\\\n\t_/g' | tr '#' '\n' >> $@ install: sctrace |