9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainendoveadm_moduledir = $(moduledir)/doveadm
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen
53febe02364e20b2b95594ca8e7906a37973be01Timo Sirainenpkglibexecdir = $(libexecdir)/dovecot
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainenpkglibexec_PROGRAMS = quota-status
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo SirainenAM_CPPFLAGS = \
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen -I$(top_srcdir)/src/lib \
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen -I$(top_srcdir)/src/lib-test \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen -I$(top_srcdir)/src/lib-master \
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen -I$(top_srcdir)/src/lib-dict \
677e22747b82bf15b339e31d1d0106d62bf806daTimo Sirainen -I$(top_srcdir)/src/lib-index \
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen -I$(top_srcdir)/src/lib-mail \
52f6112882fb2a4b7b921fc45640f4a9d748bae7Stephan Bosch -I$(top_srcdir)/src/lib-smtp \
654c60f1741fd195878d74a30df90bf130649d64Timo Sirainen -I$(top_srcdir)/src/lib-imap \
654c60f1741fd195878d74a30df90bf130649d64Timo Sirainen -I$(top_srcdir)/src/lib-imap-client \
7f4fa37676bac8efcf4e2ac706172b1bad779a8aMartti Rannanjärvi -I$(top_srcdir)/src/lib-settings \
677e22747b82bf15b339e31d1d0106d62bf806daTimo Sirainen -I$(top_srcdir)/src/lib-storage \
677e22747b82bf15b339e31d1d0106d62bf806daTimo Sirainen -I$(top_srcdir)/src/lib-storage/index \
654c60f1741fd195878d74a30df90bf130649d64Timo Sirainen -I$(top_srcdir)/src/lib-storage/index/imapc \
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen -I$(top_srcdir)/src/lib-storage/index/maildir \
fa3fc0b4c821874ccc56a1512604f661b411d3a4Aki Tuomi -I$(top_srcdir)/src/lib-program-client \
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen -I$(top_srcdir)/src/doveadm
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen
a966016e605eea27e02d73ff1412632cd684d770Timo SirainenNOPLUGIN_LDFLAGS =
bc10373fc050eb9dd23f6ed5ee8207d0e4d142eeTimo Sirainenlib10_doveadm_quota_plugin_la_LDFLAGS = -module -avoid-version
9d1526ac8bcec9aff3c3a32f092ee2f3da2760b7Timo Sirainenlib10_quota_plugin_la_LDFLAGS = -module -avoid-version
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainenmodule_LTLIBRARIES = \
9d1526ac8bcec9aff3c3a32f092ee2f3da2760b7Timo Sirainen lib10_quota_plugin.la
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen
23ad3970cd22adb6c875caf95fa791548849f0d1Timo Sirainenquota_dist_sources = \
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen quota.c \
62300a38f91227b9de043a9a8ec1d4f1978e1138Timo Sirainen quota-count.c \
a35cbba04d0a2823da98e693bd09a051addffdb2Timo Sirainen quota-fs.c \
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen quota-dict.c \
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen quota-dirsize.c \
654c60f1741fd195878d74a30df90bf130649d64Timo Sirainen quota-imapc.c \
cb951d3282610a9a0960230865bc5f3e3347b203Timo Sirainen quota-maildir.c \
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen quota-plugin.c \
b863b7e3fccf75f90f613b875f02fd1781e14e5eTimo Sirainen quota-storage.c \
b863b7e3fccf75f90f613b875f02fd1781e14e5eTimo Sirainen quota-util.c
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainenquota_common_objects = \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen quota.lo \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen quota-count.lo \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen quota-fs.lo \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen quota-dict.lo \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen quota-dirsize.lo \
654c60f1741fd195878d74a30df90bf130649d64Timo Sirainen quota-imapc.lo \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen quota-maildir.lo \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen quota-plugin.lo \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen quota-storage.lo \
b863b7e3fccf75f90f613b875f02fd1781e14e5eTimo Sirainen quota-util.lo \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen $(RQUOTA_XDR_LO)
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen
e1b13a5c1507c2583fc6bd07e690037be8a802a7Timo Sirainenlib10_quota_plugin_la_SOURCES = $(quota_dist_sources)
e1b13a5c1507c2583fc6bd07e690037be8a802a7Timo Sirainennodist_lib10_quota_plugin_la_SOURCES = $(RQUOTA_XDR)
26ada766cfff6ebfb91d100936118cf8aa51e3aeTimo Sirainenlib10_quota_plugin_la_LIBADD = $(QUOTA_LIBS)
f4526ec0e620af27bc027955f7a56cfe187c212fTimo Sirainen
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainendoveadm_module_LTLIBRARIES = \
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen lib10_doveadm_quota_plugin.la
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainenlib10_doveadm_quota_plugin_la_SOURCES = \
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen doveadm-quota.c
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainenquota_status_SOURCES = \
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi quota-status.c \
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi quota-status-settings.c
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomiquota_status_CPPFLAGS = $(AM_CPPFLAGS) $(BINARY_CFLAGS)
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainenquota_status_LDADD = \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen $(quota_common_objects) \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen $(LIBDOVECOT_STORAGE) \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen $(LIBDOVECOT) \
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi $(QUOTA_LIBS) \
b200bc3875fa06d42c8619865cc306c3297fcaccAki Tuomi $(BINARY_LDFLAGS)
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainenquota_status_DEPENDENCIES = \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen $(quota_common_objects) \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen $(LIBDOVECOT_STORAGE_DEPS) \
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen $(LIBDOVECOT_DEPS)
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo Sirainen
23ad3970cd22adb6c875caf95fa791548849f0d1Timo Sirainenif HAVE_RQUOTA
23ad3970cd22adb6c875caf95fa791548849f0d1Timo SirainenRQUOTA_XDR = rquota_xdr.c
c0699d9e0842a53c047fcbd695fa93ce435baa8fTimo SirainenRQUOTA_XDR_LO = rquota_xdr.lo
4c7caf83adc56d54e2ecec0a803f5ca9b6d0498dTimo Sirainen#RQUOTA_X = /usr/include/rpcsvc/rquota.x
667f09546abd3d3636b277fec9dba8622cb3d644Timo SirainenRQUOTA_X = $(srcdir)/rquota.x
06d1238dd2a6b87af5ad1fad53d7b9b74ad93bfaTimo Sirainenrquota_xdr.c: Makefile rquota.h
acbd82bd456316a32f61df67fc41bbff681119c7Timo Sirainen if [ "$(top_srcdir)" != "$(top_builddir)" ]; then \
acbd82bd456316a32f61df67fc41bbff681119c7Timo Sirainen cp $(RQUOTA_X) $(top_builddir)/src/plugins/quota/; \
9fd7e883292dab58f3c209f0ec6a8cd11e52075cTimo Sirainen fi; \
d0cc826dab58ed8e30e1ccd7cb6ad2f44b391a00Timo Sirainen (echo '#include "lib.h"'; \
f0339f522dc9c8e2e8a29ef9a3f937c431c6bd1bTimo Sirainen echo '#undef FALSE'; \
f0339f522dc9c8e2e8a29ef9a3f937c431c6bd1bTimo Sirainen echo '#undef TRUE'; \
d0cc826dab58ed8e30e1ccd7cb6ad2f44b391a00Timo Sirainen echo '#include <rpc/rpc.h>'; \
acbd82bd456316a32f61df67fc41bbff681119c7Timo Sirainen $(RPCGEN) -c $(top_builddir)/src/plugins/quota/rquota.x | \
fba3d682d6bad6a9530b254d6fd07dc5577be7feTimo Sirainen sed -e 's/IXDR_PUT/(void)IXDR_PUT/g' \
23bdbb7b1831785c6ba6df190f6369da882d2b9dTimo Sirainen -e 's,!xdr_,0 == xdr_,' \
d0cc826dab58ed8e30e1ccd7cb6ad2f44b391a00Timo Sirainen -e 's,/usr/include/rpcsvc/rquota.h,rquota.h,' \
a321662b406acc9c9e6fe52332236740d449f591Timo Sirainen -e 's/int32_t \*buf/int32_t *buf ATTR_UNUSED/' \
a5563dc790a44bb58860d74479a24349f593d68fTimo Sirainen -e 's/^static char rcsid.*//' ) > rquota_xdr.c
f740f218bbb1a98cea08dd82b601a8dd50f35093Timo Sirainen
23ad3970cd22adb6c875caf95fa791548849f0d1Timo Sirainenrquota.h: Makefile $(RQUOTA_X)
a5563dc790a44bb58860d74479a24349f593d68fTimo Sirainen $(RPCGEN) -h $(RQUOTA_X) > rquota.h
23ad3970cd22adb6c875caf95fa791548849f0d1Timo Sirainen
23ad3970cd22adb6c875caf95fa791548849f0d1Timo Sirainenquota-fs.lo: rquota.h
23ad3970cd22adb6c875caf95fa791548849f0d1Timo Sirainen
fdbcd3027578d35cb6e12b44c06a46905024e300Timo Sirainenendif
fdbcd3027578d35cb6e12b44c06a46905024e300Timo Sirainen
3a53aff14d327af2819b4755864b3571703683b8Timo Sirainenpkginc_libdir=$(pkgincludedir)
3a53aff14d327af2819b4755864b3571703683b8Timo Sirainenpkginc_lib_HEADERS = \
797d20c35779d68f2542d3e287c1a869048c8f26Timo Sirainen quota.h \
a35cbba04d0a2823da98e693bd09a051addffdb2Timo Sirainen quota-fs.h \
797d20c35779d68f2542d3e287c1a869048c8f26Timo Sirainen quota-plugin.h \
797d20c35779d68f2542d3e287c1a869048c8f26Timo Sirainen quota-private.h
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuominoinst_HEADERS = \
7dd64d2faf200cb8b87569cbc3206b54f95c9ff5Aki Tuomi quota-status-settings.h
797d20c35779d68f2542d3e287c1a869048c8f26Timo Sirainen
88c580cdff2656df007fdfe5bd8ca8a465ee605aTimo SirainenEXTRA_DIST = rquota.x
88c580cdff2656df007fdfe5bd8ca8a465ee605aTimo Sirainen
23ad3970cd22adb6c875caf95fa791548849f0d1Timo Sirainenclean-generic:
acbd82bd456316a32f61df67fc41bbff681119c7Timo Sirainen if [ "$(top_srcdir)" != "$(top_builddir)" ]; then \
acbd82bd456316a32f61df67fc41bbff681119c7Timo Sirainen rm -f $(top_builddir)/src/plugins/quota/rquota.x; \
acbd82bd456316a32f61df67fc41bbff681119c7Timo Sirainen fi; \
23ad3970cd22adb6c875caf95fa791548849f0d1Timo Sirainen rm -f rquota_xdr.c rquota.h
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainentest_programs = \
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen test-quota-util
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainennoinst_PROGRAMS = $(test_programs)
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainentest_libs = \
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen ../../lib-test/libtest.la \
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen ../../lib/liblib.la
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainentest_deps = $(noinst_LTLIBRARIES) $(test_libs)
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainentest_quota_util_SOURCES = test-quota-util.c
c35e049bf1b9bbee97551bcb029e53a10cafd761Timo Sirainentest_quota_util_LDADD = quota-util.lo $(test_libs)
c35e049bf1b9bbee97551bcb029e53a10cafd761Timo Sirainentest_quota_util_DEPENDENCIES = quota-util.lo $(test_deps)
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen
149299c7d5136a8fb425ef3cf8953026a1358002Timo Sirainencheck-local:
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen for bin in $(test_programs); do \
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \
de02255bbe97d5d5c54ca1054bb7c9304ee025a1Timo Sirainen done