2005-10-08 14:03:24 +02:00
## Process this file with automake to produce Makefile.in
2009-08-07 12:08:58 +02:00
ACLOCAL_AMFLAGS = -I m4 -I m4-repo
2005-12-10 20:16:02 +01:00
2010-04-28 21:23:22 +02:00
man_MANS =
2010-03-23 18:59:01 +01:00
dist_doc_DATA =
SUBDIRS = src
i f C O N D _ C O R E
SUBDIRS += po test
2010-12-27 17:40:58 +01:00
dist_doc_DATA += README NEWS COPYING $( TEST_README_FILES) test/syncevo-http-server-logging.conf
2010-04-28 21:54:31 +02:00
i f C O N D _ H T M L _ R E A D M E
2011-07-18 18:15:40 +02:00
dist_doc_DATA += README.html
2010-04-28 21:54:31 +02:00
e n d i f
2010-04-28 21:23:22 +02:00
i f C O N D _ M A N _ P A G E S
man_MANS += syncevolution.1
e n d i f
2010-03-23 18:59:01 +01:00
e n d i f
DIST_SUBDIRS = src po test
2009-03-30 17:54:47 +02:00
2009-05-07 16:15:42 +02:00
EXTRA_DIST = \
HACKING \
LICENSE.txt \
LICENSE.LGPL-21 \
2010-04-28 21:23:22 +02:00
README.rst \
2009-05-07 16:15:42 +02:00
description \
configure-pre.in \
configure-post.in \
2009-11-27 13:51:03 +01:00
gen-autotools.sh \
2009-05-07 16:15:42 +02:00
autogen.sh \
Doxyfile
2009-03-30 17:54:47 +02:00
MAINTAINERCLEANFILES = Makefile.in config.h.in config.guess config.sub configure depcomp install-sh ltmain.sh missing mkinstalldirs
2009-07-14 14:16:02 +02:00
CLEANFILES =
2009-07-21 13:11:05 +02:00
TEST_README_FILES = $( wildcard $( srcdir) /test/README.*)
2009-10-02 11:21:36 +02:00
DEV_FILE_PATTERN = $( 1) $( 2) /etc $( 1) $( 2) /include $( 1) $( 2) /lib/*.so $( 1) $( 2) /lib/*.a $( 1) $( 2) /lib/*.la $( 1) $( 2) /lib/*/*.la $( 1) $( 2) /lib/pkgconfig
2009-07-27 13:34:21 +02:00
2009-07-14 14:16:02 +02:00
# binary distribution as .tar.gz
i f C O N D _ D B U S
# when building with D-Bus, we have no choice: the service has to go into /usr
# in order to be found
2010-04-28 21:54:31 +02:00
distbin : $( dist_doc_DATA ) INSTALL -tar -gz all
2009-07-14 14:16:02 +02:00
@ [ " $( BINSUFFIX) " ] || ( echo "please invoke with e.g. 'make distbin BINSUFFIX=debian-3.1'" ; exit 1 )
2011-05-16 14:43:32 +02:00
@ [ " $( prefix) " = "/usr" ] || ( echo "please reconfigure with --prefix=/usr" ; exit 1 )
2009-07-14 14:16:02 +02:00
rm -rf $( distdir)
2009-10-15 12:03:04 +02:00
$( MAKE) DESTDIR = ` pwd ` /$( distdir) install
$( MAKE) DESTDIR = ` pwd ` /$( distdir) installcheck
2009-10-02 11:21:36 +02:00
rm -rf $( call DEV_FILE_PATTERN,$( distdir) ,/usr)
for i in ` find $( distdir) -type d | sort -r` ; do rmdir $$ i 2>/dev/null || true; done
2009-07-14 14:16:02 +02:00
mkdir -p $( distdir) /usr/share/doc/syncevolution
cp $( srcdir) /INSTALL-tar-gz $( distdir) /INSTALL
2010-04-28 21:54:31 +02:00
cp $( filter-out all, $+) $( distdir) /usr/share/doc/syncevolution
2009-07-14 14:16:02 +02:00
tar zcf $( distdir) -$( BINSUFFIX) .tar.gz $( distdir)
rm -rf $( distdir)
e l s e
# without D-Bus, we can simply create an archive with a bin directory
# and everything works
2010-04-28 21:54:31 +02:00
distbin : $( dist_doc_DATA ) all
2006-03-11 20:23:43 +01:00
@ [ " $( BINSUFFIX) " ] || ( echo "please invoke with e.g. 'make distbin BINSUFFIX=debian-3.1'" ; exit 1 )
rm -rf $( distdir)
2009-10-14 12:16:01 +02:00
$( MAKE) prefix = ` pwd ` /$( distdir) install
2009-10-02 11:21:36 +02:00
echo removing developer files and empty directories
rm -rf $( call DEV_FILE_PATTERN,$( distdir) ,/)
for i in ` find $( distdir) -type d | sort -r` ; do rmdir $$ i 2>/dev/null || true; done
2010-04-28 21:54:31 +02:00
cp $( filter-out all, $+) $( distdir)
2006-03-11 20:23:43 +01:00
tar zcf $( distdir) -$( BINSUFFIX) .tar.gz $( distdir)
rm -rf $( distdir)
2009-07-14 14:16:02 +02:00
e n d i f
2007-10-11 00:27:27 +02:00
iphone : SyncEvolution .plist
IPHONE_FILENAME = syncevolution-$( VERSION) -iphone.zip
SyncEvolution.plist : SyncEvolution .plist .in $( IPHONE_FILENAME )
sed -e 's/__FILENAME__/$(IPHONE_FILENAME)/' \
-e 's/__VERSION__/$(VERSION)/' \
-e 's/__SIZE__/$(shell ls -l $(IPHONE_FILENAME) | sed -e ' s/ */ /g' | cut -d ' ' -f 5)/' \
$< >$@
$(IPHONE_FILENAME) : all
rm -rf syncevolution-iphone $@
$( MAKE) DESTDIR = ` pwd ` /syncevolution-iphone install
rm -rf ` ls -1 -d syncevolution-iphone/usr/share/doc/syncevolution/*/spds/sources/* | grep -v addressbook`
perl -pi -e 's;SyncEvolution test #1;;;' \
-e 's;^type = text/(x-)?vcard;type = addressbook;m;' \
syncevolution-iphone/usr/share/doc/syncevolution/*/spds/sources/addressbook/config.txt
cd syncevolution-iphone && zip -r ../$( IPHONE_FILENAME) .
2007-10-17 23:08:24 +02:00
TYPE_deb = -D
TYPE_rpm = -R
2009-07-14 14:16:02 +02:00
# Dependency calculation is intentionally incomplete:
# - don't force dependency on specific EDS libs via backends, their versions change too much (handled via --enable-evolution-compatibility and dynamic loading of the backends)
# - ignore client-test dependencies (because users typically don't run it)
2011-08-17 11:57:50 +02:00
REQUIRES_deb = --requires= " ' $( shell set -x; cd dist; LD_LIBRARY_PATH = $( distdir) /usr/lib:$( distdir) /usr/lib/syncevolution dpkg-shlibdeps -L$( srcdir) /src/shlibs.local --ignore-missing-info -O $$ ( for i in $$ ( find $( distdir) -type f -perm /u+x | grep -v -e client-test -e lib/syncevolution/sync) ; do if file $$ i | grep ELF >/dev/null; then echo $$ i; fi; done) | sed -e 's/[^=]*=//') $( REQUIRES_deb_neon) ' "
i f N E O N _ C O M P A T I B I L I T Y
# --enable-neon-compatibility in src/backends/webdav:
# replace dependencies from linking with hard-coded dlopen() dependencies
REQUIRES_deb_neon = , libneon27 ( >= 0.29.0) | libneon27-gnutls ( >= 0.29.0)
e l s e
REQUIRES_deb_neon =
e n d i f
2010-01-27 12:00:41 +01:00
VERSION_deb = 1:$( STABLE_VERSION) $( VERSION)
2007-10-17 23:08:24 +02:00
VERSION_rpm = ` echo $( VERSION) | sed -e s/-/_/g`
2007-10-25 23:10:48 +02:00
RELEASE = 2
2007-10-17 23:08:24 +02:00
2007-10-21 23:23:15 +02:00
# The package name: BINSUFFIX is used to distinguish binaries
# for different Evolution releases.
PKGNAME = syncevolution$( patsubst %,-%,$( BINSUFFIX) )
# This is a list of packages (potentially) provided on estamos.de.
# The current package conflicts with any of them, but not itself.
2008-10-09 21:32:17 +02:00
PKGS = $( addprefix syncevolution-evolution-, 2.6 2.8 2.12)
2007-10-21 23:23:15 +02:00
2007-10-17 23:08:24 +02:00
# When calling checkinstall we cannot install into /tmp
# because any file created there will be excluded: that makes
# sense, because "make install" might create temporary files
# there. The current directory might be in /tmp, so use $HOME.
2008-10-09 21:32:17 +02:00
#
# --replaces is necessary for migrating from syncevolution-evolution-<evover>
# to syncevolution-evolution (as per http://wiki.debian.org/Renaming_a_Package)
2010-02-22 17:25:53 +01:00
#
# When we build shared objects, then conflict with the corresponding
# system libs. The assumption is that the system library is named
# after the lib and its major version, which holds for libsmltk and
# libsynthesis in Debian.
2010-01-15 20:27:20 +01:00
deb rpm : dist /$( distdir ) dist /debian /control description -pak
2010-02-22 17:25:53 +01:00
conflicts = ` ls -1 dist/$( distdir) /usr/lib/*.so.[ 0123456789] | sed -e 's;.*/;;' -e 's/\.so\.//' -e 's/$$/, /' ` && \
2007-10-17 23:08:24 +02:00
tmpdir = ` mktemp -d $$ HOME/syncevolution.XXXXXXXXXX` && \
trap " rm -rf $$ tmpdir " EXIT && \
2007-12-17 19:58:55 +01:00
fakeroot checkinstall </dev/null \
2007-10-17 23:08:24 +02:00
$( TYPE_$@ ) \
$( REQUIRES_$@ ) \
--fstrans= yes \
2009-07-14 14:16:02 +02:00
--strip= no \
2007-10-17 23:08:24 +02:00
--pkgversion= $( VERSION_$@ ) \
2007-10-25 23:10:48 +02:00
--pkgrelease= $( RELEASE) \
2007-10-21 23:23:15 +02:00
--pkgname= $( PKGNAME) \
2008-12-01 14:39:50 +01:00
--pkgarch= $( PKGARCH) \
2007-10-21 23:23:15 +02:00
--provides= syncevolution \
2008-10-10 22:45:35 +02:00
--replaces= " 'syncevolution, `echo $( filter-out $( PKGNAME) , $( PKGS) ) | sed -e 's/ */ (<< 1:0.8.1-2), /g'` (<< 1:0.8.1-2)' " \
2010-02-22 17:25:53 +01:00
--conflicts= " ' $$ {conflicts}syncevolution, `echo $( filter-out $( PKGNAME) , $( PKGS) ) | sed -e 's/ */ (<< 1:0.8.1-2), /g'` (<< 1:0.8.1-2)' " \
2008-11-16 12:13:40 +01:00
--maintainer= "'Patrick Ohly <patrick.ohly@gmx.de>'" \
2007-10-17 23:08:24 +02:00
--pkgsource= 'http://sourceforge.net/project/showfiles.php?group_id=146288' \
--pkgaltsource= 'http://www.estamos.de/projects/SyncML/' \
2007-10-21 23:23:15 +02:00
--pkggroup= 'gnome' \
2009-11-27 14:06:54 +01:00
cp -r ` pwd ` /$</usr/* /usr
2011-05-16 14:43:32 +02:00
if [ $@ = "rpm" ] ; then cp /usr/src/rpm/RPMS/*/${ PKGNAME } -${ VERSION } -2.*.rpm .; fi
2009-07-14 14:16:02 +02:00
2009-07-14 14:54:57 +02:00
.PHONY : dist /$( distdir ) clean_dist
2009-07-14 14:16:02 +02:00
dist/$(distdir) : all
rm -rf $@
2009-10-15 12:03:04 +02:00
$( MAKE) install DESTDIR = ` pwd ` /$@
$( MAKE) installcheck DESTDIR = ` pwd ` /$@
2009-07-27 13:34:21 +02:00
rm -rf $( call DEV_FILE_PATTERN, $@ )
2009-07-14 14:54:57 +02:00
clean-local : clean_dist
clean_dist :
2010-01-15 20:27:20 +01:00
rm -rf dist description-pak
2009-07-14 14:16:02 +02:00
2009-07-14 15:02:57 +02:00
# required by dpkg-shlibdeps
dist/debian/control :
mkdir -p ${ @D }
touch $@
2007-10-17 23:08:24 +02:00
2009-11-27 14:06:54 +01:00
# for checkinstall
2007-10-17 23:08:24 +02:00
description-pak : description
cp $< $@
2008-07-29 23:06:11 +02:00
2008-08-02 19:48:17 +02:00
# Build "html" inside the build dir, using source files
# from the SyncEvolution source directory and (if built)
# the installed client-api.build directory.
2008-07-30 22:11:12 +02:00
.PHONY : doc clean -html
doc :
rm -rf html
2008-08-02 19:48:17 +02:00
export VERSION = " SyncEvolution $( VERSION) " ; \
2008-07-30 22:11:12 +02:00
export OUTPUT_DIRECTORY = "`pwd`" ; \
2008-08-02 19:48:17 +02:00
export PREDEFINED = "@BACKEND_DEFINES@ ENABLE_UNIT_TESTS ENABLE_INTEGRATION_TESTS" ; \
export CLIENT_LIBRARY = "@FUNAMBOL_SUBDIR@/test @FUNAMBOL_SUBDIR@/include " ; \
export STRIP_FROM_PATH = " $( srcdir) `dirname @FUNAMBOL_SUBDIR@` " ; \
2008-07-30 22:11:12 +02:00
cd $( srcdir) ; doxygen
clean-local : clean -html
clean-html :
rm -rf html
2011-02-07 13:36:13 +01:00
# configure.in is updated
2011-02-07 13:02:58 +01:00
# by gen-autotools.sh. This scripts is run
# each time "make all" (which depends on "Makefile")
# runs; this is easier than trying to anticipated
# when the script would produce different output.
# The no-op "true" seem to be necessary for make to
2011-02-07 13:36:13 +01:00
# re-check the configure.in time stamps.
2011-02-07 13:02:58 +01:00
$(srcdir)/configure.in : check -autotools
@ true
2011-02-07 13:27:56 +01:00
# Rebuilding the autotools files should never be necessary
# with source tar balls. Some parts of it depend on "git describe".
# So avoid it when there is no .git repo.
2011-02-07 13:02:58 +01:00
.PHONY : check -autotools
check-autotools :
2011-02-07 13:27:56 +01:00
@ cd $( srcdir) && ( [ ! -e .git ] || ./gen-autotools.sh )
2009-02-27 11:28:27 +01:00
dist-hook :
@if test -d " $( srcdir) /.git " ; \
then \
echo Creating ChangeLog && \
( cd " $( top_srcdir) " && \
echo '# Generated by configure. Do no edit.' ; echo; \
$( top_srcdir) /missing --run perl $( top_srcdir) /build/gen-changelog.pl ) > ChangeLog.tmp \
&& mv -f ChangeLog.tmp $( top_distdir) /ChangeLog \
|| ( rm -f ChangeLog.tmp ; \
echo Failed to generate ChangeLog >& 2 ) ; \
else \
echo A git checkout is required to generate a ChangeLog >& 2; \
fi
2009-10-12 23:49:26 +02:00
i f E N A B L E _ E V O L U T I O N _ C O M P A T I B I L I T Y
2011-07-17 15:18:15 +02:00
# check .so (relevant for modular builds) and main syncevolution binary
# (relevant in that case and for static builds) for dependencies on
# problematic libraries and symbols
#
# ical_strdup is an exception because it is in SyncEvolution.
2009-10-12 23:49:26 +02:00
installcheck-local :
2011-07-17 15:18:15 +02:00
for i in ` find $( DESTDIR) /$( libdir) /syncevolution $( DESTDIR) /$( libdir) /libsyncevo* $( DESTDIR) /$( libdir) /libsynthesis* -name *.so` $( DESTDIR) /$( bindir) /syncevolution; do \
if objdump -T -C $$ i | grep -v :: | grep '\*UND\*' | sort | grep -v -w ical_strdup | grep -e ical -e " e_" ; then \
2010-03-08 22:18:02 +01:00
echo " $$ i should not depend on EDS, libical or libbluetooth " ; \
2009-10-12 23:49:26 +02:00
exit 1; \
2011-07-17 15:18:15 +02:00
fi ; \
if ldd $$ i | grep -e libecal -e libebook -e libedata -e libical -e libbluetooth; then \
echo " $$ i should not be linked against EDS, libical or libbluetooth " ; \
exit 1; \
fi ; \
2009-10-12 23:49:26 +02:00
done
e n d i f
2010-04-28 21:23:22 +02:00
# patch README.rst properties on-the-fly with sed expressions
PATCH_README = -e " s/^:Version: .*/:Version: $( VERSION) / " -e "s/:Date: .*/:Date: `date +%Y-%m-%d`/"
# produce man pages
syncevolution.1 : README .rst
sed $( PATCH_README) $< | $( RST2MAN) --exit-status= 3 - >$@
CLEANFILES += syncevolution.1
# README is the traditional name in the distribution,
# continue using it instead of README.rst.
README : README .rst
sed $( PATCH_README) $< >$@
CLEANFILES += README
2010-04-28 21:54:31 +02:00
# The README.html is also used on syncevolution.org as "Usage" page,
# therefore we must use <h3> headers and lower to fit into the page.
README.html : README .rst
sed $( PATCH_README) $< | $( RST2HTML) --initial-header-level= 3 --exit-status= 3 - >$@
CLEANFILES += README.html