Merge pull request #5714 from alexischr/update_bockbuild
[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         fgrep -v -f $dir/ignore
17 }
18
19 ignore_hidden ()
20 {
21     fgrep -w -v -f $dir/hidden_methods
22 }
23
24 clean_nm ()
25 {
26         grep ' T ' | sed 's/.* T //'
27 }
28
29 ignore_wapi ()
30 {
31         grep -v _wapi | fgrep -v -f $dir/wapi
32 }
33
34 if grep ^$ ignore >/dev/null; then
35     echo The ignore file contains empty lines, which breaks this script, please remove
36     echo the empty lines.
37     exit 1
38 fi
39
40 # generate the internals file
41 objdump -t ../mono/mini/.libs/libmono-2.0.a | grep "\.hidden" | sed 's/.*\.hidden //' > hidden_methods
42
43 nm  $dir/../mono/io-layer/.libs/*.o | clean_nm | grep -v _wapi | ignore_known | sort > $dir/wapi
44 nm  $dir/../mono/mini/.libs/libmono-2.0.a | clean_nm | ignore_known | ignore_hidden | ignore_wapi | grep -v ^ves_icall | egrep -v '^(mono_arch_|monoeg)'  | sort > $dir/public-api