Elvira Khabirova | 0929422 | 2015-08-04 01:47:02 +0300 | [diff] [blame] | 1 | #!/bin/sh -e |
| 2 | |
Dmitry V. Levin | 5cb45b2 | 2015-11-20 01:43:12 +0000 | [diff] [blame] | 3 | list="$(sed -n '/^strace_SOURCES[[:space:]]*=/,/^[[:space:]]*# end of strace_SOURCES/ s/^[[:space:]]*\([[:alnum:]][^.]*\.c\)[[:space:]]*\\$/\1/p' Makefile.am | |
Elvira Khabirova | 0929422 | 2015-08-04 01:47:02 +0300 | [diff] [blame] | 4 | xargs -r grep -lx '#[[:space:]]*include[[:space:]]\+MPERS_DEFS' | |
Dmitry V. Levin | 5cb45b2 | 2015-11-20 01:43:12 +0000 | [diff] [blame] | 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 |