114
113
CORE_CXXFLAGS = $(SYNTHESIS_CFLAGS)
115
114
CORE_LDADD = $(SYNCEVOLUTION_LDADD) syncevo/libsyncevolution.la $(GLIB_LIBS) $(GTHREAD_LIBS) $(GOBJECT_LIBS) $(LIBS)
116
115
CORE_DEP = $(SYNCEVOLUTION_DEP) syncevo/libsyncevolution.la $(SYNTHESIS_DEP)
117
CORE_LD_FLAGS = -uSyncEvolution_Module_Version -Wl,--export-dynamic
116
CORE_LD_FLAGS = -Wl,-uSyncEvolution_Module_Version -Wl,--export-dynamic
119
118
# put link to static c++ library into current directory, needed if compiling with --enable-static-c++
132
131
# SYNCEVOLUTION_LDADD will be replaced with libsyncebook.la/libsyncecal.la/libsyncsqlite.la
133
132
# if linking statically against them, empty otherwise;
134
133
# either way this does not lead to a dependency on those libs - done explicitly
135
syncevolution_LDADD = $(CORE_LDADD) $(KEYRING_LIBS)
134
syncevolution_LDADD = $(CORE_LDADD) $(KEYRING_LIBS) $(KDE_KWALLET_LIBS)
137
syncevolution_LDADD += gdbus/libgdbus.la
136
syncevolution_LDADD += gdbus/libgdbussyncevo.la
139
138
syncevolution_LDFLAGS = $(CORE_LD_FLAGS) $(DBUS_LIBS)
140
syncevolution_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) $(CORE_CXXFLAGS) $(KEYRING_CFLAGS) -I$(srcdir)/gdbus $(DBUS_CFLAGS)
139
syncevolution_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) $(CORE_CXXFLAGS) $(KEYRING_CFLAGS) -I$(srcdir)/gdbus $(DBUS_CFLAGS) $(KDE_KWALLET_CFLAGS)
141
140
syncevolution_DEPENDENCIES = $(EXTRA_LTLIBRARIES) $(CORE_DEP) # $(SYNTHESIS_DEP)
143
142
# rule which is only relevant when compiling Synthesis in subdirectory
185
185
syncevo_dbus_server_SOURCES = \
186
NotificationBackendBase.h \
187
NotificationBackendNoop.h \
188
NotificationBackendNoop.cpp \
189
NotificationBackendLibnotify.h \
190
NotificationBackendLibnotify.cpp \
191
NotificationBackendMLite.h \
192
NotificationBackendMLite.cpp \
193
NotificationManager.h \
194
NotificationManagerBase.h \
195
NotificationManagerFactory.h \
196
NotificationManagerFactory.cpp \
186
197
syncevo-dbus-server.cpp \
188
199
if ENABLE_UNIT_TESTS
189
200
nodist_syncevo_dbus_server_SOURCES = ../test/test.cpp
192
syncevo_dbus_server_LDADD = gdbus/libgdbus.la $(CORE_LDADD) $(KEYRING_LIBS) $(LIBNOTIFY_LIBS)
203
syncevo_dbus_server_LDADD = gdbus/libgdbussyncevo.la $(CORE_LDADD) $(KEYRING_LIBS) $(LIBNOTIFY_LIBS) $(MLITE_LIBS) $(KDE_KWALLET_LIBS) $(DBUS_LIBS)
193
204
syncevo_dbus_server_CPPFLAGS = -DHAVE_CONFIG_H -I$(srcdir)/gdbus $(AM_CPPFLAGS) -DSYNCEVOLUTION_LOCALEDIR=\"${SYNCEVOLUTION_LOCALEDIR}\"
194
syncevo_dbus_server_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) $(CORE_CXXFLAGS) $(GLIB_CFLAGS) $(DBUS_CFLAGS) $(LIBSOUP_CFLAGS) $(KEYRING_CFLAGS) $(LIBNOTIFY_CFLAGS)
205
syncevo_dbus_server_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) $(CORE_CXXFLAGS) $(GLIB_CFLAGS) $(DBUS_CFLAGS) $(LIBSOUP_CFLAGS) $(KEYRING_CFLAGS) $(LIBNOTIFY_CFLAGS) $(MLITE_CFLAGS) $(KDE_KWALLET_CFLAGS)
195
206
syncevo_dbus_server_LDFLAGS = $(CORE_LD_FLAGS) $(LIBSOUP_LIBS)
196
syncevo_dbus_server_DEPENDENCIES = gdbus/libgdbus.la $(EXTRA_LTLIBRARIES) $(CORE_DEP) $(SYNTHESIS_DEP)
207
syncevo_dbus_server_DEPENDENCIES = gdbus/libgdbussyncevo.la $(EXTRA_LTLIBRARIES) $(CORE_DEP) $(SYNTHESIS_DEP)
199
210
# With --disable-shared autotools links against libfunambol.a which does not
210
221
nodist_client_test_SOURCES = ../test/test.cpp
223
if ENABLE_BUTEO_TESTS
224
client_test_SOURCES += client-test-buteo.h
225
client_test_SOURCES += client-test-buteo.cpp
226
nodist_client_test_SOURCES += client-test-buteo.moc.cpp
212
229
# list of test file base files
214
# Generated files (testcases/ical20.ics.funambol.tem) are derived from
215
# the original base file ($(srcdir)/test/testcases/ical20.ics) by
216
# applying a patch ($(srcdir)/test/testcases/ical20.ics.funambol.tem.patch).
231
# Generated files (testcases/eds_event.ics.funambol.tem) are derived from
232
# the original base file ($(srcdir)/test/testcases/eds_event.ics) by
233
# applying a patch ($(srcdir)/test/testcases/eds_event.ics.funambol.tem.patch).
217
234
CLIENT_LIB_TEST_FILES = \
218
235
testcases/lcs/file1.txt \
219
236
testcases/lcs/file2.txt \
220
237
testcases/templates/clients/SyncEvolution.ini \
221
238
testcases/templates/clients/phone/nokia/S40/7210c.ini \
222
testcases/vcard21.vcf \
223
testcases/vcard30.vcf \
224
testcases/ical20.ics \
225
testcases/ical20.ics.local \
226
testcases/imemo20.ics \
227
testcases/itodo20.ics
239
testcases/google_event.ics \
240
testcases/yahoo_contact.vcf \
241
testcases/eds_contact.vcf \
242
testcases/eds_event.ics \
243
testcases/eds_event.ics.local \
244
testcases/eds_memo.ics \
245
testcases/eds_task.ics
229
247
# all patch files
230
248
TEST_FILES_PATCHES = $(wildcard $(srcdir)/../test/testcases/*.patch)
235
253
# add files created via patches
236
254
CLIENT_LIB_TEST_FILES += $(TEST_FILES_GENERATED)
238
client_test_CPPFLAGS = -DHAVE_CONFIG_H -DENABLE_INTEGRATION_TESTS -DENABLE_UNIT_TESTS $(AM_CPPFLAGS)
239
client_test_CXXFLAGS = `cppunit-config --cflags` $(SYNCEVOLUTION_CXXFLAGS) $(CORE_CXXFLAGS) $(KEYRING_CFLAGS)
240
client_test_LDFLAGS = `cppunit-config --libs` `nm syncevo/.libs/libsyncevolution.a | grep funambolAutoRegisterRegistry | sed -e 's/.* /-u /'` $(CORE_LD_FLAGS) $(KEYRING_LIBS)
241
client_test_LDADD = $(CORE_LDADD) $(SYNTHESIS_ENGINE)
256
client_test_CPPFLAGS = -DHAVE_CONFIG_H -DENABLE_INTEGRATION_TESTS -DENABLE_UNIT_TESTS $(AM_CPPFLAGS) $(BUTEOSYNCPROFILE_CFLAGS) $(BUTEOSYNCCOMMON_CFLAGS) $(QT_CPPFLAGS)
257
client_test_CXXFLAGS = `cppunit-config --cflags` $(SYNCEVOLUTION_CXXFLAGS) $(CORE_CXXFLAGS) $(KEYRING_CFLAGS) $(BUTEOSYNCPROFILE_CFLAGS) $(BUTEOSYNCCOMMON_CFLAGS) $(filter-out -O2 -g -W -Wall, $(QT_CXXFLAGS))
258
client_test_LDFLAGS = `cppunit-config --libs` `nm syncevo/.libs/libsyncevolution.a | grep funambolAutoRegisterRegistry | sed -e 's/.* /-Wl,-u/'` $(CORE_LD_FLAGS) $(KEYRING_LIBS) $(BUTEOSYNCPROFILE_LIBS) $(BUTEOSYNCCOMMON_LIBS) $(QT_LDFLAGS)
259
client_test_LDADD = $(CORE_LDADD) $(SYNTHESIS_ENGINE) $(BUTEOSYNCPROFILE_LIBS) $(BUTEOSYNCCOMMON_LIBS) $(QT_LIBS)
242
260
# These dependencies are intentionally a bit too broad:
243
261
# they ensure that all files are in place to *run* client-test.
245
263
# rule to generate patched files from patches:
246
264
# make cannot compute the dependencies completely, so run the commands
247
265
# on each make invocation and do the time stamp test ourselves
267
# If we create the patched file anew, then set its time to the more
268
# recent of the two input files. That way it won't be re-generated
269
# (because it is not older), and it won't be used to refresh the patch
270
# either in testcase2patch (because it is not newer either).
271
# That is useful on platforms where diff produces different results
272
# than the one in the source (possible because the "find shortest
273
# patch" problem may have multiple solutions).
248
274
.PHONY: $(TEST_FILES_GENERATED)
249
275
$(TEST_FILES_GENERATED):
250
276
@ mkdir -p testcases
251
@ echo "checking whether server specific test cases $@ are up-to-date"
277
@ echo "checking whether server specific test case $@ is up-to-date"
253
279
patchfile=$(srcdir)/../test/$@.patch; \
254
280
basefile=$(srcdir)/../test/$(basename $(basename $@)); \
255
[ ! $@ -ot $$patchfile ] && [ ! $@ -ot $$basefile ] || \
256
(echo '*** foo'; echo '--- bar'; cat $$patchfile) | patch -o $@ $$basefile
281
( [ -e $@ ] && [ ! $@ -ot $$patchfile ] && [ ! $@ -ot $$basefile ] && echo " $@ up-to-date" ) || \
282
( [ ! -s $$patchfile ] && echo " copy $$basefile to $@ because patch file is empty" && cp $$basefile $@ ) || \
283
( echo " generating $@ by applying $$patchfile to $$basefile" && \
284
(echo '*** foo'; echo '--- bar'; cat $$patchfile) | patch -s -o $@ $$basefile && \
285
( if [ $$basefile -ot $$patchfile ]; then \
286
touch -r $$patchfile $@; else \
287
touch -r $$basefile $@; fi ) \
258
291
# rule to regenerate patches:
259
292
# like generating the patched files, this is run every time.
267
300
.PHONY: testcase2patch
268
301
testcase2patch: $(TEST_FILES_GENERATED)
269
302
@ echo "checking whether test case patch files are up-to-date"
271
304
for i in testcases/*.tem; do \
272
305
patchfile=$(srcdir)/../test/$$i.patch; \
273
306
basefile=$(srcdir)/../test/`echo $$i | cut -d . -f -2`; \
274
307
if [ $$patchfile -ot $$i ] || [ $$patchfile -ot $$basefile ]; then \
275
308
diff -u $$basefile $$i | tail -n +3 > $$patchfile || true; \
276
309
touch -r $$i $$patchfile; \
277
echo "updated $$patchfile"; \
310
echo " updated $$patchfile"; \
312
echo " $$patchfile up-to-date"; \
288
323
# runs the binary with out-dated auxiliary files.
289
324
client_test_DEPENDENCIES = $(EXTRA_LTLIBRARIES) $(CORE_DEP) $(CLIENT_LIB_TEST_FILES) testcase2patch synccompare templates
326
CLEANFILES += client-test-buteo.moc.cpp
291
328
# copy template directory into current working directory, if not there
293
330
.PHONY: templates
295
332
if test "$(srcdir)/templates" != "./templates"; then \
296
333
rm -rf ./templates; \
297
cp -r "$(srcdir)/templates" .; \
334
ln -s "$(srcdir)/templates" .; \
300
337
# distribute test system?
327
364
# special target for testing with valgrind
329
valgrind --leak-check=yes --suppressions=valgrind.supp ./test
366
valgrind --leak-check=yes --suppressions=valgrind.supp ./client-test
331
# Because backend-related variables need to be substituted in
332
# Makefile-gen.am we need an explicit rule to redo that work
333
# so that "make" rebuilds derived files correctly.
334
$(srcdir)/Makefile.am: Makefile-gen.am
335
sed -e 's;[@]BACKEND_REGISTRIES[@];$(BACKEND_REGISTRIES);' \
336
-e 's;[@]BACKENDS[@];$(BACKENDS);' \
337
-e 's;[@]TEMPLATE_FILES[@];$(TEMPLATE_FILES);' \
368
# Same solution for rebuilding as in top-level Makefile, see there
369
# for further comments.
370
$(srcdir)/Makefile.am: check-autotools
372
.PHONY: check-autotools
374
@ cd $(top_srcdir) && ( [ ! -e .git ] || ./gen-autotools.sh )
340
376
# old-style name for test program(s)