Makefile.am revision 2ce0021487fbd7ef3384f3456fa4a176309c4ebf
noinst_LTLIBRARIES = libdict_backend.la
module_dictdir = $(moduledir)/dict
dict_drivers = @dict_drivers@
AM_CPPFLAGS = \
-I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib-test \
-I$(top_srcdir)/src/lib-dict \
-I$(top_srcdir)/src/lib-ldap \
-I$(top_srcdir)/src/lib-sql \
-I$(top_srcdir)/src/lib-settings \
$(SQL_CFLAGS)
NOPLUGIN_LDFLAGS =
libdict_backend_la_SOURCES = \
nodist_libdict_backend_la_SOURCES = \
noinst_HEADERS = \
if HAVE_LDAP
LIBDICT_LDAP = libdict_ldap.la
libdict_ldap_la_DEPENDENCIES = $(LIBDOVECOT_LDAP) $(LIBDOVECOT_DEPS)
libdict_ldap_la_LDFLAGS = -module -avoid-version
libdict_ldap_la_LIBADD = $(LIBDOVECOT_LDAP) $(LIBDOVECOT)
module_dict_LTLIBRARIES = \
$(LIBDICT_LDAP)
libdict_ldap_la_SOURCES = \
endif
EXTRA_DIST = dict.conf
dict-drivers-register.c: Makefile $(top_builddir)/config.h
rm -f $@
echo '/* this file automatically generated by Makefile */' >$@
echo '#include "lib.h"' >>$@
echo '#include "dict.h"' >>$@
echo '#include "dict-sql.h"' >>$@
for i in $(dict_drivers) null; do \
if [ "$${i}" != "null" ]; then \
echo "extern struct dict dict_driver_$${i};" >>$@ ; \
fi; \
done
echo 'void dict_drivers_register_all(void) {' >>$@
echo 'dict_drivers_register_builtin();' >>$@
echo 'dict_sql_register();' >>$@
for i in $(dict_drivers) null; do \
if [ "$${i}" != "null" ]; then \
echo "dict_driver_register(&dict_driver_$${i});" >>$@ ; \
fi; \
done
echo '}' >>$@
echo 'void dict_drivers_unregister_all(void) {' >>$@
echo 'dict_drivers_unregister_builtin();' >>$@
echo 'dict_sql_unregister();' >>$@
for i in $(dict_drivers) null; do \
if [ "$${i}" != "null" ]; then \
echo "dict_driver_unregister(&dict_driver_$${i});" >>$@ ; \
fi; \
done
echo '}' >>$@
distclean-generic:
rm -f Makefile dict-drivers-register.c
test_programs = \
test-dict-sql
noinst_PROGRAMS = $(test_programs)
test_libs = \
test_dict_sql_CFLAGS = $(AM_CPPFLAGS) -DDICT_SRC_DIR=\"$(top_srcdir)/src/lib-dict-backend\"
test_dict_sql_SOURCES = \
test_dict_sql_LDADD = \
$(noinst_LTLIBRARIES) \
$(test_libs)
test_dict_sql_DEPENDENCIES = \
$(noinst_LTLIBRARIES) \
$(test_libs)
check: check-am check-test
check-test: all-am
for bin in $(test_programs) $(check_PROGRAMS); do \
if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \
done