2010-01-20 Zoltan Varga <vargaz@gmail.com>
[mono.git] / docs / produce-lists
1 #!/bin/sh
2 #
3 # Produces two lists in docscripts:
4 #    public-api with the public API except the Wapi 
5 #    wapi       the public WAPI API
6 #
7
8 dir=`dirname $0`
9 add_h4()
10 {
11         sed -e 's/^\t<h4>//' -e 's/$/<\/h4>/'
12 }
13
14 ignore_known()
15 {
16         egrep -v -f $dir/ignore
17 }
18
19 clean_nm ()
20 {
21         grep ' T ' | sed 's/.* T //'
22 }
23
24 ignore_wapi ()
25 {
26         grep -v _wapi | fgrep -v -f $dir/wapi
27 }
28
29 if grep ^$ ignore >/dev/null; then
30     echo The ignore file contains empty lines, which breaks this script, please remove
31     echo the empty lines.
32     exit 1
33 fi
34
35 nm  $dir/../io-layer/.libs/*.o | clean_nm | grep -v _wapi | ignore_known > $dir/wapi
36 nm  $dir/../*/.libs/*.o | clean_nm | ignore_known | ignore_wapi | grep -v ^ves_icall | grep -v ^mono_arch_ > $dir/public-api