]> git.notmuchmail.org Git - notmuch/blob - lib/gen-version-script.sh
emacs: show: change emacs interactive pipe message.
[notmuch] / lib / gen-version-script.sh
1
2 # we go through a bit of work to get the unmangled names of the
3 # typeinfo symbols because of
4 # http://sourceware.org/bugzilla/show_bug.cgi?id=10326
5
6 if [ $# -lt 2 ]; then
7     echo Usage: $0 header obj1 obj2 obj3
8     exit 1;
9 fi
10
11 HEADER=$1
12 shift
13
14 printf '{\nglobal:\n'
15 nm  $* | awk '$1 ~ "^[0-9a-fA-F][0-9a-fA-F]*$" && $3 ~ "Xapian.*Error" {print $3}' | sort | uniq | \
16 while read sym; do
17     demangled=$(c++filt $sym)
18     case $demangled in
19         typeinfo*) 
20             printf "\t$sym;\n"
21             ;;
22         *)
23             ;;
24     esac
25 done
26 nm $* | awk '$1 ~ "^[0-9a-fA-F][0-9a-fA-F]*$" && $2 == "T" && $3 ~ "^get(line|delim)$" {print $3 ";"}'
27 sed  -n 's/^[[:space:]]*\(notmuch_[a-z_]*\)[[:space:]]*(.*/ \1;/p' $HEADER
28 printf "local: *;\n};\n"