]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Fix VPATH build of RQUOTA support.
authorMatthias Andree <matthias.andree@gmx.de>
Tue, 7 Jul 2009 19:01:36 +0000 (21:01 +0200)
committerMatthias Andree <matthias.andree@gmx.de>
Tue, 7 Jul 2009 19:01:36 +0000 (21:01 +0200)
Some rpcgen derive #include "..." paths from the infile argument.
This will be off for VPATH builds, as the generated rquota_xdr.c
code will look in $(srcdir), but we'll generate the rquota.h file in
$(builddir). Play safe and copy rquota.x to $(builddir) first.

This fixes the build on openSUSE 11.1.

--HG--
branch : HEAD

src/plugins/quota/Makefile.am

index 4c8c6d94a06e439a5530af4705e794e6e129e036..5f033d5781386bca9ce813132671f57103432930 100644 (file)
@@ -36,9 +36,10 @@ RQUOTA_XDR = rquota_xdr.c
 #RQUOTA_X = /usr/include/rpcsvc/rquota.x
 RQUOTA_X = $(srcdir)/rquota.x
 rquota_xdr.c: Makefile $(RQUOTA_X)
+       if "$(srcdir)" != "$(builddir)" ; then cp $(RQUOTA_X) $(builddir) ; fi
        (echo '#include "lib.h"'; \
         echo '#include <rpc/rpc.h>'; \
-        $(RPCGEN) -c $(RQUOTA_X) | \
+        $(RPCGEN) -c $(builddir)/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/' \