[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Evolution] Slow response



Actually, there's still a build bug in evolution which will cause this
makefile to fail the first time you run it.  I thought it had been
fixed, but really the build bug was just masked because I was installing
it into an already-populated directory.

Attached to this email please find a new makefile that will ignore that
error.  You _might_ still need to run the make twice the very first
time.  I also attached the shell script I use to start Evolution; this
script creates a new directory for this run of Evo and cd's there, then
turns on full debugging, enables core dumps, and invokes Evo.  I changed
my "start evo" icon properties to invoke this script instead of the
normal Evo.

I hope some people find this helpful.  If you've been doing your own
updates/builds you might consider this instead.

Cheers!

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith gnu org>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

#!/usr/bin/make -f
#
# Build (debuggable) Evo from SVN HEAD
#
# Author: Paul Smith <psmith gnu org>
#
# Also you can look here:
#   http://www.go-evolution.org/Compiling_Evolution_from_SVN
#
# --------------- User Customization ---------------
# Feel free to change these if you like

# Where to install Evo.  DO NOT use /usr here for any system controlled by a
# package manager (rpm, dpkg)
prefix :=	/opt/evo

# Comment this out if you don't want to use ccache
CCACHE :=	ccache


# --------------- Configuration Setup ---------------
# You shouldn't need to touch anything below here!

SVNURL :=	http://svn.gnome.org/svn

PACKAGES :=	libsoup gtkhtml evolution-data-server \
		evolution evolution-exchange evolution-webcal

PREREQS :=	gtk-doc-tools subversion libldap2-dev libnss-dev libnspr-dev \
		flex bison build-essential evolution-dev $(CCACHE)
# gnome-core-devel libgail-gnome-dev

CONFIG_VARS =	CC='$(CCACHE) gcc' CFLAGS=-g
CONFIG_OPTS =	--prefix='$(prefix)'
BUILD_VARS =
BUILD_OPTS =
INSTALL_VARS =
INSTALL_OPTS =

CCACHE_DIR :=	$(CURDIR)/ccache
PKG_CONFIG_PATH := $(prefix)/lib/pkgconfig
export CCACHE_DIR PKG_CONFIG_PATH

# ----- Per-package configuration and build options

libsoup_CONFIG_VARS =
libsoup_CONFIG_OPTS =
libsoup_BUILD_VARS =
libsoup_BUILD_OPTS =
libsoup_INSTALL_VARS =
libsoup_INSTALL_OPTS =

gtkhtml_CONFIG_VARS =
gtkhtml_CONFIG_OPTS =
gtkhtml_BUILD_VARS =
gtkhtml_BUILD_OPTS =
gtkhtml_INSTALL_VARS =
gtkhtml_INSTALL_OPTS =

evolution-data-server_CONFIG_VARS =
evolution-data-server_CONFIG_OPTS =	--with-openldap=yes \
				        --enable-gnome-keyring=yes \
					--with-e2k-debug
evolution-data-server_BUILD_VARS =
evolution-data-server_BUILD_OPTS =
evolution-data-server_INSTALL_VARS =
evolution-data-server_INSTALL_OPTS =

evolution_CONFIG_VARS =
evolution_CONFIG_OPTS =	--with-openldap=yes --enable-nntp=yes \
			--enable-ipv6=yes --enable-test-component=yes \
			--enable-nss=yes --enable-smime=yes \
			--enable-plugins=all --enable-cairo-calendar=yes \
			--enable-exchange=yes --with-e2k-debug \
			--enable-imap4=yes
