Dmitry V. Levin
469fd109cd
When grep or sed is used with basic regular expressions containing '(', ')', '{', '}', '|', '?', and '+' special characters, convert them to extended regular expressions for better portability and readability. * generate_mpers_am.sh: Convert grep and sed BREs to EREs. * Makefile.am (ioctl_redefs%.h, m%_type_defs.h, m%_funcs.h, mpers_printer_decl_pattern, printers.h, %_printer_decls.h, %_printer_defs.h): Convert sed BREs to EREs. * generate_sen.sh: Likewise. * linux/mips/genstub.sh: Likewise. * make-dsc: Likewise. * mpers.sh: Likewise. * xlat/gen.sh: Likewise. * tests/Makefile.am (ksysent.h): Likewise. * tests/ksysent.sed: Likewise. * tests/pc.test: Likewise. * tests/strace-S.test: Likewise. * tests/strace-V.test: Likewise. * tests/strace-k.test: Likewise.
14 lines
478 B
Bash
Executable File
14 lines
478 B
Bash
Executable File
#!/bin/sh -e
|
|
|
|
list="$(sed -r -n '/^strace_SOURCES[[:space:]]*=/,/^[[:space:]]*# end of strace_SOURCES/ s/^[[:space:]]*([[:alnum:]][^.]*\.c)[[:space:]]*\\$/\1/p' Makefile.am |
|
|
xargs -r grep -Elx '#[[:space:]]*include[[:space:]]+MPERS_DEFS' |
|
|
tr '\n' ' ')"
|
|
|
|
cat > mpers.am <<EOF
|
|
# Generated by $0; do not edit.
|
|
mpers_source_files = $list
|
|
EOF
|
|
|
|
sed -r -n 's/^#[[:space:]]*include[[:space:]]*"xlat\/([a-z][a-z_0-9]*)\.h".*/extern const struct xlat \1[];/p' \
|
|
$list > mpers_xlat.h
|