]> git.wh0rd.org Git - fontconfig.git/blob - src/makealias
Update architecture signatures for x86-64 and ppc.
[fontconfig.git] / src / makealias
1 #!/bin/sh
2 SRCDIR=$1
3 shift
4 HEAD=fcalias.h
5 TAIL=fcaliastail.h
6 rm -f $HEAD $TAIL
7 sed -n -e '/^FcPublic /,+1p' "$@" | sed -e '/^FcPublic /d' -e 's/ *(.*$//' |
8 while read name; do
9         case $name in
10         FcCacheDir|FcCacheSubdir)
11                 ;;
12         *)
13                 alias="IA__$name"
14                 hattr='__attribute((visibility("hidden")))'
15                 echo "extern __typeof ($name) $alias $hattr;" >> $HEAD
16                 echo "#define $name $alias" >> $HEAD
17                 grep -l -w '^'$name "$SRCDIR"/*.c | sed -e 's/^.*\/\([^.]*\)\.c/#ifdef __\1__/' >> $TAIL
18                 echo "#undef $name" >> $TAIL
19                 cattr='__attribute((alias("'$alias'"), visibility("default")))'
20                 echo "extern __typeof ($name) $name $cattr;" >> $TAIL
21                 echo "#endif" >> $TAIL
22                 ;;
23         esac
24 done