view src/plugins/quota/Makefile.am @ 9575:0a00dcc4f0ea HEAD

lib-storage: Allow shared namespace prefix to use %variable modifiers.
author Timo Sirainen <tss@iki.fi>
date Wed, 26 May 2010 17:07:51 +0100
parents 4fcb729cfadc
children
line wrap: on
line source

AM_CPPFLAGS = \
	-I$(top_srcdir)/src/lib \
	-I$(top_srcdir)/src/lib-dict \
	-I$(top_srcdir)/src/lib-index \
	-I$(top_srcdir)/src/lib-mail \
	-I$(top_srcdir)/src/lib-storage \
	-I$(top_srcdir)/src/lib-storage/index \
	-I$(top_srcdir)/src/lib-storage/index/maildir \
	-DPKG_RUNDIR=\""$(rundir)"\"

lib10_quota_plugin_la_LDFLAGS = -module -avoid-version

module_LTLIBRARIES = \
	lib10_quota_plugin.la

quota_dist_sources = \
	quota.c \
	quota-count.c \
	quota-fs.c \
	quota-dict.c \
	quota-dirsize.c \
	quota-maildir.c \
        quota-plugin.c \
	quota-storage.c

lib10_quota_plugin_la_SOURCES = \
	$(quota_dist_sources) \
	$(RQUOTA_XDR)

if HAVE_RQUOTA
RQUOTA_XDR = rquota_xdr.c
#RQUOTA_X = /usr/include/rpcsvc/rquota.x
RQUOTA_X = $(srcdir)/rquota.x
rquota_xdr.c: Makefile $(RQUOTA_X)
	if [ "$(top_srcdir)" != "$(top_builddir)" ]; then \
	  cp $(RQUOTA_X) $(top_builddir)/src/plugins/quota/; \
	fi; \
	(echo '#include "lib.h"'; \
	 echo '#include <rpc/rpc.h>'; \
	 $(RPCGEN) -c $(top_builddir)/src/plugins/quota/rquota.x | \
	  sed -e 's/IXDR_PUT/(void)IXDR_PUT/g' \
	    -e 's,/usr/include/rpcsvc/rquota.h,rquota.h,' \
	    -e 's/int32_t \*buf/int32_t *buf ATTR_UNUSED/' \
	    -e 's/^static char rcsid.*//' ) > rquota_xdr.c

rquota.h: Makefile $(RQUOTA_X)
	$(RPCGEN) -h $(RQUOTA_X) > rquota.h

quota-fs.lo: rquota.h

endif

noinst_HEADERS = \
	quota.h \
	quota-fs.h \
	quota-plugin.h \
	quota-private.h

install-exec-local:
	for d in imap pop3 lda; do \
	  $(mkdir_p) $(DESTDIR)$(moduledir)/$$d; \
	  rm -f $(DESTDIR)$(moduledir)/$$d/lib10_quota_plugin$(MODULE_SUFFIX); \
	  $(LN_S) ../lib10_quota_plugin$(MODULE_SUFFIX) $(DESTDIR)$(moduledir)/$$d; \
	done

EXTRA_DIST = rquota.x

DISTFILES = $(DIST_COMMON) $(quota_dist_sources) $(TEXINFOS) $(EXTRA_DIST)

clean-generic:
	if [ "$(top_srcdir)" != "$(top_builddir)" ]; then \
	  rm -f $(top_builddir)/src/plugins/quota/rquota.x; \
	fi; \
	rm -f rquota_xdr.c rquota.h