From 77a6917a650a88c12b6c27d37994f8bfef461345 Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Tue, 4 Nov 2014 20:53:24 +0100 Subject: Build fix: xdrgen As discovered in https://review.gluster.org/8762, BSD systems fail to run xdrgen during glusterfs build. This seems to be caused by a difference between BSD make and GNU make whith implcit targets. The former seems to use absolute path here, which means we should not prepend it with the current directory path, otherwise we have the directory path twice and the files cannot be found my make. This is a second attempt after I178123bf6f3d9e963ff5b78839d498f530c05a97 which was broken and reverted in I3c8966288f66d0eafa2e94490e3b64a057b4f2c0 BUG: 1157839 Change-Id: I797c536c319a156b71a42c82cbaf80bbf17b7234 Signed-off-by: Emmanuel Dreyfus Reviewed-on: http://review.gluster.org/9046 Tested-by: Gluster Build System Reviewed-by: Kaleb KEITHLEY Reviewed-by: Vijay Bellur --- rpc/xdr/src/Makefile.am | 73 +++++++++++++------------------------------------ 1 file changed, 19 insertions(+), 54 deletions(-) (limited to 'rpc/xdr/src/Makefile.am') diff --git a/rpc/xdr/src/Makefile.am b/rpc/xdr/src/Makefile.am index 48aaa7ba775..a1c5525c17e 100644 --- a/rpc/xdr/src/Makefile.am +++ b/rpc/xdr/src/Makefile.am @@ -22,92 +22,57 @@ CLEANFILES = $(XDRSOURCES) $(XDRHEADERS) EXTRA_DIST = $(XDRGENFILES) +xdrsrc=$(top_srcdir)/rpc/xdr/src glusterfs3-xdr.c: glusterfs3-xdr.x glusterfs3-xdr.h - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.c=.x}; then \ - $(top_srcdir)/build-aux/xdrgen source $(top_srcdir)/rpc/xdr/src/${@:.c=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}` glusterfs3-xdr.h: glusterfs3-xdr.x - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; then \ - $(top_srcdir)/build-aux/xdrgen header $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}` cli1-xdr.c: cli1-xdr.x cli1-xdr.h - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.c=.x} ; then \ - $(top_srcdir)/build-aux/xdrgen source $(top_srcdir)/rpc/xdr/src/${@:.c=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}` cli1-xdr.h: cli1-xdr.x - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; then \ - $(top_srcdir)/build-aux/xdrgen header $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}` nlm4-xdr.c: nlm4-xdr.x nlm4-xdr.h - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.c=.x} ; then \ - $(top_srcdir)/build-aux/xdrgen source $(top_srcdir)/rpc/xdr/src/${@:.c=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}` nlm4-xdr.h: nlm4-xdr.x - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; then \ - $(top_srcdir)/build-aux/xdrgen header $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}` nsm-xdr.c: nsm-xdr.x nsm-xdr.h - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.c=.x} ; then \ - $(top_srcdir)/build-aux/xdrgen source $(top_srcdir)/rpc/xdr/src/${@:.c=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}` nsm-xdr.h: nsm-xdr.x - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; then \ - $(top_srcdir)/build-aux/xdrgen header $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}` rpc-common-xdr.c: rpc-common-xdr.x rpc-common-xdr.h - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.c=.x} ; then \ - $(top_srcdir)/build-aux/xdrgen source $(top_srcdir)/rpc/xdr/src/${@:.c=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}` rpc-common-xdr.h: rpc-common-xdr.x - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; then \ - $(top_srcdir)/build-aux/xdrgen header $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}` glusterd1-xdr.c: glusterd1-xdr.x glusterd1-xdr.h - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.c=.x} ; then \ - $(top_srcdir)/build-aux/xdrgen source $(top_srcdir)/rpc/xdr/src/${@:.c=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}` glusterd1-xdr.h: glusterd1-xdr.x - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; then \ - $(top_srcdir)/build-aux/xdrgen header $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}` acl3-xdr.c: acl3-xdr.x acl3-xdr.h - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.c=.x} ; then \ - $(top_srcdir)/build-aux/xdrgen source $(top_srcdir)/rpc/xdr/src/${@:.c=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}` acl3-xdr.h: acl3-xdr.x - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; then \ - $(top_srcdir)/build-aux/xdrgen header $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}` portmap-xdr.c: portmap-xdr.x portmap-xdr.h - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.c=.x} ; then \ - $(top_srcdir)/build-aux/xdrgen source $(top_srcdir)/rpc/xdr/src/${@:.c=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}` portmap-xdr.h: portmap-xdr.x - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; then \ - $(top_srcdir)/build-aux/xdrgen header $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}` mount3udp.c: mount3udp.x mount3udp.h - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.c=.x} ; then \ - $(top_srcdir)/build-aux/xdrgen source $(top_srcdir)/rpc/xdr/src/${@:.c=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}` mount3udp.h: mount3udp.x - @if test -f $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; then \ - $(top_srcdir)/build-aux/xdrgen header $(top_srcdir)/rpc/xdr/src/${@:.h=.x} ; \ - fi + $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}` -- cgit