Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

generate_mpers_am.sh 631B

1234567891011121314151617181920
  1. #!/bin/sh -e
  2. #
  3. # Copyright (c) 2015-2018 The strace developers.
  4. # All rights reserved.
  5. #
  6. # SPDX-License-Identifier: LGPL-2.1-or-later
  7. [ "x${D:-0}" != x1 ] || set -x
  8. list="$(sed -r -n '/^strace_SOURCES[[:space:]]*=/,/^[[:space:]]*# end of strace_SOURCES/ s/^[[:space:]]*([[:alnum:]][^.]*\.c)[[:space:]]*\\$/\1/p' Makefile.am |
  9. xargs -r grep -Elx '#[[:space:]]*include[[:space:]]+MPERS_DEFS' |
  10. tr '\n' ' ')"
  11. cat > mpers.am <<EOF
  12. # Generated by $0; do not edit.
  13. mpers_source_files = $list
  14. EOF
  15. sed -r -n 's/^#[[:space:]]*include[[:space:]]*"xlat\/([a-z][a-z_0-9]*)\.h".*/extern const struct xlat \1[];/p' \
  16. $list > mpers_xlat.h