summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-12-03 00:04:11 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2013-12-03 00:05:30 +0100
commitab327d12ebf90a352f5db0a4e434464b0e576863 (patch)
tree7b73ab646f28f60b05316ecb72fb7da692af6ca4
parentc17a4211cb2ef132b049ea841fd50c99681d2080 (diff)
parse elm headers *_common.h *_legacy.h if exists and concat
-rwxr-xr-xtools/extract-api.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/extract-api.sh b/tools/extract-api.sh
index 1827b49..c6033c9 100755
--- a/tools/extract-api.sh
+++ b/tools/extract-api.sh
@@ -167,10 +167,14 @@ for header in \
167 # 167 #
168 DIR=$(dirname $header) 168 DIR=$(dirname $header)
169 FILE=$(basename $header) 169 FILE=$(basename $header)
170 BASE=${header%.h}
170 # 171 #
171 for what in functions enums types callbacks variables; do 172 for what in functions enums types callbacks variables; do
172 F=$FILE-$what 173 F=$FILE-$what
173 sed -r -n -f "$P/sed-$what" $header > $NEXT/$F 174 sed -r -n -f "$P/sed-$what" $header > $NEXT/$F
175 for more_header in "${BASE}_common.h" "${BASE}_legacy.h"; do
176 [ -e $more_header ] && sed -r -n -f "$P/sed-$what" $more_header >> $NEXT/$F
177 done
174 if [ -f $PREV/$F ]; then 178 if [ -f $PREV/$F ]; then
175 diff -u0 $PREV/$F $NEXT/$F > $P/$F-diff 179 diff -u0 $PREV/$F $NEXT/$F > $P/$F-diff
176 N=$(cat $P/$F-diff | wc -l) 180 N=$(cat $P/$F-diff | wc -l)