summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-11-29 14:24:54 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-11-29 17:25:14 +0100
commit6a6152a9a3d76f8ce26e4a9b5bd6479f31009ee7 (patch)
tree24bf75391e4e217813e51b922799c1c870963d31
parent912ad68d34488f81753ab50ef7a892a3b20161b1 (diff)
moved findunusedcode to gbuild
-rw-r--r--Makefile.in27
-rw-r--r--solenv/gbuild/extensions/post_BuildplTargets.mk23
2 files changed, 25 insertions, 25 deletions
diff --git a/Makefile.in b/Makefile.in
index 2a1407eb9c66..b02ea16df7c4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -67,34 +67,13 @@ unitcheck:
install:
@$(call forward_to_gbuild,$@)
+findunusedcode:
+ @$(call forward_to_gbuild,$@)
+
ifeq ($(filter clean distclean,$(MAKECMDGOALS)),)
Makefile: autogen.lastrun configure.in ooo.lst.in set_soenv.in Makefile.in
./autogen.sh
endif
-findunusedcode:
-# experimental callcatcher target
-# http://www.skynet.ie/~caolan/Packages/callcatcher.html
- @which callcatcher > /dev/null 2>&1 || \
- (echo "callcatcher not installed" && false)
- @. ./Env.Host.sh && \
- mkdir -p $$SRC_ROOT/solenv/callcatcher/bin && \
- ln -sf $$SRC_ROOT/solenv/$$INPATH/bin/dmake \
- $$SRC_ROOT/solenv/callcatcher/bin/dmake && \
- source <(sed -e s,$$INPATH,callcatcher,g ./Env.Host.sh) && \
- . ./solenv/bin/callcatchEnv.Set.sh && \
- cd instsetoo_native && \
- build.pl -P@BUILD_NCPUS@ --all -- -P@BUILD_MAX_JOBS@
- @. ./Env.Host.sh && \
- source <(sed -e s,$$INPATH,callcatcher,g ./Env.Host.sh) && \
- callanalyse \
- $$WORKDIR/LinkTarget/*/* \
- */$$OUTPATH/bin/* \
- */$$OUTPATH/lib/* > unusedcode.all
-#because non-c++ symbols could be dlsymed lets make a list of class level
-#unused methods which don't require much effort to determine if they need
-#to be just removed, or put behind appropiate platform or debug level ifdefs
- @grep ::.*\( unusedcode.all | grep -v ^cppu:: > unusedcode.easy
-
#as long as we are not completely gbuildified we need to explicitly depend on the build/install
#debugrun : dev-install # disabled for now, this dep seems to poison the debugrun !?
diff --git a/solenv/gbuild/extensions/post_BuildplTargets.mk b/solenv/gbuild/extensions/post_BuildplTargets.mk
index 592f590a25bd..306d0ad91c0d 100644
--- a/solenv/gbuild/extensions/post_BuildplTargets.mk
+++ b/solenv/gbuild/extensions/post_BuildplTargets.mk
@@ -58,7 +58,7 @@ cd $(SRCDIR)/$(1) && unset MAKEFLAGS && $(SOLARENV)/bin/build.pl -P$(BUILD_NCPUS
$(eval gb_BuildplTarget_COMPLETEDTARGETS+=$(1))
endef
-.PHONY: smoketestoo_native instsetoo_native cross-build-toolset dev-install all build
+.PHONY: smoketestoo_native instsetoo_native cross-build-toolset dev-install all build findunusedcode
smoketestoo_native: $(WORKDIR)/bootstrap $(SRCDIR)/src.downloaded $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross_toolset) | instsetoo_native
$(call gb_BuildplTarget_command,$@,$(if $(filter instsetoo_native,$(gb_BuildplTarget_COMPLETEDTARGETS)),--from instsetoo_native,--all))
@@ -70,6 +70,27 @@ instsetoo_native: $(WORKDIR)/bootstrap $(SRCDIR)/src.downloaded $(if $(filter $(
cross_toolset: $(WORKDIR)/bootstrap $(SRCDIR)/src.downloaded
source $(SRCDIR)/Env.Build.sh && $(call gb_BuildplTarget_command,$@,--all)
+# experimental callcatcher target
+# http://www.skynet.ie/~caolan/Packages/callcatcher.html
+findunusedcode:
+ @which callcatcher > /dev/null 2>&1 || \
+ (echo "callcatcher not installed" && false)
+ @mkdir -p $(SRCDIR)/solenv/callcatcher/bin && \
+ ln -sf $(SRCDIR)/solenv/$(INPATH)/bin/dmake \
+ $(SRCDIR)/solenv/callcatcher/bin/dmake && \
+ source <(sed -e s,$(INPATH),callcatcher,g $(SRCDIR)/Env.Host.sh) && \
+ source $(SRCDIR)/solenv/bin/callcatchEnv.Set.sh && \
+ $(call gb_BuildplTarget_command,instsetoo_native,--all)
+ @source <(sed -e s,$(INPATH),callcatcher,g $(SRCDIR)/Env.Host.sh) && \
+ callanalyse \
+ $(WORKDIR)/LinkTarget/*/* \
+ */$(OUTPATH)/bin/* \
+ */$(OUTPATH)/lib/* > unusedcode.all
+#because non-c++ symbols could be dlsymed lets make a list of class level
+#unused methods which don't require much effort to determine if they need
+#to be just removed, or put behind appropiate platform or debug level ifdefs
+ @grep ::.*\( unusedcode.all | grep -v ^cppu:: > unusedcode.easy
+
dev-install: smoketestoo_native
all: instsetoo_native