diff options
| author | Mattias Andrée <maandree@kth.se> | 2020-05-31 00:23:22 +0200 | 
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2020-05-31 00:23:22 +0200 | 
| commit | 4383640bfe4c40c055824d9c42ed8809bb3163b4 (patch) | |
| tree | df194cbc3764320a88e25e1f77855aaaed4631ea /Makefile | |
| parent | Work around valgrind issue (diff) | |
| download | sctrace-4383640bfe4c40c055824d9c42ed8809bb3163b4.tar.gz sctrace-4383640bfe4c40c055824d9c42ed8809bb3163b4.tar.bz2 sctrace-4383640bfe4c40c055824d9c42ed8809bb3163b4.tar.xz  | |
Print signal names
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
| -rw-r--r-- | Makefile | 12 | 
1 files changed, 10 insertions, 2 deletions
@@ -14,7 +14,8 @@ OBJ =\  HDR =\  	arg.h\  	common.h\ -	list-errnos.h +	list-errnos.h\ +	list-signums.h  all: sctrace  $(OBJ): $(@:.o=.c) $(HDR) @@ -32,6 +33,13 @@ list-errnos.h:  		| sed -n '/^[ \t]*#[ \t]*define[ \t].*[ \t][0-9]*[ \t]*$$/s/^[ \t#]*define[ \t]*\([^ \t]*\).*$$/_(\1)/p' \  		| sort | uniq | tr '\n' '#' | sed 's/#_/\\\n\t_/g' | tr '#' '\n' >> $@ +list-signums.h: +	printf '#define LIST_SIGNUMS(_)\\\n\t' > $@ +	cat /usr/include/bits/signum.h /usr/include/bits/signum-generic.h \ +		| sed 's/\/\/.*$$//' | tr -d '$$' | sed 's/\*\//\$$/g' | sed 's/\/\*[^$$]*\$$//g' \ +		| sed -n '/^[ \t]*#[ \t]*define[ \t][^_]*[ \t][0-9]*[ \t]*$$/s/^[ \t#]*define[ \t]*\([^ \t]*\).*$$/_(\1)/p' \ +		| sort | uniq | tr '\n' '#' | sed 's/#_/\\\n\t_/g' | tr '#' '\n' >> $@ +  install: sctrace  	mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"  	cp -- sctrace "$(DESTDIR)$(PREFIX)/bin" @@ -40,7 +48,7 @@ uninstall:  	-rm -f -- "$(DESTDIR)$(PREFIX)/bin/sctrace"  clean: -	-rm -f -- *.o list-errnos.h sctrace +	-rm -f -- *.o list-*.h sctrace  .SUFFIXES:  .SUFFIXES: .c .o  | 
