Dmitry V. Levin | d59287d | 2015-01-13 04:57:27 +0000 | [diff] [blame] | 1 | #!/bin/sh -e |
2 | |||||
3 | srcdir="${0%/*}" | ||||
4 | dstdir="$1"; shift | ||||
5 | |||||
6 | for n in n32 n64 o32; do | ||||
7 | in="$srcdir/syscallent-$n.h" | ||||
8 | out="$dstdir/syscallent-$n-stub.h" | ||||
9 | sed -n '/^#if/,/^#else/ {s/^\([^{]*{[^,]*,[^,]*,[[:space:]]*\)[^,[:space:]]\+,[[:space:]]*"\([^"]\+".*\)/\1printargs, "'$n'_\2/; s/^\[.*/&/p}' < "$in" > "$out" | ||||
10 | done |