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 | |
parent | c1d69c0e9e3361f9dd340ac133407e1dbb1d08ca (diff) |
get make findunusedcode working again
Change-Id: I8fed32b8eb1e986321dde0542c15b7b8cf91b123
-rwxr-xr-x | bin/findunusedcode | 51 | ||||
-rw-r--r-- | solenv/bin/callcatchEnv.Set.sh | 15 | ||||
-rw-r--r-- | solenv/bin/callcatcher.Makefile | 34 |
3 files changed, 40 insertions, 60 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 diff --git a/solenv/bin/callcatchEnv.Set.sh b/solenv/bin/callcatchEnv.Set.sh deleted file mode 100644 index 38c24c1f9696..000000000000 --- a/solenv/bin/callcatchEnv.Set.sh +++ /dev/null @@ -1,15 +0,0 @@ -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -CC="callcatcher ${CC:-gcc}" -CXX="callcatcher ${CXX:-g++}" -AR="callarchive ${AR:-ar}" -#old-school ones, can go post-gbuildification is complete -LINK="callcatcher $CXX" -LIBMGR="callarchive ${LIBMGR:-ar}" -export CC CXX AR LINK LIBMGR -export dbglevel=2 diff --git a/solenv/bin/callcatcher.Makefile b/solenv/bin/callcatcher.Makefile deleted file mode 100644 index 10b09e3a9d2b..000000000000 --- a/solenv/bin/callcatcher.Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# - -.PHONY: all - -include callcatcher/config_host.mk - -export CC:=callcatcher $(CC) -export CXX:=callcatcher $(CXX) -ifeq ($(AR),) -export AR:=callarchive ar -else -export AR:=callarchive $(AR) -endif -export dbglevel:=2 - -include $(SRCDIR)/solenv/gbuild/gbuild.mk - -findunusedcode: - $(GNUMAKE) BUILDDIR=callcatcher -j $(PARALLELISM) $(GMAKE_OPTIONS) -f Makefile.gbuild - $(GNUMAKE) BUILDDIR=callcatcher -j $(PARALLELISM) $(GMAKE_OPTIONS) -f Makefile.gbuild subsequentcheck - callanalyse \ - $(INSTDIR)/program/* \ - $(WORKDIR)/LinkTarget/*/* $(WORKDIR)/LinkTarget/*/*/* \ - $(WORKDIR)/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit.so* \ - > unusedcode.all - -# vim: set noet sw=4 ts=4: |