~ubuntu-branches/ubuntu/trusty/syncevolution/trusty-proposed

« back to all changes in this revision

Viewing changes to src/Makefile-gen.am

  • Committer: Bazaar Package Importer
  • Author(s): Tino Keitel
  • Date: 2011-07-20 16:02:02 UTC
  • mfrom: (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110720160202-e8uf7ogw4vh0q0f3
Tags: 1.1.99.5a-1
* New upstream version 1.1.99.5a, first release candiate for 1.2
* Added python-openssl dependency, the HTTP server needs it for HTTPS support
* Added versioned dependency on libsynthesis0 to get required features
* Fixed .orig.tar.gz generation in get-orig-source target
* Added myself to Uploaders:, thanks to David for sponsoring
* Use updated upstream tag for source package generation
* Removed 0001-Replace-with-in-call-to-PKG_CHECK_MODULES.patch, fixed upstream
* Renamed NEWS.Debian to NEWS so that it is actually used
* Updated NEWS for 1.1.99.5a

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
include $(top_srcdir)/m4-repo/autotroll.mk
 
2
 
1
3
BACKENDS = @BACKENDS@
2
4
 
3
5
# start with building nothing and add more targets below
10
12
libexec_PROGRAMS =
11
13
libexec_SCRIPTS =
12
14
nobase_dist_template_DATA =
13
 
DISTCLEANFILES =
14
15
CLEANFILES =
15
16
BUILT_SOURCES =
16
17
 
33
34
else
34
35
SUBDIRS += $(SYNTHESIS_SUBDIR_INCLUDES)
35
36
endif
 
37
SUBDIRS += dbus
36
38
if COND_GUI
37
 
SUBDIRS += dbus gtk-ui
 
39
SUBDIRS += gtk-ui
38
40
else
39
 
if COND_DOC
40
 
SUBDIRS += dbus
41
 
endif
42
41
endif
43
42
 
44
43
DIST_SUBDIRS = gdbus dbus syncevo $(BACKENDS) gtk-ui gnome-bluetooth synthesis-includes
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
118
117
 
119
118
# put link to static c++ library into current directory, needed if compiling with --enable-static-c++
120
119
libstdc++.a :
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)
136
135
if COND_DBUS
137
 
syncevolution_LDADD += gdbus/libgdbus.la
 
136
syncevolution_LDADD += gdbus/libgdbussyncevo.la
138
137
endif
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)
142
141
 
143
142
# rule which is only relevant when compiling Synthesis in subdirectory
172
171
 
173
172
clean-local: testclean
174
173
        rm -rf testcases
 
174
        [ ! -L templates ] || rm templates
175
175
 
176
176
# files created during testing
177
177
testclean:
183
183
 
184
184
if COND_DBUS
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 \
187
198
        $(CORE_SOURCES)
188
199
if ENABLE_UNIT_TESTS
189
200
nodist_syncevo_dbus_server_SOURCES = ../test/test.cpp
190
201
endif
191
202
 
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)
197
208
endif
198
209
 
199
210
# With --disable-shared autotools links against libfunambol.a which does not
209
220
        $(CORE_SOURCES)
210
221
nodist_client_test_SOURCES = ../test/test.cpp
211
222
 
 
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
 
227
endif
 
228
 
212
229
# list of test file base files
213
230
#
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
228
246
 
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)
237
255
 
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.
244
262
 
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
 
266
#
 
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"
252
 
        set -e; \
 
277
        @ echo "checking whether server specific test case $@ is up-to-date"
 
278
        @ set -e; \
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 ) \
 
288
        )
 
289
 
257
290
 
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"
270
 
        set -e; \
 
303
        @ set -e; \
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"; \
 
311
                else \
 
312
                        echo "   $$patchfile up-to-date"; \
278
313
                fi; \
279
314
        done
280
315
 
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
290
325
 
 
326
CLEANFILES += client-test-buteo.moc.cpp
 
327
 
291
328
# copy template directory into current working directory, if not there
292
329
# yet
293
330
.PHONY: templates
294
331
templates:
295
332
        if test "$(srcdir)/templates" != "./templates"; then \
296
333
                rm -rf ./templates; \
297
 
                cp -r "$(srcdir)/templates" .; \
 
334
                ln -s "$(srcdir)/templates" .; \
298
335
        fi
299
336
 
300
337
# distribute test system?
326
363
 
327
364
# special target for testing with valgrind
328
365
valgrind : test
329
 
        valgrind --leak-check=yes --suppressions=valgrind.supp ./test
 
366
        valgrind --leak-check=yes --suppressions=valgrind.supp ./client-test
330
367
 
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);' \
338
 
            $< >$@
 
368
# Same solution for rebuilding as in top-level Makefile, see there
 
369
# for further comments.
 
370
$(srcdir)/Makefile.am: check-autotools
 
371
        @ true
 
372
.PHONY: check-autotools
 
373
check-autotools:
 
374
        @ cd $(top_srcdir) && ( [ ! -e .git ] || ./gen-autotools.sh )
339
375
 
340
376
# old-style name for test program(s)
341
377
.PHONY: test