evolution_BUILD_VARS =
# We have to run with errors off here because we don't have permissions
# to install into /var/lib/scrollkeeper/scrollkeeper_docs
evolution_BUILD_OPTS =	-k
evolution_INSTALL_VARS =
# We have to ignore errors here because of a bug:
# make[4]: Entering directory `/opt/tmp/evo-src/evolution/shell'
# /bin/bash ../mkinstalldirs /opt/tmp/evo/bin
# mkdir -p -- /opt/tmp/evo/bin
# /bin/bash ../libtool --mode=install /usr/bin/install -c evolution /opt/tmp/evo/bin/evolution
# libtool: install: warning: `libeshell.la' has not been installed in `/opt/tmp/evo/lib/evolution/2.12'
# /usr/bin/install -c .libs/evolution /opt/tmp/evo/bin/evolution
# test -z "/opt/tmp/evo/lib/evolution/2.12/components" || mkdir -p -- "/opt/tmp/evo/lib/evolution/2.12/components"
#  /bin/bash ../libtool --mode=install /usr/bin/install -c  'libevolution-test.la' '/opt/tmp/evo/lib/evolution/2.12/components/libevolution-test.la'
# libtool: install: warning: relinking `libevolution-test.la'
# (cd /opt/tmp/evo-src/evolution/shell; /bin/bash ../libtool ... )
# ccache gcc -shared  .libs/Evolution-common.o .libs/Evolution-skels.o .libs/Evolution-stubs.o .libs/evolution-test-component.o  -Wl,--rpath -Wl,/opt/tmp/evo/lib/evolution/2.12 -L/opt/tmp/evo/lib/evolution/2.12 -leshell -L/usr/lib -lgnomeui-2 -lSM -lICE -lgnomevfs-2 -lgnome-keyring -lgconf-2 -lbonoboui-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lart_lgpl_2 -lpangoft2-1.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXfixes -lpango-1.0 -lcairo -lX11 -lbonobo-2 -lbonobo-activation -lgmodule-2.0 -ldl -lORBit-2 -lgthread-2.0 -lrt -lgobject-2.0 -lglib-2.0  -Wl,--export-dynamic -pthread -Wl,-soname -Wl,libevolution-test.so -o .libs/libevolution-test.so
# /usr/bin/ld: cannot find -leshell
# collect2: ld returned 1 exit status
# libtool: install: error: relink `libevolution-test.la' with the above command before installing it
# make[4]: *** [install-componentLTLIBRARIES] Error 1
# make[4]: Leaving directory `/opt/tmp/evo-src/evolution/shell'
# make[3]: *** [install-am] Error 2
# make[3]: Leaving directory `/opt/tmp/evo-src/evolution/shell'
# make[2]: *** [install] Error 2
# make[2]: Leaving directory `/opt/tmp/evo-src/evolution/shell'
# make[1]: *** [install-recursive] Error 1
# make[1]: Leaving directory `/opt/tmp/evo-src/evolution'
evolution_INSTALL_OPTS = -k ; true

evolution-exchange_CONFIG_VARS =
evolution-exchange_CONFIG_OPTS = --with-openldap=yes --with-e2k-debug
evolution-exchange_BUILD_VARS =
evolution-exchange_BUILD_OPTS =
evolution-exchange_INSTALL_VARS =
evolution-exchange_INSTALL_OPTS =

evolution-webcal_CONFIG_VARS =
evolution-webcal_CONFIG_OPTS =
evolution-webcal_BUILD_VARS =
evolution-webcal_BUILD_OPTS =
evolution-webcal_INSTALL_VARS =
evolution-webcal_INSTALL_OPTS =

# -----

STAMPDIR :=	.stamp

# Commands

CP :=		cp -p
CPDIR :=	cp -a
ECHO :=		echo
LINK :=		ln -s
MKDIR :=	mkdir -p
RM :=		rm -f
RMDIR :=	rm -rf
SUDO :=		sudo
SVN :=		svn
TOUCH :=	touch
UNPACK :=	tar xjf
WGET :=		wget

MKSTAMP =	$(TOUCH) '$(CURDIR)/$@'

# Make sure we look in the new location for apps
PATH :=		$(prefix)/bin:$(PATH)
export PATH

$(shell $(MKDIR) $(CURDIR)/$(STAMPDIR))

STAMPTYPES :=	update patch config build install

# ----- all target

# All means everything is installed
.PHONY: all all-install
all: all-install $(STAMPDIR)/setup

all-install: $(patsubst %,$(STAMPDIR)/%.install,$(PACKAGES))

# Make sure none of the targets are considered intermediate
.PRECIOUS: $(foreach X,$(STAMPTYPES),$(STAMPDIR)/%.$X) \
	   $(addsuffix /.svn,$(PACKAGES))

# ----- final setup operations

$(STAMPDIR)/setup: $(STAMPDIR)/evolution-data-server.install
	@echo "Setting privileges (requires $(SUDO)!)..." \
	   && $(SUDO) chgrp mail $(prefix)/libexec/camel-lock-helper-* \
	   && $(SUDO) chmod g+s $(prefix)/libexec/camel-lock-helper-*
	$(MKSTAMP)

# ----- install SVN workspaces

$(STAMPDIR)/%.install: $(STAMPDIR)/%.build
	cd '$*' \
	 && $(INSTALL_VARS) $($*_INSTALL_VARS) \
		$(MAKE) install $(INSTALL_OPTS) $($*_INSTALL_OPTS)
	$(MKSTAMP)

# ----- build SVN workspaces

$(STAMPDIR)/%.build: $(STAMPDIR)/%.config
	cd '$*' \
	 && $(BUILD_VARS) $($*_BUILD_VARS) \
		$(MAKE) $(BUILD_OPTS) $($*_BUILD_OPTS)
	$(MKSTAMP)

