diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-05 16:23:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-05 16:52:32 +0000 |
commit | 621ddc9c951262cdbdda1fe5479b48bc40e6e3b4 (patch) | |
tree | 4aaa4f90eacd65e3a3c1e003d9ac218d24d097bb /bin | |
parent | c1d69c0e9e3361f9dd340ac133407e1dbb1d08ca (diff) |
get make findunusedcode working again
Change-Id: I8fed32b8eb1e986321dde0542c15b7b8cf91b123
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/findunusedcode | 51 |
1 files changed, 40 insertions, 11 deletions
diff --git a/bin/findunusedcode b/bin/findunusedcode index 62e56c87d9b8..4aaf9cc064b6 100755 --- a/bin/findunusedcode +++ b/bin/findunusedcode @@ -6,16 +6,45 @@ GNUMAKE=$2 cd ${SRCDIR} which callcatcher > /dev/null 2>&1 || \ (echo "callcatcher not installed" && false) -mkdir -p ${SRCDIR}/callcatcher/config_host -cp config_host/* callcatcher/config_host -cp config_host.mk* callcatcher -cat config_host.mk | sed -e s,"export OOO_JUNIT_JAR=.*","export OOO_JUNIT_JAR=",g > ${SRCDIR}/callcatcher/config_host.mk -sed -i -e s,g++,"callcatcher g++",g ${SRCDIR}/callcatcher/config_host.mk -sed -i -e s,gcc,"callcatcher gcc",g ${SRCDIR}/callcatcher/config_host.mk -echo unexport ARCH_FLAGS >> ${SRCDIR}/callcatcher/config_host.mk -echo unexport CFLAGS >> ${SRCDIR}/callcatcher/config_host.mk -echo unexport CXXFLAGS >> ${SRCDIR}/callcatcher/config_host.mk -${GNUMAKE} -f ${SRCDIR}/solenv/bin/callcatcher.Makefile findunusedcode + +mkdir -p ${SRCDIR}/callcatcher +cd ${SRCDIR}/callcatcher + +echo "--without-doxygen + --enable-verbose + --enable-gio + --enable-packagekit + --disable-gnome-vfs + --enable-extension-integration + --enable-graphite + --enable-evolution2 + --enable-lockdown + --enable-online-update + --enable-dbgutil + --enable-werror + --enable-gtk3 + --enable-kde4 + --enable-dbus + --enable-gstreamer + --disable-gstreamer-0-10" + > autogen.input + +export CC="callcatcher ${CC:-gcc}" +export CXX="callcatcher ${CXX:-g++}" +export AR="callarchive ${AR:-ar}" + +/bin/env -i CC="$CC" CXX="$CXX" AR="$AR" /bin/bash -l ../autogen.sh + +export dbglevel=2 + +make + +callanalyse \ + instdir/program/* \ + workdir/LinkTarget/*/* workdir/LinkTarget/*/*/* \ + workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit.so* \ + > unusedcode.all + grep ::.*\( unusedcode.all \ | grep -v ^Atom \ | grep -v ^atom:: \ @@ -46,4 +75,4 @@ grep ::.*\( unusedcode.all \ | grep -v ^WPS \ | grep -v WPX \ | grep -v ^WSObject \ - > unusedcode.easy + > ../unusedcode.easy |