diff options
| -rw-r--r-- | mk.sh | 2 | ||||
| -rwxr-xr-x | mkh.sh | 20 |
2 files changed, 22 insertions, 0 deletions
@@ -9,6 +9,8 @@ classify_source () { echo MACRO elif grep -q "#undef ${NAME}" $1; then echo MACRO + elif grep -q '^typedef .*(\*' $1; then + echo FNTYPE elif grep -q "^typedef .*${NAME}.*;" $1; then echo TYPE elif grep -q "^struct .*;$" $1; then @@ -168,6 +168,26 @@ if [ -d $HEADER.RECORD ]; then rm -rf $HEADER.RECORD fi +if [ -d $HEADER.FNTYPE ]; then + for v in $HEADER.FNTYPE/*; do + version=$(version_guard $(head -n1 $v)) + if [ -n "$version" ]; then + printf '%s\n' "$version" + fi + + for i in $(sort -u $v 2>/dev/null); do + grep '^typedef ' $i + done + + if [ -n "$version" ]; then + printf '#endif\n' + fi + + printf '\n' + done + rm -rf $HEADER.FNTYPE +fi + if [ -d $HEADER.EXTERN ]; then for v in $HEADER.EXTERN/*; do version=$(version_guard $(head -n1 $v)) |