# ----- configure SVN workspaces

$(STAMPDIR)/%.config: $(STAMPDIR)/%.patch
	cd '$*' \
	 && $(CONFIG_VARS) $($*_CONFIG_VARS) \
		./autogen.sh $(CONFIG_OPTS) $($*_CONFIG_OPTS)
	$(MKSTAMP)

# ----- patch SVN workspaces

$(STAMPDIR)/%.patch: $(STAMPDIR)/%.update
	$(MKSTAMP)

# ----- update SVN workspaces

getsvnrev = `$(SVN) info $(1) | sed -n 's/^Revision: \([0-9][0-9]*\).*/\1/p'`

$(STAMPDIR)/%.update: %/.svn FORCE | check-prereqs
	cd '$*' \
	   && head="$(call getsvnrev,-r HEAD)" \
	   && if [ "$(call getsvnrev,)" = "$$head" ]; then \
		$(ECHO) "No SVN update needed for $*."; \
	      else \
		$(SVN) update; \
		$(MKSTAMP); \
	      fi
FORCE:

%/.svn:
	$(SVN) checkout '$(SVNURL)/$*/trunk' '$*'
	$(TOUCH) '$(CURDIR)/$(STAMPDIR)/$*.update'

.PHONY: check-update
check-update:
	@for pkg in $(PACKAGES); do \
	   ( \
	     cd "$$pkg"; \
	     head="$(call getsvnrev,-r HEAD)"; \
	     if [ "$(call getsvnrev,)" = "$$head" ]; then \
		$(ECHO) "No SVN update needed for $$pkg."; \
	     else \
		$(ECHO) "$$pkg has SVN updates available:"; \
		$(SVN) status -q -u; \
	     fi; \
	   ); \
	 done

.PHONY: check-changelog
check-changelog:
	@for pkg in $(PACKAGES); do \
	   ( \
	     cd "$$pkg"; \
	     head="$(call getsvnrev,-r HEAD)"; \
	     if [ "$(call getsvnrev,)" = "$$head" ]; then \
		$(ECHO) "No SVN update needed for $$pkg."; \
	     else \
		$(ECHO) "$$pkg has SVN updates available:"; \
		log="/tmp/svnstatus.log.$$$$"; \
		$(SVN) status -q -u 2>&1 | tee "$$log"; \
		clogs=`while read stat rev fn; do \
			 case $$fn in \
			   ChangeLog|*/ChangeLog) echo "$$fn" ;; \
			 esac; \
		       done < "$$log" | sort`; \
		[ -n "$$clogs" ] && $(SVN) diff -r "BASE:$$head" $$clogs; \
		$(RM) "$$log"; \
	     fi; \
	   ); \
	 done

# ----- create SVN workspaces

# ----- check packages

# This is for DPKG systsems.  Someone else will have the write the
# equivalent RPM code.
.PHONY: check-prereqs
check-prereqs:
	@installed=`dpkg -l $(PREREQS) | grep '^ii ' | wc -l`; \
	    if [ "$$installed" != "$(words $(PREREQS))" ]; then \
		$(ECHO); \
		$(ECHO) "Not all prerequisites are installed!"; \
		$(ECHO) "Use 'aptitude install ...' on the above missing packages."; \
		$(ECHO); \
		exit 1; \
	    fi

# ----- cleanup

.PHONY: clean
clean:
	$(RMDIR) $(STAMPDIR) $(BLDROOT)/* $(PREFIX)

# ----- ordering

# These ensure that packages are built in the correct order.  In general,
# we can't do the config until after we've installed the previous packages.
#
# Technically, we don't really need to reconfig after every install: most of
# the time it would be enough to rebuild after the install; however, there's
# no good way to make that work all the time, unless we had perfect
# prerequisite declarations (knowing which installed files actually would
# require a reconfig vs. a rebuild for example).

$(STAMPDIR)/gtkhtml.config : $(STAMPDIR)/libsoup.install

$(STAMPDIR)/evolution-data-server.config : \
	$(STAMPDIR)/libsoup.install \
	$(STAMPDIR)/gtkhtml.install

$(STAMPDIR)/evolution.config : \
	$(STAMPDIR)/libsoup.install \
	$(STAMPDIR)/gtkhtml.install \
	$(STAMPDIR)/evolution-data-server.install

$(STAMPDIR)/evolution-exchange.config : \
	$(STAMPDIR)/evolution-data-server.install \
	$(STAMPDIR)/evolution.install

$(STAMPDIR)/evolution-webcal.config : \
	$(STAMPDIR)/evolution-data-server.install \
	$(STAMPDIR)/evolution.install

Attachment: evolution-svn
Description: application/shellscript



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]