Makefile.am revision f49f1c5fa6a9a55a194e5ada042df134907278f4
4909421ac41e143fe07a235c0d11e9f0452d716bTimo Sirainendoveadm_moduledir = $(moduledir)/doveadm
1969b443ad2e82f002cad570e1955f1a30146c17Timo Sirainenpkglibexecdir = $(libexecdir)/dovecot
4909421ac41e143fe07a235c0d11e9f0452d716bTimo Sirainen
885a3c2287ae3e5827aa580ea06b231de38abb47Timo SirainenSUBDIRS = dsync
885a3c2287ae3e5827aa580ea06b231de38abb47Timo Sirainen
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainenbin_PROGRAMS = doveadm
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainenpkglibexec_PROGRAMS = doveadm-server
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo SirainenAM_CPPFLAGS = \
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen -I$(top_srcdir)/src/lib \
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuomi -I$(top_srcdir)/src/lib-test \
4909421ac41e143fe07a235c0d11e9f0452d716bTimo Sirainen -I$(top_srcdir)/src/lib-settings \
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen -I$(top_srcdir)/src/lib-auth \
4605cab1123700c52c515a433a2802fcbc827c62Timo Sirainen -I$(top_srcdir)/src/lib-compression \
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen -I$(top_srcdir)/src/lib-dict \
75d9024d9409f4710e51dbe40ffb338a84bb1446Timo Sirainen -I$(top_srcdir)/src/lib-fs \
1172b608624245a5b05ca299d3279e34003ed308Timo Sirainen -I$(top_srcdir)/src/lib-ssl-iostream \
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen -I$(top_srcdir)/src/lib-master \
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen -I$(top_srcdir)/src/lib-mail \
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen -I$(top_srcdir)/src/lib-imap \
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen -I$(top_srcdir)/src/lib-index \
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen -I$(top_srcdir)/src/lib-storage \
f24b245f49b030d7dba3bcb2463cbc05b98c9d1dTimo Sirainen -I$(top_srcdir)/src/lib-imap-storage \
1e11a94ec50fc9b57eb2c859771c6a326ccaf86fAki Tuomi -I$(top_srcdir)/src/lib-http \
ceee39b0d2f8f5705b05cccb010c764e9771a9bcMartti Rannanjärvi -I$(top_srcdir)/src/lib-dcrypt \
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen -I$(top_srcdir)/src/auth \
4909421ac41e143fe07a235c0d11e9f0452d716bTimo Sirainen -DMODULEDIR=\""$(moduledir)"\" \
127d0716d4aa14890e0462ff84020b5655812981Alin Dobre -DAUTH_MODULE_DIR=\""$(moduledir)/auth"\" \
4909421ac41e143fe07a235c0d11e9f0452d716bTimo Sirainen -DDOVEADM_MODULEDIR=\""$(doveadm_moduledir)"\" \
28b8434ca4cba2e310d13ffc55e895d658725f43Timo Sirainen -DPKG_RUNDIR=\""$(rundir)"\" \
680e885bc8e13032e09d7fa0e12297a5e7cbf20cTimo Sirainen -DPKG_STATEDIR=\""$(statedir)"\" \
f2a1955d993f67982bc40ad7bbae9a036dabfd64Timo Sirainen -DPKG_LIBEXECDIR=\""$(pkglibexecdir)"\" \
a3a55999bcfe2e57941cb64343f4ea80beabdab7Timo Sirainen -DBINDIR=\""$(bindir)"\" \
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi -DMANDIR=\""$(mandir)"\" \
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi $(BINARY_CFLAGS)
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen
acc039dfc0b0f4588cf2feec04727b61e1c672a1Timo Sirainencmd_pw_libs = \
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi ../auth/libpassword.la \
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi ../lib-ntlm/libntlm.la \
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi ../lib-otp/libotp.la
acc039dfc0b0f4588cf2feec04727b61e1c672a1Timo Sirainen
4909421ac41e143fe07a235c0d11e9f0452d716bTimo Sirainenlibs = \
54f559f2e69ea1498e3ccfa7b65d16d9a622c391Timo Sirainen dsync/libdsync.la \
4605cab1123700c52c515a433a2802fcbc827c62Timo Sirainen ../lib-compression/libcompression.la
4909421ac41e143fe07a235c0d11e9f0452d716bTimo Sirainen
4909421ac41e143fe07a235c0d11e9f0452d716bTimo Sirainendoveadm_LDADD = \
e906c4983fcf3f02942c5f15d5ce5222b8d63c3cTimo Sirainen $(libs) \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen $(cmd_pw_libs) \
c405ed31f466424322d8d5c273055a6e8f729788Timo Sirainen $(CRYPT_LIBS) \
b71ec9499d47c92e5fd08683106c01e9face17ebTimo Sirainen $(LIBDOVECOT_STORAGE) \
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi $(LIBDOVECOT) \
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi $(BINARY_LDFLAGS)
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi
acc039dfc0b0f4588cf2feec04727b61e1c672a1Timo Sirainendoveadm_DEPENDENCIES = \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen $(libs) \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen $(cmd_pw_libs) \
b71ec9499d47c92e5fd08683106c01e9face17ebTimo Sirainen $(LIBDOVECOT_STORAGE_DEPS) \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen $(LIBDOVECOT_DEPS)
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainendoveadm_server_LDADD = \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen $(libs) \
b71ec9499d47c92e5fd08683106c01e9face17ebTimo Sirainen $(LIBDOVECOT_STORAGE) \
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi $(LIBDOVECOT) \
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi $(BINARY_LDFLAGS)
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainendoveadm_server_DEPENDENCIES = \
4909421ac41e143fe07a235c0d11e9f0452d716bTimo Sirainen $(libs) \
b71ec9499d47c92e5fd08683106c01e9face17ebTimo Sirainen $(LIBDOVECOT_STORAGE_DEPS) \
ca44a6ba994aaa3231a20ef6e046dfd97a8dcd2dTimo Sirainen $(LIBDOVECOT_DEPS)
acc039dfc0b0f4588cf2feec04727b61e1c672a1Timo Sirainen
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainendoveadm_common_cmds = \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen doveadm-auth.c \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen doveadm-dict.c \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen doveadm-director.c \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen doveadm-fs.c \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen doveadm-instance.c \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen doveadm-kick.c \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen doveadm-log.c \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen doveadm-master.c \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen doveadm-mutf7.c \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen doveadm-penalty.c \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen doveadm-proxy.c \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen doveadm-replicator.c \
53309922d2ec3321e011966e8f2b210821ecd5e3Timo Sirainen doveadm-service.c \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen doveadm-sis.c \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen doveadm-stats.c \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen doveadm-who.c
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainendoveadm_common_mail_cmds = \
54f559f2e69ea1498e3ccfa7b65d16d9a622c391Timo Sirainen doveadm-dsync.c \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen doveadm-mail.c \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen doveadm-mail-altmove.c \
5685e60e62a8e0d368bd28a1526056f97bbba022Timo Sirainen doveadm-mail-batch.c \
138495d02aa177230a9f1eaf90b720b4ce0f6544Timo Sirainen doveadm-mail-deduplicate.c \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen doveadm-mail-expunge.c \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen doveadm-mail-fetch.c \
6eb7938cd366fc087b39fc9a901e7de426131384Timo Sirainen doveadm-mail-flags.c \
88c816e8be4e1a29bca8b67d67a92c67a33f3795Timo Sirainen doveadm-mail-import.c \
643a81fff9003cba13deb49a565a3c8171da524dTimo Sirainen doveadm-mail-index.c \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen doveadm-mail-iter.c \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen doveadm-mail-mailbox.c \
2c57ebc900742bd1119ef011b77b4910c4660cfaTimo Sirainen doveadm-mail-mailbox-metadata.c \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen doveadm-mail-mailbox-status.c \
01cb2914161db669195d3f611f13b9255aeb4c65Timo Sirainen doveadm-mail-copymove.c \
5fbccc935e3f7b916aa7c6e302a212821072e83aTimo Sirainen doveadm-mailbox-list-iter.c \
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen doveadm-mail-save.c \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen doveadm-mail-search.c \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen doveadm-mail-server.c
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen
c6be98b5270900746f35ebe28bd636019976e29eTimo Sirainen# these aren't actually useful in doveadm-server, but plugins may implement
c6be98b5270900746f35ebe28bd636019976e29eTimo Sirainen# both dumping and some other commands inside a single plugin. not having the
c6be98b5270900746f35ebe28bd636019976e29eTimo Sirainen# dump functions in doveadm-server fails to load such plugins.
c6be98b5270900746f35ebe28bd636019976e29eTimo Sirainendoveadm_common_dump_cmds = \
c6be98b5270900746f35ebe28bd636019976e29eTimo Sirainen doveadm-dump.c \
c6be98b5270900746f35ebe28bd636019976e29eTimo Sirainen doveadm-dump-dbox.c \
c6be98b5270900746f35ebe28bd636019976e29eTimo Sirainen doveadm-dump-index.c \
c6be98b5270900746f35ebe28bd636019976e29eTimo Sirainen doveadm-dump-log.c \
c6be98b5270900746f35ebe28bd636019976e29eTimo Sirainen doveadm-dump-mailboxlog.c \
c6be98b5270900746f35ebe28bd636019976e29eTimo Sirainen doveadm-dump-thread.c \
ceee39b0d2f8f5705b05cccb010c764e9771a9bcMartti Rannanjärvi doveadm-dump-dcrypt-file.c \
35de0999ddf1b445ac56c19b72be6e0053049eaaMartti Rannanjärvi doveadm-dump-dcrypt-key.c \
c6be98b5270900746f35ebe28bd636019976e29eTimo Sirainen doveadm-zlib.c
c6be98b5270900746f35ebe28bd636019976e29eTimo Sirainen
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainencommon = \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen $(doveadm_common_cmds) \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen $(doveadm_common_mail_cmds) \
c6be98b5270900746f35ebe28bd636019976e29eTimo Sirainen $(doveadm_common_dump_cmds) \
45ead232666a47819e89dc71dec57767340d0b62Timo Sirainen doveadm-cmd.c \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen doveadm-print.c \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen doveadm-settings.c \
67cc1d2d8495c3effad6f639cd8468d0ac7ff198Timo Sirainen doveadm-util.c \
21e4a561c2983f7ff02c0503c9bad8e4f45cee8aAki Tuomi server-connection.c \
21e4a561c2983f7ff02c0503c9bad8e4f45cee8aAki Tuomi doveadm-print-formatted.c
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainendoveadm_SOURCES = \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen $(common) \
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen doveadm.c \
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen doveadm-print-flow.c \
528bfe84f996046645103de898564ef5bcb5edadTimo Sirainen doveadm-print-pager.c \
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen doveadm-print-tab.c \
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen doveadm-print-table.c \
3cd674e541f2f930d2ae5dbdc6fe2f4d29d8dc04Aki Tuomi doveadm-print-json.c \
c6be98b5270900746f35ebe28bd636019976e29eTimo Sirainen doveadm-pw.c
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainendoveadm_server_SOURCES = \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen $(common) \
a13b1245bee0b6524b4aeb3c8fd9e34af648b746Aki Tuomi doveadm-auth-server.c \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen client-connection.c \
1e11a94ec50fc9b57eb2c859771c6a326ccaf86fAki Tuomi client-connection-http.c \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen doveadm-print-server.c \
3cd674e541f2f930d2ae5dbdc6fe2f4d29d8dc04Aki Tuomi doveadm-print-json.c \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen main.c
a6ab8f00351265e35b79f3a22b1f5a4978ae5c35Timo Sirainen
0169161bcdc9f186441036ad1c69ed7316ee4544Timo Sirainenpkginc_libdir = $(pkgincludedir)
0169161bcdc9f186441036ad1c69ed7316ee4544Timo Sirainenpkginc_lib_HEADERS = \
aaa76b1c83e285f84c5ca41e67df022076ec609fTimo Sirainen doveadm.h \
55accf49e32ff93bfdd92961cb54ccc8c329147cTimo Sirainen doveadm-cmd.h \
54f559f2e69ea1498e3ccfa7b65d16d9a622c391Timo Sirainen doveadm-dsync.h \
c664d0da658c8d3200d88ea3c4cd580afd33fa73Timo Sirainen doveadm-dump.h \
4909421ac41e143fe07a235c0d11e9f0452d716bTimo Sirainen doveadm-mail.h \
f23baa3b53b1dd4eb19729e99a43937fa3c7f309Timo Sirainen doveadm-mail-iter.h \
5fbccc935e3f7b916aa7c6e302a212821072e83aTimo Sirainen doveadm-mailbox-list-iter.h \
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen doveadm-print.h \
7ed711d973b319320da100d3e905ef7b99ed69d6Timo Sirainen doveadm-print-private.h \
cf1b789e26b5af1fa36383754f6873329b2a8f68Timo Sirainen doveadm-settings.h \
0169161bcdc9f186441036ad1c69ed7316ee4544Timo Sirainen doveadm-util.h
0169161bcdc9f186441036ad1c69ed7316ee4544Timo Sirainen
0169161bcdc9f186441036ad1c69ed7316ee4544Timo Sirainennoinst_HEADERS = \
0169161bcdc9f186441036ad1c69ed7316ee4544Timo Sirainen client-connection.h \
d09af096786a0c241d5666c842278e25f5171c67Timo Sirainen client-connection-private.h \
0169161bcdc9f186441036ad1c69ed7316ee4544Timo Sirainen server-connection.h \
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen doveadm-server.h \
381daab1e3b56a0bc94d2191cf62beba0df51af9Pascal Volk doveadm-who.h
885a3c2287ae3e5827aa580ea06b231de38abb47Timo Sirainen
885a3c2287ae3e5827aa580ea06b231de38abb47Timo Siraineninstall-exec-local:
885a3c2287ae3e5827aa580ea06b231de38abb47Timo Sirainen rm -f $(DESTDIR)$(bindir)/dsync
885a3c2287ae3e5827aa580ea06b231de38abb47Timo Sirainen $(LN_S) doveadm $(DESTDIR)$(bindir)/dsync
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuomi
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuomitest_programs = \
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuomi test-doveadm-util
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuominoinst_PROGRAMS = $(test_programs)
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuomi
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuomitest_libs = \
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuomi ../lib-test/libtest.la \
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuomi ../lib/liblib.la
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuomitest_deps = $(noinst_LTLIBRARIES) $(test_libs)
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuomi
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomitest_doveadm_util_SOURCES = doveadm-util.c test-doveadm-util.c
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomitest_doveadm_util_LDADD = $(test_libs) $(MODULE_LIBS)
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuomitest_doveadm_util_DEPENDENCIES = $(test_deps)
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuomi
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuomicheck: check-am check-test
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuomicheck-test: all-am
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuomi for bin in $(test_programs); do \
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuomi if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \
35a2af0c24277e9b9d935271abc3b709fa856d3eAki Tuomi done