]> git.notmuchmail.org Git - notmuch/blobdiff - lib/gen-version-script.sh
NEWS, python: update pointer to online documentation
[notmuch] / lib / gen-version-script.sh
index ec801966f97e406aebd1d221e092f118d80d868c..0f908093dc5e6de1da8b281f191e4b6dc34b675e 100644 (file)
@@ -1,3 +1,4 @@
+set -eu
 
 # we go through a bit of work to get the unmangled names of the
 # typeinfo symbols because of
@@ -12,16 +13,17 @@ HEADER=$1
 shift
 
 printf '{\nglobal:\n'
-nm --defined $* | awk '$3 ~ "Xapian.*Error" {print $3}' | sort | uniq | \
+nm  $* | awk '$1 ~ "^[0-9a-fA-F][0-9a-fA-F]*$" && $3 ~ "Xapian.*Error" {print $3}' | sort | uniq | \
 while read sym; do
     demangled=$(c++filt $sym)
     case $demangled in
-       typeinfo*) 
+       typeinfo*)
            printf "\t$sym;\n"
            ;;
        *)
            ;;
     esac
 done
+nm $* | awk '$1 ~ "^[0-9a-fA-F][0-9a-fA-F]*$" && $2 == "T" && $3 ~ "^(getline|getdelim|canonicalize_file_name)$" {print $3 ";"}'
 sed  -n 's/^[[:space:]]*\(notmuch_[a-z_]*\)[[:space:]]*(.*/ \1;/p' $HEADER
 printf "local: *;\n};\n"