summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/Makefile.am
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2016-04-18 21:47:18 +0200
committerJeff Darcy <jdarcy@redhat.com>2016-04-28 13:51:12 -0700
commit2f945b86d30eca3a32f5e8e42fbe692ddf4b55be (patch)
tree61765dd2febe2fa5416fdf6e37625e4d66d3f094 /libglusterfs/src/Makefile.am
parent40e96c17647b281264783520f8fbdd9056332b4c (diff)
rpc: split FOPs enum from glusterfs.h
Moving the enumeration of FOPs and some of the other parts that are defining the network protocol to the rpc/xdr/ section. These structures need some care when modifications are made, moving them out of the common glusterfs.h header helps with that. The protocol definition structures are generated in a new glusterfs-fops header. This file is present in rpc/xdr/src/ and libglusterfs/src/, it is a little ugly, but prevents the need to update all Makefile.am files with the additional -I option for finding the new header file. The generation of the .c and .h files from the .x descriptions needed small modifications to accommodate these changes. The build/xdrgen script was improved slightly for this. The .c and .h files are incorrectly in the $(top_srcdir), instead of $(top_builddir). This is an existing issue, and bug 1330604 has been filed to get that addressed. Change-Id: I98fc8cf7e4b631082c7b203b5a0a77111bec1fb9 BUG: 1328502 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14032 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'libglusterfs/src/Makefile.am')
-rw-r--r--libglusterfs/src/Makefile.am10
1 files changed, 8 insertions, 2 deletions
diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am
index 39ae9e05091..fbe30da76f0 100644
--- a/libglusterfs/src/Makefile.am
+++ b/libglusterfs/src/Makefile.am
@@ -34,9 +34,9 @@ libglusterfs_la_SOURCES = dict.c xlator.c logging.c \
$(CONTRIBDIR)/timer-wheel/find_last_bit.c tw.c default-args.c locking.c
nodist_libglusterfs_la_SOURCES = y.tab.c graph.lex.c defaults.c
-nodist_libglusterfs_la_HEADERS = y.tab.h
+nodist_libglusterfs_la_HEADERS = y.tab.h glusterfs-fops.h
-BUILT_SOURCES = graph.lex.c defaults.c
+BUILT_SOURCES = graph.lex.c defaults.c glusterfs-fops.h
libglusterfs_la_HEADERS = common-utils.h defaults.h default-args.h \
dict.h glusterfs.h hashfn.h timespec.h logging.h xlator.h \
@@ -84,6 +84,12 @@ y.tab.h: graph.y
defaults.c: defaults-tmpl.c generator.py gen-defaults.py
$(PYTHON) $(srcdir)/gen-defaults.py $(srcdir)/defaults-tmpl.c > $@
+$(top_srcdir)/rpc/xdr/src/glusterfs-fops.h: $(top_srcdir)/rpc/xdr/src/glusterfs-fops.x
+ $(MAKE) -C $(top_builddir)/rpc/xdr/src/ `basename $@`
+
+glusterfs-fops.h: $(top_srcdir)/rpc/xdr/src/glusterfs-fops.h
+ cp $(top_srcdir)/rpc/xdr/src/glusterfs-fops.h .
+
CLEANFILES = $(nodist_libglusterfs_la_SOURCES) $(nodist_libglusterfs_la_HEADERS)
if UNITTEST