5 MUSL_PREFIX=${MUSL_PREFIX:-$MUSL}
8 cd $MUSL_PREFIX/include
9 ctags -f /tmp/musl.tags -R -n -u --language-force=c --c-kinds=pxdstuve --fields=k --exclude='*.sh' .
11 # fix wchar_t bug of ctags
12 awk '/typedef.* wchar_t/{print "wchar_t\tbits/alltypes.h\t" NR ";\"\tt"}' bits/alltypes.h >>/tmp/musl.tags
15 awk -v inc=$MUSL_PREFIX/include/ '
19 function proto(t,h,n) {
20 cmd = "awk '\''NR==" n
22 cmd = cmd "{s=$0; if(s!~/;/){getline; s=s \" \" $0} print s; exit}"
24 cmd = cmd "{s=$0; while(gsub(/\\\\$/,\"\",s)){getline; s=s $0} print s; exit}"
27 cmd = cmd "'\'' " inc h
41 print $1 "\t" $2 "\t" $4 "\t" $3 "\t" proto($4,$2,$3)
42 }' /tmp/musl.tags |sort >data/musl.tags