bump product version to 5.0.4.1
[LibreOffice.git] / bin / findunusedcode
blob042bb0bd8177b2a87fe0a63ad4b257b92714bfed
1 #!/bin/bash
2 set -e
3 SRCDIR=$1
4 GNUMAKE=$2
6 cd ${SRCDIR}
7 which callcatcher > /dev/null 2>&1 || \
8 (echo "callcatcher not installed" && false)
10 mkdir -p ${SRCDIR}/callcatcher
11 cd ${SRCDIR}/callcatcher
13 echo "--without-doxygen
14 --enable-verbose
15 --enable-gio
16 --enable-packagekit
17 --disable-gnome-vfs
18 --enable-extension-integration
19 --enable-graphite
20 --enable-evolution2
21 --enable-lockdown
22 --enable-online-update
23 --enable-dbgutil
24 --enable-werror
25 --enable-gtk3
26 --enable-kde4
27 --enable-dbus
28 --enable-gstreamer-1-0
29 --disable-gstreamer-0-10" \
30 > autogen.input
32 export CC="callcatcher ${CC:-gcc}"
33 export CXX="callcatcher ${CXX:-g++}"
34 export AR="callarchive ${AR:-ar}"
36 /bin/env -i CC="$CC" CXX="$CXX" AR="$AR" /bin/bash -l ../autogen.sh
38 export dbglevel=2
40 make clean && make check
42 callanalyse \
43 instdir/program/* \
44 instdir/sdk/bin/* \
45 workdir/LinkTarget/*/* workdir/LinkTarget/*/*/* \
46 workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit.so* \
47 > unusedcode.all
49 grep ::.*\( unusedcode.all \
50 | grep -v ^Atom \
51 | grep -v ^atom:: \
52 | grep -v ^boost:: \
53 | grep -v ^CIcc \
54 | grep -v ^CLuceneError:: \
55 | grep -v ^cppu:: \
56 | grep -v ^CppUnit:: \
57 | grep -v ^Dde \
58 | grep -v ^graphite2:: \
59 | grep -v ^jvmaccess:: \
60 | grep -v ^Json:: \
61 | grep -v ^libcdr:: \
62 | grep -v ^libcmis:: \
63 | grep -v ^libgltf:: \
64 | grep -v ^libmspub:: \
65 | grep -v ^libvisio:: \
66 | grep -v ^libwpg:: \
67 | grep -v ^libwps_tools_win:: \
68 | grep -v ^lucene:: \
69 | grep -v ^Matrix3d:: \
70 | grep -v ^RelatedMultipart:: \
71 | grep -v ^salhelper:: \
72 | grep -v ^VSDInternalStream:: \
73 | grep -v ^WP1 \
74 | grep -v ^WP3 \
75 | grep -v ^WP42 \
76 | grep -v ^WP6 \
77 | grep -v ^WPG \
78 | grep -v ^WPS \
79 | grep -v WPX \
80 | grep -v ^WSObject \
81 | grep -v ^OAuth2Handler \
82 | grep -v ^COLLADABU:: \
83 | grep -v ^COLLADAFW:: \
84 | grep -v ^COLLADASaxFWL14:: \
85 | grep -v ^COLLADASaxFWL15:: \
86 | grep -v ^COLLADASaxFWL:: \
87 | grep -v ^o3dgc:: \
88 | grep -v ^MathML:: \
89 | grep -v ^GeneratedSaxParser:: \
90 | grep -v ^GLTF:: \
91 | grep -v ^OneDrive \
92 | grep -v ^SharePoint \
93 | grep -v ^VersioningService:: \
94 | grep -v ^WSSession:: \
95 | grep -v ^NavigationService:: \
96 | grep -v ^ObjectService:: \
97 | grep -v ^RepositoryService:: \
98 | grep -v ^GDriveDocument:: \
99 | grep -v ^GDriveFolder:: \
100 | grep -v ^GDriveProperty:: \
101 | grep -v ^GDriveSession:: \
102 > ../unusedcode.easy