Kaydet (Commit) 621ddc9c authored tarafından Caolán McNamara's avatar Caolán McNamara

get make findunusedcode working again

Change-Id: I8fed32b8eb1e986321dde0542c15b7b8cf91b123
üst c1d69c0e
...@@ -6,16 +6,45 @@ GNUMAKE=$2 ...@@ -6,16 +6,45 @@ GNUMAKE=$2
cd ${SRCDIR} cd ${SRCDIR}
which callcatcher > /dev/null 2>&1 || \ which callcatcher > /dev/null 2>&1 || \
(echo "callcatcher not installed" && false) (echo "callcatcher not installed" && false)
mkdir -p ${SRCDIR}/callcatcher/config_host
cp config_host/* callcatcher/config_host mkdir -p ${SRCDIR}/callcatcher
cp config_host.mk* callcatcher cd ${SRCDIR}/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 echo "--without-doxygen
sed -i -e s,gcc,"callcatcher gcc",g ${SRCDIR}/callcatcher/config_host.mk --enable-verbose
echo unexport ARCH_FLAGS >> ${SRCDIR}/callcatcher/config_host.mk --enable-gio
echo unexport CFLAGS >> ${SRCDIR}/callcatcher/config_host.mk --enable-packagekit
echo unexport CXXFLAGS >> ${SRCDIR}/callcatcher/config_host.mk --disable-gnome-vfs
${GNUMAKE} -f ${SRCDIR}/solenv/bin/callcatcher.Makefile findunusedcode --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 ::.*\( unusedcode.all \
| grep -v ^Atom \ | grep -v ^Atom \
| grep -v ^atom:: \ | grep -v ^atom:: \
...@@ -46,4 +75,4 @@ grep ::.*\( unusedcode.all \ ...@@ -46,4 +75,4 @@ grep ::.*\( unusedcode.all \
| grep -v ^WPS \ | grep -v ^WPS \
| grep -v WPX \ | grep -v WPX \
| grep -v ^WSObject \ | grep -v ^WSObject \
> unusedcode.easy > ../unusedcode.easy
#
# 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
# -*- 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:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment