syncevolution/build/gen-backends-am.sh

39 lines
852 B
Bash
Raw Normal View History

#!/bin/sh
amfile='src/backends/backends.am'
tmpfile="$amfile.$$"
rm -f "$tmpfile"
touch "$tmpfile"
BACKENDS="`echo src/backends/*/configure-sub.in | sed -e 's%/configure-sub\.in%%g' | sort`"
BACKEND_REGISTRIES="`echo src/backends/*/*Register.cpp | sort`"
tf()
{
echo "$1" >>"$tmpfile"
}
autotools: ensure that link lines are complete As mentioned by Tino Keitel on the mailing list, some libs and executables were only implicitly linked against libraries that they called directly. This happened to work by chance because these libraries ended up in the running executable anyway, due to indirect loading. To catch such problems, the "make installcheck" was extended: dpkg-shlibdeps is run, if available, and the error output is scanned for the messages which indicate that a symbol is used without linking to the right library (example output below). Had to fix quite a few _LIBADD lines to pass the test. Some exceptions are allowed: - libsmltk depends on the caller providing SySync logging support. - libneon is intentionally not linked explicitly for syncevolution.org binaries, to make resulting binaries work with GNUTLS and OpenSSL. dpkg-shlibdeps: warning: debian/syncevolution-libs/usr/lib/syncevolution/backends/syncdav.so contains an unresolvable reference to symbol icalparameter_new_from_value_string: it's probably a plugin. dpkg-shlibdeps: warning: 51 other similar warnings have been skipped (use -v to see them all). ... dpkg-shlibdeps: warning: symbol dlsym used by debian/libsyncevolution0/usr/lib/libsyncevolution.so.0.0.0 found in none of the libraries. dpkg-shlibdeps: warning: symbol dlerror used by debian/libsyncevolution0/usr/lib/libsyncevolution.so.0.0.0 found in none of the libraries. dpkg-shlibdeps: warning: symbol dlopen used by debian/libsyncevolution0/usr/lib/libsyncevolution.so.0.0.0 found in none of the libraries.
2012-07-12 17:59:33 +02:00
# tf '# This is a stupid workaround for an absolute path in SYNCEVOLUTION_LIBS.'
# tf '# See AUTOTOOLS-TODO for details.'
# tf '@SYNCEVOLUTION_LIBS@: src/syncevo/libsyncevolution.la ; @true'
# tf ''
tf "BACKENDS = $BACKENDS"
tf ''
tf "BACKEND_REGISTRIES = $BACKEND_REGISTRIES"
tf ''
tf '# backend includes'
for backend in $BACKENDS
do
name=`echo "$backend" | sed -e 's%src/backends/%%'`
tf "include \$(top_srcdir)/$backend/$name.am"
done
if test ! -f "$amfile" || ! cmp -s "$amfile" "$tmpfile"
then
mv "$tmpfile" "$amfile"
else
rm -f "$tmpfile"
fi