]> granicus.if.org Git - strace/blob - generate_mpers_am.sh
Fix decoding and dumping of readv syscall in case of short read
[strace] / generate_mpers_am.sh
1 #!/bin/sh -e
2
3 list="$(sed -n '/^strace_SOURCES[[:space:]]*=/,/^[[:space:]]*# end of strace_SOURCES/ s/^[[:space:]]*\([[:alnum:]][^.]*\.c\)[[:space:]]*\\$/\1/p' Makefile.am |
4         xargs -r grep -lx '#[[:space:]]*include[[:space:]]\+MPERS_DEFS' |
5         tr '\n' ' ')"
6
7 cat > mpers.am <<EOF
8 # Generated by $0; do not edit.
9 mpers_source_files = $list
10 EOF
11
12 sed -n 's/^#[[:space:]]*include[[:space:]]*"xlat\/\([^."]\+\)\.h".*/extern const struct xlat \1[];/p' \
13         $list > mpers_xlat.h