diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2009-02-24 16:12:02 +0100 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@gmx.de> | 2009-03-25 14:43:44 +0100 |
commit | d71a2965250db8873802b12b30c851c3fe3e2992 (patch) | |
tree | 375f89316957cc8dce66fbfaee62993b964d2d32 | |
parent | 0262e2bfd23eba622dcec9f2a6c8003ecc6ac2c9 (diff) |
dist: fixed distcheck, bundle Synthesis
When --with-synthesis-src is used, then the Synthesis source code is compiled
automatically and included in a .tar.gz.
Added some missing EXTRA_DIST files.
-rw-r--r-- | HACKING | 54 | ||||
-rw-r--r-- | configure-pre.in | 314 | ||||
-rw-r--r-- | src/Makefile-gen.am | 74 | ||||
-rw-r--r-- | src/backends/addressbook/Makefile.am | 8 | ||||
-rw-r--r-- | src/backends/evolution/Makefile.am | 8 | ||||
-rw-r--r-- | src/backends/file/Makefile.am | 13 | ||||
-rw-r--r-- | src/backends/sqlite/Makefile.am | 8 | ||||
-rw-r--r-- | src/core/Makefile.am | 5 | ||||
-rw-r--r-- | test/Makefile.am | 18 |
9 files changed, 194 insertions, 308 deletions
@@ -1,46 +1,3 @@ -Synthesis Branch ----------------- - -Compile and install Synthesis SDK in directory "foo". - -Configure SyncEvolution with - SYNTHESIS_CFLAGS=-Ifoo/include SYNTHESIS_LIBS="-Lfoo/lib -lsynthesissdk -lsynthesis" - -TODO: create .pc file for Synthesis -TODO: libsynthesissdk.la declares its dependency on libsynthesis.la, but libtool - does not pick that up when linking libsynthesissdk.a into a .so - => -lsynthesis above is a temporary workaround for that, only necessary - when compiling SyncEvolution with --enable-shared - -Create a syncevolution.xml config file in the current -directory, see src/syncevolution.xml. - -Run syncevolution with LD_LIBRARY_PATH=foo/lib:SDK_PATH/SDK/bin/Linux -where SDK_PATH is the installation directory of the official Synthesis -SDK (only necessary if .xml config refers to some of those modules). - -Currently none of the SyncEvolution backends are connected to Synthesis, -so one has to configure a dummy file backend and use the SDK_textdb.so -to handle the data. - -Example config: $ ./syncevolution --print-config --quiet funambol_1 - -syncURL = http://my.funambol.com/sync -username = xxxx -password = yyyy -logdir = /tmp -useProxy = 1 -proxyHost = http://proxy.isw.intel.com:911 -deviceId = sc-pim-3e43622c-2e38-477a-9a9d-29ce45aba78c - -[addressbook] -sync = two-way -type = file:text/x-calendar:1.0 -evolutionsource = file:///home/pohly/funambol/addressbook -uri = card - - - Checking out the Source ----------------------- @@ -51,11 +8,12 @@ via Before using sources checked out from Subversion, invoke "sh autogen.sh" with appropriate autotools packages installed. -When running the configure script, it will check out the source of a -suitable Funambol client library which will be compiled -automatically. There are configure options for using a precompiled -Funambol client library or non-default sources - see the "funambol" -configure options for details. +When running the configure script, it can be told to compile a +Synthesis library automatically via the --with-synthesis-src configure +option. This has advantages when modifying the Synthesis source +together with SyncEvolution (no need to install Synthesis and thus +faster compilation) and will bundle the Synthesis sources in source +.tar.gz archives. For doing development work the recommended configure line is: configure CXXFLAGS="-Wall -Werror -Wno-unknown-pragmas" \ diff --git a/configure-pre.in b/configure-pre.in index 1eb67fc7..a988abf6 100644 --- a/configure-pre.in +++ b/configure-pre.in @@ -1,12 +1,12 @@ dnl -*- mode: Autoconf; -*- dnl Invoke autogen.sh to produce a configure script. -AC_INIT(src/syncevolution.cpp) -AM_INIT_AUTOMAKE(syncevolution, 0.8.1) -define([FUNAMBOLSRC_REPO], [git://github.com/pohly/funambol-cpp-client-api.git]) +AC_INIT([syncevolution], [0.8.1]) +AM_INIT_AUTOMAKE([tar-ustar]) +define([SYNTHESISSRC_REPO], []) dnl Specify git revisions/branches without prefix, i.e., without 'origin'. dnl We'll sort that out below. -define([FUNAMBOLSRC_REVISION], [syncevolution-0.8.1a]) +define([SYNTHESISSRC_REVISION], [syncevolution-0.9]) AM_CONFIG_HEADER(config.h) AC_LIBTOOL_DLOPEN @@ -16,52 +16,31 @@ DEVICE_TYPE=desktop # options to be used when configuring client library CLIENT_CONFIGURE_OPTIONS= -AC_ARG_WITH(funambol, - AS_HELP_STRING([--with-funambol=<base directory>], - [specifies location of Funambol client library]), - [FUNAMBOL="$withval"]) - -AC_ARG_WITH(sync4j, - AS_HELP_STRING([--with-funambol=<base directory>], - [alias for --with-funambol]), - [FUNAMBOL="$withval"]) - -if test -e "$srcdir/src/client-api"; then - FUNAMBOLSRC_DEF="$srcdir/src/client-api" -else - FUNAMBOLSRC_DEF="FUNAMBOLSRC_REPO" -fi - -dnl AC_ARG_WITH(funambol-src, -dnl AS_HELP_STRING([--with-funambol-src=<base directory|svn URL|git URL>], -dnl [Specifies location of the Funambol 'client-api/native' source code. -dnl Use this instead of --with-funambol when the client library is to -dnl be compiled as part of the SyncEvolution compilation. In release -dnl versions of SyncEvolution, a copy of the client library is bundled -dnl under 'src/client-api' and compiled unless something else is -dnl specified. --with-funambol-src can be given a path to sources -dnl checked out already, a Subversion repository URL or a git repository -dnl URL. When given a repository URL, then the configure script -dnl will checkout the sources into 'src/client-api-copy' or -dnl update that working copy if the directory already exists. -dnl Default: bundled source in src/client-api (in released SyncEvolution sources), -dnl FUNAMBOLSRC_REPO otherwise.]), -dnl [FUNAMBOLSRC="$withval"], [FUNAMBOLSRC="$FUNAMBOLSRC_DEF"; REVISION="FUNAMBOLSRC_REVISION"]) - -dnl AC_ARG_WITH(sync4j-src, -dnl AS_HELP_STRING([--with-sync4j-src=<base directory>], -dnl [alias for --with-funambol-src]), -dnl [FUNAMBOLSRC="$withval"]) - -dnl AC_ARG_WITH(funambol-username, -dnl AS_HELP_STRING([--with-funambol-username=<svn username>], -dnl [username to use when checking out --with-funambol-src sources from Subversion, default 'guest']), -dnl [USERNAME="$withval"], [USERNAME="guest"]) - -dnl AC_ARG_WITH(funambol-revision, -dnl AS_HELP_STRING([--with-funambol-revision=<git tag/branch/hash or Subversion revision>], -dnl [Identifies which source revision to use from --with-funambol-src repository, empty string stands for latest. Default for default --funambol-src: FUNAMBOLSRC_REVISION]), -dnl [REVISION="$withval"]) +AC_ARG_WITH(synthesis-src, + AS_HELP_STRING([--with-synthesis-src=<base directory|svn URL|git URL>], + [Specifies location of the Synthesis root directory. + Use this when the Synthesis library is to + be compiled as part of the SyncEvolution compilation. In release + versions of SyncEvolution, a copy of the Synthesis code is bundled + under 'src/synthesis' and compiled unless something else is + specified. --with-synthesis-src can be given a path to sources + checked out already, a Subversion repository URL or a git repository + URL. When given a repository URL, then the configure script + will checkout the sources into 'src/synthesis-workdir' or + update that working copy if the directory already exists. + Default: bundled source in src/synthesis (in released SyncEvolution sources), + SYNTHESISSRC_REPO otherwise.]), + [SYNTHESISSRC="$withval"], [SYNTHESISSRC="$SYNTHESISSRC_DEF"; REVISION="SYNTHESISSRC_REVISION"]) + +AC_ARG_WITH(synthesis-username, + AS_HELP_STRING([--with-synthesis-username=<svn username>], + [username to use when checking out --with-synthesis-src sources from Subversion, default 'guest']), + [USERNAME="$withval"], [USERNAME="guest"]) + +AC_ARG_WITH(synthesis-revision, + AS_HELP_STRING([--with-synthesis-revision=<git tag/branch/hash or Subversion revision>], + [Identifies which source revision to use from --with-synthesis-src repository, empty string stands for latest. Default for default --synthesis-src: SYNTHESISSRC_REVISION]), + [REVISION="$withval"]) AC_ARG_ENABLE(shared, AS_HELP_STRING([--enable-shared], @@ -133,10 +112,10 @@ if test $enable_static_cxx == "yes"; then fi AC_SUBST(CORE_LDADD_DEP) -# preserve src/client-api by default, +# preserve src/synthesis by default, # always -CLEAN_CLIENT_SRC= -dnl FUNAMBOL_LIB=$PWD/src/build-client-api/src/libfunambol.la +CLEAN_SYNTHESIS_SRC= +SYNTHESIS_LIB=$PWD/src/build-synthesis/src/libsynthesissdk.la AC_SUBST(CLEAN_CLIENT_SRC) @@ -215,127 +194,113 @@ fi AC_SUBST(TRANSPORT_LIBS) AC_SUBST(TRANSPORT_CFLAGS) +# absolute patch to source of Synthesis client library +SYNTHESIS_SRC=no-synthesis-source +AC_SUBST(SYNTHESIS_SRC) +if test "$SYNTHESISSRC" && test "$SYNTHESISSRC" != "none"; then + # default: checkout a copy of the sources, remove it during maintainer-clean and distclean + CLEAN_CLIENT_SRC=synthesis-workdir + SYNTHESIS_SRC=$PWD/src/synthesis-workdir + + AC_MSG_NOTICE( [updating the content of $SYNTHESIS_SRC from $SYNTHESISSRC] ) + case "$SYNTHESISSRC" in + *://*) protocol="`echo $SYNTHESISSRC | sed -e 's;://.*;;'`";; + *) protocol="file";; + esac + + mkdir -p src + case $protocol in + file) + # use existing copy of the sources + CLEAN_CLIENT_SRC= + case "$SYNTHESISSRC" in + /*) SYNTHESIS_SRC="$SYNTHESISSRC";; + *) SYNTHESIS_SRC="$PWD/$SYNTHESISSRC";; + esac + ;; + *svn*|*http*) + SYNTHESISSRCREV="$SYNTHESISSRC" + if test "$REVISION"; then + revarg="-r $REVISION " + if `echo $SYNTHESISSRC | grep '@[0123456789]*'` >/dev/null; then + : + else + SYNTHESISSRCREV="$SYNTHESISSRC@$REVISION" + fi + fi + if test -d $SYNTHESIS_SRC ; then + ( set -x; cd $SYNTHESIS_SRC && svn --username=$USERNAME switch $revarg "$SYNTHESISSRC" ) || AC_ERROR([updating from $SYNTHESISSRC failed]) + else + (set -x; svn --username=$USERNAME checkout $revarg "$SYNTHESISSRCREV" $SYNTHESIS_SRC ) || AC_ERROR([checking out $SYNTHESISSRC failed]) + fi + ;; + *git*) + if test -d $SYNTHESIS_SRC ; then + ( set -x; cd $SYNTHESIS_SRC && git fetch "$SYNTHESISSRC" ) || AC_ERROR([updating from $SYNTHESISSRC failed]) + else + ( set -x; git clone "$SYNTHESISSRC" $SYNTHESIS_SRC ) || AC_ERROR([cloning $SYNTHESISSRC failed]) + fi + if test "$REVISION"; then + # git 1.6 finds tags and branches without explicit prefix, 1.4.4.4 doesn't + ( set -x; cd $SYNTHESIS_SRC && + (git checkout "$REVISION" || + git checkout "tags/$REVISION" || + git checkout "origin/$REVISION") ) || AC_ERROR([checking out $SYNTHESISSRC failed]) + fi + ;; + esac +elif test "$SYNTHESISSRC" != "none" && test -d $srcdir/src/synthesis; then + # use existing copy of the sources; beware of + # out-of-tree compilation + case $srcdir in + /*) SYNTHESIS_SRC="$srcdir/src/synthesis";; + *) SYNTHESIS_SRC="$PWD/$srcdir/src/synthesis";; + esac +else + PKG_CHECK_MODULES(SYNTHESIS, "synthesis") +fi -dnl # absolute patch to source of Funambol client library -dnl CLIENT_API_SRC=no-client-api-source -dnl AC_SUBST(CLIENT_API_SRC) -dnl if test ! "$FUNAMBOL"; then -dnl if test "$FUNAMBOLSRC"; then -dnl # default: checkout a copy of the sources, remove it during maintainer-clean and distclean -dnl CLEAN_CLIENT_SRC=client-api-copy -dnl CLIENT_API_SRC=$PWD/src/client-api-copy - -dnl AC_MSG_NOTICE( [updating the content of $CLIENT_API_SRC from $FUNAMBOLSRC] ) -dnl case "$FUNAMBOLSRC" in -dnl *://*) protocol="`echo $FUNAMBOLSRC | sed -e 's;://.*;;'`";; -dnl *) protocol="file";; -dnl esac - -dnl mkdir -p src -dnl case $protocol in -dnl file) -dnl # use existing copy of the sources -dnl CLEAN_CLIENT_SRC= -dnl case "$FUNAMBOLSRC" in -dnl /*) CLIENT_API_SRC="$FUNAMBOLSRC";; -dnl *) CLIENT_API_SRC="$PWD/$FUNAMBOLSRC";; -dnl esac -dnl ;; -dnl *svn*|*http*) -dnl FUNAMBOLSRCREV="$FUNAMBOLSRC" -dnl if test "$REVISION"; then -dnl revarg="-r $REVISION " -dnl if `echo $FUNAMBOLSRC | grep '@[0123456789]*'` >/dev/null; then -dnl : -dnl else -dnl FUNAMBOLSRCREV="$FUNAMBOLSRC@$REVISION" -dnl fi -dnl fi -dnl if test -d $CLIENT_API_SRC ; then -dnl ( set -x; cd $CLIENT_API_SRC && svn --username=$USERNAME switch $revarg "$FUNAMBOLSRC" ) || AC_ERROR([updating from $FUNAMBOLSRC failed]) -dnl else -dnl (set -x; svn --username=$USERNAME checkout $revarg "$FUNAMBOLSRCREV" $CLIENT_API_SRC ) || AC_ERROR([checking out $FUNAMBOLSRC failed]) -dnl fi -dnl ;; -dnl *git*) -dnl if test -d $CLIENT_API_SRC ; then -dnl ( set -x; cd $CLIENT_API_SRC && git fetch "$FUNAMBOLSRC" ) || AC_ERROR([updating from $FUNAMBOLSRC failed]) -dnl else -dnl ( set -x; git clone "$FUNAMBOLSRC" $CLIENT_API_SRC ) || AC_ERROR([cloning $FUNAMBOLSRC failed]) -dnl fi -dnl if test "$REVISION"; then -dnl # git 1.6 finds tags and branches without explicit prefix, 1.4.4.4 doesn't -dnl ( set -x; cd $CLIENT_API_SRC && -dnl (git checkout "$REVISION" || -dnl git checkout "tags/$REVISION" || -dnl git checkout "origin/$REVISION") ) || AC_ERROR([checking out $FUNAMBOLSRC failed]) -dnl fi -dnl ;; -dnl esac -dnl else -dnl # use existing copy of the sources; beware of -dnl # out-of-tree compilation -dnl case $srcdir in -dnl /*) CLIENT_API_SRC="$srcdir/src/client-api";; -dnl *) CLIENT_API_SRC="$PWD/$srcdir/src/client-api";; -dnl esac -dnl fi - -dnl ( cd $CLIENT_API_SRC/build/autotools && ( test -f configure || sh autogen.sh ) ) - -dnl if test -f $CLIENT_API_SRC/build/autotools/configure; then -dnl CLIENT_CONFIGURE="$CLIENT_API_SRC/build/autotools/configure" -dnl chmod u+x $CLIENT_API_SRC/build/autotools/configure $CLIENT_API_SRC/build/autotools/config.sub $CLIENT_API_SRC/build/autotools/config.guess - -dnl # use local copy of the sources, with dependencies -dnl # to trigger building the client library -dnl FUNAMBOL_SUBDIR=$PWD/src/build-client-api -dnl FUNAMBOL_DEP=$PWD/src/build-client-api/src/libfunambol.la - -dnl FUNAMBOL_CFLAGS="-I$FUNAMBOL_SUBDIR/include/posix -I$FUNAMBOL_SUBDIR/include/common -I$FUNAMBOL_SUBDIR/include -I$FUNAMBOL_SUBDIR/test" -dnl FUNAMBOL_LIBS="-L$FUNAMBOL_SUBDIR/src -lfunambol" - -dnl AC_MSG_NOTICE( [configuring the client library] ) -dnl # Passing some specific configure arguments to the client library's -dnl # configure makes sense (e.g., --enable-unit-tests) or is -dnl # required (--disable-dependency-tracking when compiling for -dnl # multiple architectures on Mac OS X). -dnl cxx_lib_args=`for i in --disable-dependency-tracking --enable-unit-tests; do -dnl if echo $ac_configure_args | grep -e $i >/dev/null; then -dnl echo $i; -dnl fi; -dnl done` -dnl if test "$enable_shared" == "yes"; then -dnl # Okay, this is a shortcut: strictly speaking we would have -dnl # to check with autoconf for the right flags... -dnl FUNAMBOL_LIB_SHARED_FLAGS="-DPIC -fPIC" -dnl fi -dnl if (set -x; mkdir -p $FUNAMBOL_SUBDIR && cd $FUNAMBOL_SUBDIR && $CLIENT_CONFIGURE $CLIENT_CONFIGURE_OPTIONS --build=$build_alias --host=$host_alias --target=$target_alias --disable-shared --with-transport-agent=curl CFLAGS="$CFLAGS $FUNAMBOL_LIB_SHARED_FLAGS" CXXFLAGS="$CXXFLAGS $FUNAMBOL_LIB_SHARED_FLAGS" $cxx_lib_args); then true; else -dnl AC_MSG_ERROR( [configuring client library failed] ) -dnl fi -dnl else -dnl AC_MSG_ERROR( [either --with-funambol or --with-funambol-src have to be used] ) -dnl fi -dnl else -dnl if test -f $FUNAMBOL/include/funambol/common/spds/SyncItem.h; then -dnl FUNAMBOL_CFLAGS="-I$FUNAMBOL/include/funambol/posix -I$FUNAMBOL/include/funambol/common -I$FUNAMBOL/include/funambol" -dnl FUNAMBOL_LIBS="-L$FUNAMBOL/lib -lfunambol" -dnl else -dnl AC_MSG_ERROR( [$FUNAMBOL does seem to be valid (e.g. include/funambol/spds/common/SyncItem.h is missing)] ) -dnl fi -dnl fi - -dnl TODO: compile Synthesis library the same way Funambol was compiled/bundled before? -dnl Makefiles are unchanged for that purpose. -FUNAMBOL_CFLAGS="$FUNAMBOL_CFLAGS $SYNTHESIS_CFLAGS" - -AC_SUBST(FUNAMBOL_CFLAGS) -AC_SUBST(FUNAMBOL_LIBS) -AC_SUBST(FUNAMBOL) -AC_SUBST(FUNAMBOL_SUBDIR) -AC_SUBST(FUNAMBOL_DEP) -AC_SUBST(FUNAMBOL_LIB) -AC_SUBST(FUNAMBOLSRC) +if test $SYNTHESIS_SRC != "no-synthesis-source"; then + ( cd $SYNTHESIS_SRC && ( test -f configure || sh autogen.sh ) ) || AC_MSG_ERROR([no configure script in $SYNTHESIS_SRC]) + + SYNTHESIS_CONFIGURE="$SYNTHESIS_SRC/configure" + chmod u+x $SYNTHESIS_SRC/configure $SYNTHESIS_SRC/config.sub $SYNTHESIS_SRC/config.guess + + # use local copy of the sources, with dependencies + # to trigger building the synthesis library + SYNTHESIS_SUBDIR=$PWD/src/build-synthesis + SYNTHESIS_DEP=$PWD/src/build-synthesis/src/libsynthesissdk.la + + SYNTHESIS_CFLAGS="-I$SYNTHESIS_SUBDIR/src" + SYNTHESIS_LIBS="-L$SYNTHESIS_SUBDIR/src -lsynthesissdk -lsynthesis" + + AC_MSG_NOTICE( [configuring the Synthesis library] ) + # Passing some specific configure arguments to the synthesis library's + # configure makes sense (e.g., --enable-unit-tests) or is + # required (--disable-dependency-tracking when compiling for + # multiple architectures on Mac OS X). + cxx_lib_args=`for i in --disable-dependency-tracking --enable-unit-tests; do + if echo $ac_configure_args | grep -e $i >/dev/null; then + echo $i; + fi; + done` + if test "$enable_shared" == "yes"; then + # Okay, this is a shortcut: strictly speaking we would have + # to check with autoconf for the right flags... + SYNTHESIS_LIB_SHARED_FLAGS="-DPIC -fPIC" + fi + if (set -x; mkdir -p $SYNTHESIS_SUBDIR && cd $SYNTHESIS_SUBDIR && $SYNTHESIS_CONFIGURE $SYNTHESIS_CONFIGURE_OPTIONS --build=$build_alias --host=$host_alias --target=$target_alias --with-transport-agent=curl CFLAGS="$CFLAGS $SYNTHESIS_LIB_SHARED_FLAGS" CXXFLAGS="$CXXFLAGS $SYNTHESIS_LIB_SHARED_FLAGS" $cxx_lib_args); then true; else + AC_MSG_ERROR( [configuring Synthesis library failed] ) + fi +fi + +AC_SUBST(SYNTHESIS_CFLAGS) +AC_SUBST(SYNTHESIS_LIBS) +AC_SUBST(SYNTHESIS) +AC_SUBST(SYNTHESIS_SUBDIR) +AC_SUBST(SYNTHESIS_DEP) +AC_SUBST(SYNTHESIS_LIB) +AC_SUBST(SYNTHESISSRC) dnl select backends BACKENDS="" @@ -361,4 +326,7 @@ AC_DEFUN([AC_ARG_ENABLE_BACKEND], AC_SUBST(SYNCSOURCES) AC_SUBST(BACKEND_DEFINES) +BACKEND_CPPFLAGS="$SYNTHESIS_CFLAGS $EPACKAGE_CFLAGS $EBOOK_CFLAGS $ECAL_CFLAGS $GLIB_CFLAGS" +AC_SUBST(BACKEND_CPPFLAGS) + dnl src/backends/*/configure-sub.in and configure-post.in follow diff --git a/src/Makefile-gen.am b/src/Makefile-gen.am index 650e8499..04803e83 100644 --- a/src/Makefile-gen.am +++ b/src/Makefile-gen.am @@ -1,26 +1,11 @@ BACKENDS = @BACKENDS@ -SUBDIRS = core $(BACKENDS) +SUBDIRS = $(SYNTHESIS_SUBDIR) core $(BACKENDS) +DIST_SUBDIRS = core $(BACKENDS) -AM_CPPFLAGS = $(SUBDIRS:%=-I$(srcdir)/%) -I$(srcdir)/../test @BACKEND_CPPFLAGS@ @FUNAMBOL_CFLAGS@ $(GLIB_CFLAGS) - -# applies to sources in SyncEvolution repository, but not -# the Funambol C++ client library -SYNCEVOLUTION_CXXFLAGS = @SYNCEVOLUTION_CXXFLAGS@ - -# set to directory name if the client API sources need to be removed -CLEAN_CLIENT_SRC=@CLEAN_CLIENT_SRC@ - -# set to absolute path of client API sources which need to be compiled -CLIENT_API_SRC=@CLIENT_API_SRC@ +AM_CPPFLAGS = $(SUBDIRS:%=-I$(srcdir)/%) -I$(srcdir)/../test $(BACKEND_CPPFLAGS) $(GLIB_CFLAGS) bin_PROGRAMS = syncevolution bin_SCRIPTS = synccompare -SYNCSOURCES = @SYNCSOURCES@ -# The Funambol libs should be inherited via libsyncevolution.la, but -# somehow that didn't work when enabling shared objects (probably -# because only a static libfunambol.a is built, which relies on -# tricks like adding -fPIC manually). -SYNCEVOLUTION_LDADD = @SYNCEVOLUTION_LDADD@ @FUNAMBOL_LIBS@ SYNCEVOLUTION_DEP = if ENABLE_MODULES else @@ -28,7 +13,7 @@ SYNCEVOLUTION_LDADD += $(SYNCSOURCES) SYNCEVOLUTION_DEP += $(SYNCSOURCES) endif EXTRA_PROGRAMS = client-test -EXTRA_DIST = shlibs.local Makefile-gen.am +EXTRA_DIST = shlibs.local Makefile-gen.am syncevolution.xml check_PROGRAMS = @CPPUNIT_TESTS@ TESTS = @CPPUNIT_TESTS@ @@ -38,12 +23,7 @@ CLEANFILES = libstdc++.a client-test $(CLIENT_LIB_TEST_FILES) # synccompare is created by replacing its 'import Algorithm::Diff;' # with a simplified copy of Diff.pm. -# -# If there is a copy of synccompare.pl in the SyncEvolution test directory, -# then it is used instead of the one from the client library. -vpath %.pl $(srcdir)/../test $(FUNAMBOL_SUBDIR)/test/test -vpath %.pm $(srcdir)/../test $(FUNAMBOL_SUBDIR)/test/test/Algorithm -synccompare : ../test/Algorithm/Diff.pm synccompare.pl +synccompare : ../test/Algorithm/Diff.pm ../test/synccompare.pl perl -e '$$diff = shift; open(DIFF, "<$$diff"); ($$_) = split(/__END__/, join("", <DIFF>)); s/\*import.*//m; s/require +Exporter;//; s/^#.*\n//mg; s/ +#.*\n//mg; $$diff = $$_;' -e 'while(<>) {' @MODIFY_SYNCCOMPARE@ -e 's/use +Algorithm::Diff;/"# embedded version of Algorithm::Diff follows, copyright by the original authors\n" . $$diff . "# end of embedded Algorithm::Diff\n"/e; print;}' $+ >$@ chmod u+x $@ @@ -65,8 +45,9 @@ else CORE_SOURCES += $(BACKEND_REGISTRIES) endif -CORE_LDADD = $(SYNCEVOLUTION_LDADD) core/libsyncevolution.la @GLIB_LIBS@ @LIBS@ -CORE_DEP = $(SYNCEVOLUTION_DEP) core/libsyncevolution.la @FUNAMBOL_DEP@ +CORE_CXXFLAGS = $(SYNTHESIS_CFLAGS) +CORE_LDADD = $(SYNCEVOLUTION_LDADD) core/libsyncevolution.la $(GLIB_LIBS) $(LIBS) +CORE_DEP = $(SYNCEVOLUTION_DEP) core/libsyncevolution.la $(SYNTHESIS_DEP) CORE_LDFLAGS = -uSyncEvolution_Module_Version -Wl,--export-dynamic # put link to static c++ library into current directory, needed if compiling with --enable-static-c++ @@ -82,35 +63,28 @@ syncevolution_SOURCES = \ # either way this does not lead to a dependency on those libs - done explicitly syncevolution_LDADD = $(CORE_LDADD) syncevolution_LDFLAGS = $(CORE_LDFLAGS) -syncevolution_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) -syncevolution_DEPENDENCIES = $(EXTRA_LTLIBRARIES) $(CORE_DEP) - -# FUNAMBOL_SUBDIR specifies the directory where we compile -# the client library by invoking make there. -# Installing its source is done explicitly. -# -# The path may be empty! -FUNAMBOLSRC = @FUNAMBOLSRC@ -FUNAMBOL_SUBDIR = @FUNAMBOL_SUBDIR@ -BUILT_SOURCES = $(CLIENT_LIB_TEST_FILES) +syncevolution_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) $(CORE_CXXFLAGS) +syncevolution_DEPENDENCIES = $(EXTRA_LTLIBRARIES) $(CORE_DEP) # $(SYNTHESIS_DEP) -@FUNAMBOL_LIB@ : $(FUNAMBOL_SUBDIR)/all +# rule which is only relevant when compiling Synthesis in subdirectory +#$(SYNTHESIS_LIB) : $(SYNTHESIS_SUBDIR)/all +#$(SYNTHESIS_SUBDIR)/% : +# [ ! "$(SYNTHESIS_SUBDIR)" ] || ( cd ${@D} && $(MAKE) ${@F} ) -# include client library in distribution +# include Synthesis in distribution dist-hook: - [ ! "$(FUNAMBOL_SUBDIR)" ] || mkdir -p $(distdir)/client-api && cp -r $(CLIENT_API_SRC)/* $(distdir)/client-api + [ ! "$(SYNTHESIS_SUBDIR)" ] || mkdir -p $(distdir)/synthesis && cp -a $(SYNTHESIS_SRC)/* $(distdir)/synthesis find $(distdir) -name .libs -o -name "*~" -o -name ".*" -o -name "*.o" -o -name "*.lo" -o -name CVS -o -name .svn -o -name .git -o -name autom4te.cache | xargs rm -rf clean-local: testclean rm -rf testcases - [ ! -d "$(FUNAMBOL_SUBDIR)" ] || (cd $(FUNAMBOL_SUBDIR) && $(MAKE) clean) # files created during testing testclean: rm -rf *.test.vcf *.log *.tests *.diff *.dat *Client_Sync_*client.* distclean-local: - rm -rf $(FUNAMBOL_SUBDIR) + rm -rf $(SYNTHESIS_SUBDIR) rm -rf $(CLEAN_CLIENT_SRC) # With --disable-shared autotools links against libfunambol.a which does not @@ -131,9 +105,10 @@ CLIENT_LIB_TEST_FILES = \ testcases/itodo20.ics nodist_client_test_SOURCES = $(CLIENT_LIB_TEST_FILES) client_test_CPPFLAGS = -DHAVE_CONFIG_H -DENABLE_INTEGRATION_TESTS -DENABLE_UNIT_TESTS $(AM_CPPFLAGS) -client_test_CXXFLAGS = `cppunit-config --cflags` $(SYNCEVOLUTION_CXXFLAGS) +client_test_CXXFLAGS = `cppunit-config --cflags` $(SYNCEVOLUTION_CXXFLAGS) $(CORE_CXXFLAGS) client_test_LDFLAGS = `cppunit-config --libs` `nm core/.libs/libsyncevolution.a | grep funambolAutoRegisterRegistry | sed -e 's/.* /-u /'` $(CORE_LDFLAGS) client_test_LDADD = $(CORE_LDADD) +client_test_DEPENDENCIES = # $(SYNTHESIS_DEP) # These dependencies are intentionally a bit too broad: # they ensure that all files are in place to *run* client-test, # but in particular the "all" dependency causes a rebuild @@ -147,17 +122,6 @@ $(filter testcases/%, $(filter $(LOCAL_TEST_FILES), $(CLIENT_LIB_TEST_FILES))) : mkdir -p testcases cp $< $@ -# sources from SyncEvolution -#$(filter-out testcases/%, $(filter $(LOCAL_TEST_FILES), $(CLIENT_LIB_TEST_FILES))) : % : $(srcdir)/../test/% -# sed -e 's/WCHAR_T/char/g' -e 's/TEXT(/(/g' -e 's/wcslen/strlen/g' -e 's/wcscmp/strcmp/g' $< >$@ - -# sources from compiled client library -#$(filter-out $(LOCAL_TEST_FILES) testcases/%, $(CLIENT_LIB_TEST_FILES)) : % : $(FUNAMBOL_SUBDIR)/test/test/% -# sed -e 's/WCHAR_T/char/g' -e 's/TEXT(/(/g' -e 's/wcslen/strlen/g' -e 's/wcscmp/strcmp/g' $< >$@ - -#$(CLIENT_LIB_TEST_FILES:%=$(FUNAMBOL_SUBDIR)/test/test/%): @FUNAMBOL_DEP@ - - # special target for testing with valgrind valgrind : test valgrind --leak-check=yes --suppressions=valgrind.supp ./test diff --git a/src/backends/addressbook/Makefile.am b/src/backends/addressbook/Makefile.am index 24cfea62..ef06ae81 100644 --- a/src/backends/addressbook/Makefile.am +++ b/src/backends/addressbook/Makefile.am @@ -1,8 +1,4 @@ -AM_CPPFLAGS = -I$(srcdir)/../../core @EPACKAGE_CFLAGS@ @EBOOK_CFLAGS@ @ECAL_CFLAGS@ @GLIB_CFLAGS@ @FUNAMBOL_CFLAGS@ - -# applies to sources in SyncEvolution repository, but not -# the Funambol C++ client library -SYNCEVOLUTION_CXXFLAGS = @SYNCEVOLUTION_CXXFLAGS@ +AM_CPPFLAGS = -I$(srcdir)/../../core $(BACKEND_CPPFLAGS) EXTRA_DIST = configure-sub.in @@ -22,6 +18,6 @@ SYNCADDRESSBOOK_SOURCES = \ AddressBookSource.cpp syncaddressbook_la_SOURCES = $(SYNCADDRESSBOOK_SOURCES) -syncaddressbook_la_LIBADD = @ADDRESSBOOK_LIBS@ +syncaddressbook_la_LIBADD = $(ADDRESSBOOK_LIBS) syncaddressbook_la_LDFLAGS = -module -rpath '$(pkglibdir)' syncaddressbook_la_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) diff --git a/src/backends/evolution/Makefile.am b/src/backends/evolution/Makefile.am index 462df033..dfe53606 100644 --- a/src/backends/evolution/Makefile.am +++ b/src/backends/evolution/Makefile.am @@ -1,8 +1,4 @@ -AM_CPPFLAGS = -I$(srcdir)/../../core @EPACKAGE_CFLAGS@ @EBOOK_CFLAGS@ @ECAL_CFLAGS@ @GLIB_CFLAGS@ @FUNAMBOL_CFLAGS@ - -# applies to sources in SyncEvolution repository, but not -# the Funambol C++ client library -SYNCEVOLUTION_CXXFLAGS = @SYNCEVOLUTION_CXXFLAGS@ +AM_CPPFLAGS = -I$(srcdir)/../../core $(BACKEND_CPPFLAGS) EXTRA_DIST = configure-sub.in @@ -47,6 +43,6 @@ syncecal_la_LDFLAGS = -module -rpath '$(pkglibdir)' -ldl syncecal_la_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) syncebook_la_SOURCES = $(SYNCEBOOK_SOURCES) -syncebook_la_LIBADD = @EBOOK_LIBS@ ../../core/libsyncevolution.la +syncebook_la_LIBADD = $(EBOOK_LIBS) ../../core/libsyncevolution.la syncebook_la_LDFLAGS = -module -rpath '$(pkglibdir)' syncebook_la_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) diff --git a/src/backends/file/Makefile.am b/src/backends/file/Makefile.am index 4fc76c0f..c9c7317c 100644 --- a/src/backends/file/Makefile.am +++ b/src/backends/file/Makefile.am @@ -1,13 +1,4 @@ -# Some of the core header files still have a dependency on Evolution, -# which is why its flags have to be listed. They are empty if Evolution -# access is disabled. -AM_CPPFLAGS = -I$(srcdir)/../../core @EPACKAGE_CFLAGS@ @EBOOK_CFLAGS@ @ECAL_CFLAGS@ @GLIB_CFLAGS@ @FILE_CFLAGS@ @FUNAMBOL_CFLAGS@ - -# Applies to sources in SyncEvolution repository, but not -# the Funambol C++ client library. Used to add -Wall -Werror -# only when compiling that source, but not for the client -# library. -SYNCEVOLUTION_CXXFLAGS = @SYNCEVOLUTION_CXXFLAGS@ +AM_CPPFLAGS = -I$(srcdir)/../../core $(BACKEND_CPPFLAGS) EXTRA_DIST = configure-sub.in @@ -26,7 +17,7 @@ SYNCFILE_SOURCES = \ FileSyncSource.cpp syncfile_la_SOURCES = $(SYNCFILE_SOURCES) -syncfile_la_LIBADD = @FILE_LIBS@ +syncfile_la_LIBADD = $(FILE_LIBS) syncfile_la_LDFLAGS = -module -rpath '$(pkglibdir)' syncfile_la_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) diff --git a/src/backends/sqlite/Makefile.am b/src/backends/sqlite/Makefile.am index 9a699cbc..11cfdc64 100644 --- a/src/backends/sqlite/Makefile.am +++ b/src/backends/sqlite/Makefile.am @@ -1,8 +1,4 @@ -AM_CPPFLAGS = -I$(srcdir)/../../core @EPACKAGE_CFLAGS@ @EBOOK_CFLAGS@ @ECAL_CFLAGS@ @GLIB_CFLAGS@ @SQLITE_CFLAGS@ @FUNAMBOL_CFLAGS@ - -# applies to sources in SyncEvolution repository, but not -# the Funambol C++ client library -SYNCEVOLUTION_CXXFLAGS = @SYNCEVOLUTION_CXXFLAGS@ +AM_CPPFLAGS = -I$(srcdir)/../../core $(BACKEND_CPPFLAGS) EXTRA_DIST = configure-sub.in @@ -23,7 +19,7 @@ SYNCSQLITE_SOURCES = \ SQLiteContactSource.cpp syncsqlite_la_SOURCES = $(SYNCSQLITE_SOURCES) -syncsqlite_la_LIBADD = @SQLITE_LIBS@ +syncsqlite_la_LIBADD = $(SQLITE_LIBS) syncsqlite_la_LDFLAGS = -module -rpath '$(pkglibdir)' syncsqlite_la_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) diff --git a/src/core/Makefile.am b/src/core/Makefile.am index fd4d5fea..9010e202 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = @BACKEND_CPPFLAGS@ @GLIB_CFLAGS@ @FUNAMBOL_CFLAGS@ +AM_CPPFLAGS = @BACKEND_CPPFLAGS@ @GLIB_CFLAGS@ # applies to sources in SyncEvolution repository, but not # the Funambol C++ client library @@ -22,6 +22,7 @@ CORE_SOURCES = \ eds_abi_wrapper.h \ eds_abi_wrapper.cpp \ \ + SyncML.h \ SyncML.cpp \ \ Logging.h \ @@ -74,7 +75,7 @@ CORE_SOURCES = \ libsyncevolution_la_SOURCES = $(CORE_SOURCES) -libsyncevolution_la_LIBADD = @EPACKAGE_LIBS@ @GLIB_LIBS@ @FUNAMBOL_LIBS@ $(TRANSPORT_LIBS) @LIBS@ $(SYNTHESIS_LIBS) +libsyncevolution_la_LIBADD = @EPACKAGE_LIBS@ @GLIB_LIBS@ $(TRANSPORT_LIBS) @LIBS@ $(SYNTHESIS_LIBS) libsyncevolution_la_CXXFLAGS = $(TRANSPORT_CFLAGS) $(SYNCEVOLUTION_CXXFLAGS) $(SYNTHESIS_CFLAGS) SyncEvolutionXML.c: $(srcdir)/../syncevolution.xml diff --git a/test/Makefile.am b/test/Makefile.am index d539a6ec..34b09d57 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1 +1,17 @@ -EXTRA_DIST = +EXTRA_DIST = \ + ClientTest.h \ + ClientTest.cpp \ + COPYING \ + client-test-main.cpp \ + test.h \ + Algorithm/Artistic \ + Algorithm/COPYING \ + Algorithm/Diff.pm \ + Algorithm/README \ + testcases/ical20.ics \ + testcases/itodo20.ics \ + testcases/vcal10.ics \ + testcases/vcard21.vcf \ + testcases/vcard30.vcf \ + testcases/imemo20.ics \ + synccompare.pl |