summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am9
-rw-r--r--api/src/Makefile.am1
-rwxr-xr-xbuild-aux/xdrgen105
-rw-r--r--cli/src/Makefile.am1
-rw-r--r--contrib/umountd/Makefile.am3
-rw-r--r--extras/LinuxRPM/Makefile.am8
-rw-r--r--extras/geo-rep/Makefile.am5
-rw-r--r--geo-replication/src/Makefile.am8
-rw-r--r--glusterfsd/src/Makefile.am4
-rw-r--r--heal/src/Makefile.am1
-rw-r--r--libglusterfs/src/Makefile.am24
-rw-r--r--libglusterfs/src/gfdb/Makefile.am24
-rw-r--r--rpc/rpc-lib/src/Makefile.am1
-rw-r--r--rpc/rpc-transport/rdma/src/Makefile.am6
-rw-r--r--rpc/rpc-transport/socket/src/Makefile.am6
-rw-r--r--rpc/xdr/src/Makefile.am103
-rw-r--r--rpc/xdr/src/acl3-xdr.x4
-rw-r--r--rpc/xdr/src/changelog-xdr.x15
-rw-r--r--rpc/xdr/src/cli1-xdr.x15
-rw-r--r--rpc/xdr/src/glusterd1-xdr.x15
-rw-r--r--rpc/xdr/src/glusterfs-fops.x15
-rw-r--r--rpc/xdr/src/glusterfs3-xdr.x14
-rw-r--r--rpc/xdr/src/mount3udp.x5
-rw-r--r--rpc/xdr/src/nlm4-xdr.x5
-rw-r--r--rpc/xdr/src/nsm-xdr.x15
-rw-r--r--rpc/xdr/src/portmap-xdr.x14
-rw-r--r--rpc/xdr/src/rpc-common-xdr.x15
-rw-r--r--rpc/xdr/src/rpc-pragmas.h28
-rw-r--r--xlators/cluster/afr/src/Makefile.am5
-rw-r--r--xlators/cluster/dht/src/Makefile.am18
-rw-r--r--xlators/cluster/ec/src/Makefile.am4
-rw-r--r--xlators/cluster/stripe/src/Makefile.am6
-rw-r--r--xlators/debug/error-gen/src/Makefile.am3
-rw-r--r--xlators/debug/io-stats/src/Makefile.am4
-rw-r--r--xlators/debug/trace/src/Makefile.am3
-rw-r--r--xlators/encryption/crypt/src/Makefile.am6
-rw-r--r--xlators/encryption/rot-13/src/Makefile.am3
-rw-r--r--xlators/experimental/dht2/dht2-client/src/Makefile.am2
-rw-r--r--xlators/experimental/dht2/dht2-server/src/Makefile.am2
-rw-r--r--xlators/experimental/fdl/src/Makefile.am11
-rw-r--r--xlators/experimental/jbr-client/src/Makefile.am12
-rw-r--r--xlators/experimental/jbr-server/src/Makefile.am12
-rw-r--r--xlators/experimental/posix2/common/src/Makefile.am5
-rw-r--r--xlators/experimental/posix2/ds/src/Makefile.am4
-rw-r--r--xlators/experimental/posix2/mds/src/Makefile.am4
-rw-r--r--xlators/features/arbiter/src/Makefile.am3
-rw-r--r--xlators/features/barrier/src/Makefile.am3
-rw-r--r--xlators/features/bit-rot/src/bitd/Makefile.am9
-rw-r--r--xlators/features/bit-rot/src/stub/Makefile.am5
-rw-r--r--xlators/features/changelog/lib/src/Makefile.am30
-rw-r--r--xlators/features/changelog/src/Makefile.am25
-rw-r--r--xlators/features/changetimerecorder/src/Makefile.am10
-rw-r--r--xlators/features/compress/src/Makefile.am6
-rw-r--r--xlators/features/ganesha/src/Makefile.am19
-rw-r--r--xlators/features/gfid-access/src/Makefile.am3
-rw-r--r--xlators/features/glupy/src/Makefile.am20
-rw-r--r--xlators/features/index/src/Makefile.am4
-rw-r--r--xlators/features/leases/src/Makefile.am3
-rw-r--r--xlators/features/locks/src/Makefile.am6
-rw-r--r--xlators/features/mac-compat/src/Makefile.am3
-rw-r--r--xlators/features/marker/src/Makefile.am9
-rw-r--r--xlators/features/protect/src/Makefile.am9
-rw-r--r--xlators/features/quiesce/src/Makefile.am3
-rw-r--r--xlators/features/quota/src/Makefile.am7
-rw-r--r--xlators/features/read-only/src/Makefile.am3
-rw-r--r--xlators/features/shard/src/Makefile.am3
-rw-r--r--xlators/features/snapview-client/src/Makefile.am3
-rw-r--r--xlators/features/snapview-server/src/Makefile.am19
-rw-r--r--xlators/features/trash/src/Makefile.am3
-rw-r--r--xlators/features/upcall/src/Makefile.am8
-rw-r--r--xlators/meta/Makefile.am2
-rw-r--r--xlators/meta/src/Makefile.am3
-rw-r--r--xlators/mgmt/glusterd/src/Makefile.am15
-rw-r--r--xlators/mount/fuse/src/Makefile.am5
-rw-r--r--xlators/nfs/server/src/Makefile.am13
-rw-r--r--xlators/performance/Makefile.am3
-rw-r--r--xlators/performance/decompounder/src/Makefile.am5
-rw-r--r--xlators/performance/io-cache/src/Makefile.am1
-rw-r--r--xlators/performance/io-threads/src/Makefile.am3
-rw-r--r--xlators/performance/md-cache/src/Makefile.am1
-rw-r--r--xlators/performance/open-behind/src/Makefile.am3
-rw-r--r--xlators/performance/quick-read/src/Makefile.am3
-rw-r--r--xlators/performance/read-ahead/src/Makefile.am3
-rw-r--r--xlators/performance/readdir-ahead/src/Makefile.am7
-rw-r--r--xlators/performance/symlink-cache/src/Makefile.am3
-rw-r--r--xlators/performance/write-behind/src/Makefile.am3
-rw-r--r--xlators/playground/template/src/Makefile.am3
-rw-r--r--xlators/protocol/auth/addr/src/Makefile.am4
-rw-r--r--xlators/protocol/auth/login/src/Makefile.am3
-rw-r--r--xlators/protocol/client/src/Makefile.am6
-rw-r--r--xlators/protocol/server/src/Makefile.am9
-rw-r--r--xlators/storage/bd/src/Makefile.am7
-rw-r--r--xlators/storage/posix/src/Makefile.am8
-rw-r--r--xlators/system/posix-acl/src/Makefile.am3
94 files changed, 515 insertions, 390 deletions
diff --git a/Makefile.am b/Makefile.am
index 51da7c16e7f..bc4627e9f54 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,15 +4,14 @@ EXTRA_DIST = autogen.sh \
glusterfs.spec glusterfs-api.pc.in libgfchangelog.pc.in libgfdb.pc.in \
run-tests.sh \
build-aux/pkg-version \
- build-aux/xdrgen \
contrib/argp-standalone \
contrib/umountd \
contrib/uuid \
$(shell find $(top_srcdir)/tests -type f -print)
-SUBDIRS = $(ARGP_STANDALONE_DIR) libglusterfs rpc api xlators glusterfsd \
- $(FUSERMOUNT_SUBDIR) doc extras cli heal @SYNCDAEMON_SUBDIR@ \
- @UMOUNTD_SUBDIR@ tools events
+SUBDIRS = $(ARGP_STANDALONE_DIR) rpc/xdr/src libglusterfs rpc api xlators \
+ glusterfsd $(FUSERMOUNT_SUBDIR) doc extras cli heal \
+ @SYNCDAEMON_SUBDIR@ @UMOUNTD_SUBDIR@ tools events
pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = glusterfs-api.pc libgfchangelog.pc
@@ -55,9 +54,11 @@ clang-check:
gen-ChangeLog:
(cd $(srcdir) && git diff && echo ===== git log ==== && git log) > $(distdir)/ChangeLog
+.PHONY : gen-VERSION
gen-VERSION:
if test -d $(top_srcdir)/.git; then \
cd $(top_srcdir); \
./build-aux/pkg-version --full \
> $(abs_top_builddir)/$(distdir)/VERSION; \
fi
+
diff --git a/api/src/Makefile.am b/api/src/Makefile.am
index e01b384726c..625183c8dbc 100644
--- a/api/src/Makefile.am
+++ b/api/src/Makefile.am
@@ -15,6 +15,7 @@ libgfapi_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
-I$(top_srcdir)/rpc/rpc-lib/src \
-I$(top_srcdir)/rpc/xdr/src \
+ -I$(top_builddir)/rpc/xdr/src \
-DDATADIR=\"$(localstatedir)\" \
-D__USE_FILE_OFFSET64
diff --git a/build-aux/xdrgen b/build-aux/xdrgen
deleted file mode 100755
index 010df656377..00000000000
--- a/build-aux/xdrgen
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/sh
-
-# error out if an error occurs
-set -e
-
-append_licence_header ()
-{
- local src_file=$1;
- local dst_file=$2;
-
- cat >$dst_file <<EOF
-/*
- Copyright (c) 2007-2016 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-
-#include "compat.h"
-
-#if defined(__GNUC__)
-#if __GNUC__ >= 4
-#if !defined(__clang__)
-#if !defined(__NetBSD__)
-#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
-#pragma GCC diagnostic ignored "-Wunused-variable"
-#endif
-#else
-#pragma clang diagnostic ignored "-Wunused-variable"
-#pragma clang diagnostic ignored "-Wunused-value"
-#endif
-#endif
-#endif
-
-EOF
-
- cat $src_file >> $dst_file;
-
-}
-
-gen_sources ()
-{
- local xfile="$1";
-
- local cfile="${1%.x}.c";
- local hfile="${1%.x}.h";
-
- local tmp_cfile="$1.c.tmp";
- local tmp_hfile="$1.h.tmp";
-
- rm -f $cfile;
- rpcgen -c -o $cfile $xfile;
- append_licence_header $cfile $tmp_cfile;
- mv $tmp_cfile $cfile;
- # remove unwanted temporary files (if any)
- rm -f $tmp_cfile;
- echo "Generated $cfile"
- return
-}
-
-gen_headers ()
-{
- local xfile="$1";
-
- local cfile="${1%.x}.c";
- local hfile="${1%.x}.h";
-
- local tmp_cfile="$1.c.tmp";
- local tmp_hfile="$1.h.tmp";
-
- # no need for a temporary file here as there are no changes from glusterfs
- rm -f $hfile;
- rpcgen -h -o $hfile $xfile;
- # the '#ifdef' part of file should be fixed
- sed -r -e '/#(ifdef|ifndef|define)/s/-/_/g' $hfile > ${hfile}.new && mv ${hfile}.new $hfile;
- # Gen header to temp file and append generated file
- append_licence_header $hfile $tmp_hfile;
- # now move the destination file to actual original file
- mv $tmp_hfile $hfile;
- rm -f $tmp_hfile;
- echo "Generated $hfile";
- return
-}
-
-main ()
-{
- if [ $# -ne 2 ]; then
- echo "wrong number of arguments given"
- echo " $0 [header|source] <XDR-definition-file>.x"
- exit 1;
- fi
-
- if [ $1 = "header" ]; then
- gen_headers $2
- fi
-
- if [ $1 = "source" ]; then
- gen_sources $2
- fi
-}
-
-main "$@";
diff --git a/cli/src/Makefile.am b/cli/src/Makefile.am
index 91819d111e3..f5b8d00e673 100644
--- a/cli/src/Makefile.am
+++ b/cli/src/Makefile.am
@@ -15,6 +15,7 @@ noinst_HEADERS = cli.h cli-mem-types.h cli-cmd.h cli-quotad-client.h
AM_CPPFLAGS = $(GF_CPPFLAGS) \
-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src\
-I$(top_srcdir)/rpc/xdr/src\
+ -I$(top_builddir)/rpc/xdr/src\
-DDATADIR=\"$(localstatedir)\" \
-DCONFDIR=\"$(sysconfdir)/glusterfs\" \
-DGSYNCD_PREFIX=\"$(libexecdir)/glusterfs\"\
diff --git a/contrib/umountd/Makefile.am b/contrib/umountd/Makefile.am
index c03b0cbcae6..b39e000f5aa 100644
--- a/contrib/umountd/Makefile.am
+++ b/contrib/umountd/Makefile.am
@@ -4,7 +4,8 @@ umountd_CFLAGS = $(GF_CFLAGS) -DDATADIR=\"$(localstatedir)\"
umountd_LDADD = $(top_builddir)/libglusterfs/src/libglusterfs.la ${GF_LDADD}
umountd_LDFLAGS = $(GF_LDFLAGS)
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
CLEANFILES =
diff --git a/extras/LinuxRPM/Makefile.am b/extras/LinuxRPM/Makefile.am
index d1b78ea8974..61fd6da74c8 100644
--- a/extras/LinuxRPM/Makefile.am
+++ b/extras/LinuxRPM/Makefile.am
@@ -15,10 +15,10 @@ glusterrpms_without_autogen: prep srcrpm rpms
-rm -rf rpmbuild
autogen:
- cd ../.. \
- && rm -rf autom4te.cache \
- && ./autogen.sh \
- && ./configure --with-previous-options
+ cd ../.. && \
+ rm -rf autom4te.cache && \
+ ./autogen.sh && \
+ ./configure --with-previous-options
prep:
$(MAKE) -C ../.. dist;
diff --git a/extras/geo-rep/Makefile.am b/extras/geo-rep/Makefile.am
index da3dd1f1d39..e4603ae80b8 100644
--- a/extras/geo-rep/Makefile.am
+++ b/extras/geo-rep/Makefile.am
@@ -1,13 +1,14 @@
scriptsdir = $(datadir)/glusterfs/scripts
scripts_SCRIPTS = gsync-upgrade.sh generate-gfid-file.sh get-gfid.sh \
- slave-upgrade.sh schedule_georep.py
+ slave-upgrade.sh schedule_georep.py
scripts_PROGRAMS = gsync-sync-gfid
gsync_sync_gfid_CFLAGS = $(GF_CFLAGS) -Wall -I$(top_srcdir)/libglusterfs/src
gsync_sync_gfid_LDFLAGS = $(GF_LDFLAGS)
gsync_sync_gfid_LDADD = $(GF_LDADD) $(top_builddir)/libglusterfs/src/libglusterfs.la
gsync_sync_gfid_SOURCES = gsync-sync-gfid.c
-gsync_sync_gfid_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+gsync_sync_gfid_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
EXTRA_DIST = gsync-sync-gfid.c gsync-upgrade.sh generate-gfid-file.sh \
get-gfid.sh slave-upgrade.sh schedule_georep.py.in
diff --git a/geo-replication/src/Makefile.am b/geo-replication/src/Makefile.am
index f8cc7a0f73f..87435d5718c 100644
--- a/geo-replication/src/Makefile.am
+++ b/geo-replication/src/Makefile.am
@@ -19,15 +19,13 @@ gsyncd_LDFLAGS = $(GF_LDFLAGS)
noinst_HEADERS = procdiggy.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) \
- -I$(top_srcdir)/libglusterfs/src\
- -DGSYNCD_PREFIX=\"$(libexecdir)/glusterfs\"\
- -DUSE_LIBGLUSTERFS\
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -DGSYNCD_PREFIX=\"$(libexecdir)/glusterfs\" -DUSE_LIBGLUSTERFS \
-DSBIN_DIR=\"$(sbindir)\" -DPYTHON=\"$(PYTHON)\"
AM_CFLAGS = -Wall $(GF_CFLAGS)
-
CLEANFILES =
$(top_builddir)/libglusterfs/src/libglusterfs.la:
diff --git a/glusterfsd/src/Makefile.am b/glusterfsd/src/Makefile.am
index 0f83622bb37..e8a3f99b7fa 100644
--- a/glusterfsd/src/Makefile.am
+++ b/glusterfsd/src/Makefile.am
@@ -12,7 +12,9 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) \
-I$(top_srcdir)/libglusterfs/src -DDATADIR=\"$(localstatedir)\" \
-DCONFDIR=\"$(sysconfdir)/glusterfs\" $(GF_GLUSTERFS_CFLAGS) \
-DXLATORDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator\" \
- -I$(top_srcdir)/rpc/rpc-lib/src -I$(top_srcdir)/rpc/xdr/src \
+ -I$(top_srcdir)/rpc/rpc-lib/src \
+ -I$(top_srcdir)/rpc/xdr/src \
+ -I$(top_builddir)/rpc/xdr/src \
-I$(top_srcdir)/xlators/nfs/server/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/heal/src/Makefile.am b/heal/src/Makefile.am
index 512e9e64fde..830f9d9238b 100644
--- a/heal/src/Makefile.am
+++ b/heal/src/Makefile.am
@@ -14,6 +14,7 @@ AM_CPPFLAGS = $(GF_CPPFLAGS) \
-I$(top_srcdir)/xlators/lib/src\
-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src\
-I$(top_srcdir)/rpc/xdr/src\
+ -I$(top_builddir)/rpc/xdr/src\
-I$(top_srcdir)/api/src\
-I$(top_srcdir)/contrib/argp-standalone\
-DDATADIR=\"$(localstatedir)\" \
diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am
index e086ecec89f..20163da769c 100644
--- a/libglusterfs/src/Makefile.am
+++ b/libglusterfs/src/Makefile.am
@@ -6,10 +6,10 @@ libglusterfs_la_CFLAGS = $(GF_CFLAGS) $(GF_DARWIN_LIBGLUSTERFS_CFLAGS) \
libglusterfs_la_CPPFLAGS = $(GF_CPPFLAGS) -D__USE_FILE_OFFSET64 \
-DXLATORDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator\" \
-DXLATORPARENTDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)\" \
- -I$(top_srcdir)/rpc/xdr/src/ -I$(top_srcdir)/rpc/rpc-lib/src/ \
- -I$(CONTRIBDIR)/rbtree -I$(CONTRIBDIR)/libexecinfo \
- ${ARGP_STANDALONE_CPPFLAGS} -DSBIN_DIR=\"$(sbindir)\" \
- -I$(CONTRIBDIR)/timer-wheel
+ -I$(top_srcdir)/rpc/xdr/src/ -I$(top_builddir)/rpc/xdr/src/ \
+ -I$(top_srcdir)/rpc/rpc-lib/src/ -I$(CONTRIBDIR)/rbtree \
+ -I$(CONTRIBDIR)/libexecinfo ${ARGP_STANDALONE_CPPFLAGS} \
+ -DSBIN_DIR=\"$(sbindir)\" -I$(CONTRIBDIR)/timer-wheel
libglusterfs_la_LIBADD = @LEXLIB@ $(ZLIB_LIBS) $(MATH_LIB) $(UUID_LIBS)
libglusterfs_la_LDFLAGS = -version-info $(LIBGLUSTERFS_LT_VERSION)
@@ -36,9 +36,9 @@ libglusterfs_la_SOURCES = dict.c xlator.c logging.c \
compound-fop-utils.c throttle-tbf.c
nodist_libglusterfs_la_SOURCES = y.tab.c graph.lex.c defaults.c
-nodist_libglusterfs_la_HEADERS = y.tab.h glusterfs-fops.h cli1-xdr.h
+nodist_libglusterfs_la_HEADERS = y.tab.h
-BUILT_SOURCES = graph.lex.c defaults.c glusterfs-fops.h eventtypes.h cli1-xdr.h
+BUILT_SOURCES = graph.lex.c defaults.c eventtypes.h
libglusterfs_la_HEADERS = common-utils.h defaults.h default-args.h \
dict.h glusterfs.h hashfn.h timespec.h logging.h xlator.h \
@@ -95,18 +95,6 @@ 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 .
-
-$(top_srcdir)/rpc/xdr/src/cli1-xdr.h: $(top_srcdir)/rpc/xdr/src/cli1-xdr.x
- $(MAKE) -C $(top_builddir)/rpc/xdr/src/ `basename $@`
-
-cli1-xdr.h: $(top_srcdir)/rpc/xdr/src/cli1-xdr.h
- cp $(top_srcdir)/rpc/xdr/src/cli1-xdr.h .
-
CLEANFILES = $(nodist_libglusterfs_la_SOURCES) $(nodist_libglusterfs_la_HEADERS)
if UNITTEST
diff --git a/libglusterfs/src/gfdb/Makefile.am b/libglusterfs/src/gfdb/Makefile.am
index 50cf3402787..3931e694c24 100644
--- a/libglusterfs/src/gfdb/Makefile.am
+++ b/libglusterfs/src/gfdb/Makefile.am
@@ -1,12 +1,14 @@
libgfdb_la_CFLAGS = -Wall $(GF_CFLAGS) $(GF_DARWIN_LIBGLUSTERFS_CFLAGS) \
- $(SQLITE_CFLAGS) -DDATADIR=\"$(localstatedir)\"
+ $(SQLITE_CFLAGS) -DDATADIR=\"$(localstatedir)\"
libgfdb_la_CPPFLAGS = $(GF_CPPFLAGS) -D__USE_FILE_OFFSET64 -fpic \
- -I$(top_srcdir)/libglusterfs/src \
- -DDATADIR=\"$(localstatedir)\"
+ -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src \
+ -I$(top_builddir)/rpc/xdr/src \
+ -DDATADIR=\"$(localstatedir)\"
libgfdb_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
- $(SQLITE_LIBS) $(UUID_LIBS)
+ $(SQLITE_LIBS) $(UUID_LIBS)
libgfdb_la_LDFLAGS = $(GF_LDFLAGS) -version-info $(LIBGLUSTERFS_LT_VERSION)
@@ -18,14 +20,16 @@ endif
CONTRIB_BUILDDIR = $(top_builddir)/contrib
-libgfdb_la_SOURCES = gfdb_data_store.c gfdb_data_store_helper.c gfdb_sqlite3_helper.c\
- gfdb_sqlite3.c
+libgfdb_la_SOURCES = gfdb_data_store.c gfdb_data_store_helper.c \
+ gfdb_sqlite3_helper.c gfdb_sqlite3.c
-noinst_HEADERS = gfdb_data_store.h gfdb_data_store_types.h gfdb_sqlite3_helper.h\
- gfdb_sqlite3.h gfdb_mem-types.h gfdb_data_store_helper.h
+noinst_HEADERS = gfdb_data_store.h gfdb_data_store_types.h \
+ gfdb_sqlite3_helper.h gfdb_sqlite3.h gfdb_mem-types.h \
+ gfdb_data_store_helper.h
-libgfdb_HEADERS = gfdb_data_store.h gfdb_data_store_types.h gfdb_data_store_helper.h\
- gfdb_sqlite3.h gfdb_mem-types.h gfdb_sqlite3_helper.h
+libgfdb_HEADERS = gfdb_data_store.h gfdb_data_store_types.h \
+ gfdb_data_store_helper.h gfdb_sqlite3.h gfdb_mem-types.h \
+ gfdb_sqlite3_helper.h
CLEANFILES =
diff --git a/rpc/rpc-lib/src/Makefile.am b/rpc/rpc-lib/src/Makefile.am
index 8d0ef9a01b8..b9e55c7ab8a 100644
--- a/rpc/rpc-lib/src/Makefile.am
+++ b/rpc/rpc-lib/src/Makefile.am
@@ -15,6 +15,7 @@ libgfrpc_ladir = $(includedir)/glusterfs/rpc
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
-I$(top_srcdir)/rpc/xdr/src \
+ -I$(top_builddir)/rpc/xdr/src \
-DRPC_TRANSPORTDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/rpc-transport\" \
-I$(top_srcdir)/contrib/rbtree
diff --git a/rpc/rpc-transport/rdma/src/Makefile.am b/rpc/rpc-transport/rdma/src/Makefile.am
index b5fb06f4f01..fedf304c5fe 100644
--- a/rpc/rpc-transport/rdma/src/Makefile.am
+++ b/rpc/rpc-transport/rdma/src/Makefile.am
@@ -12,8 +12,10 @@ rdma_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
noinst_HEADERS = rdma.h name.h rpc-trans-rdma-messages.h
AM_CPPFLAGS = $(GF_CPPFLAGS) \
- -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src/ \
- -I$(top_srcdir)/rpc/xdr/src
+ -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/rpc-lib/src/ \
+ -I$(top_srcdir)/rpc/xdr/src \
+ -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/rpc/rpc-transport/socket/src/Makefile.am b/rpc/rpc-transport/socket/src/Makefile.am
index 5e909aceac8..ed0697635da 100644
--- a/rpc/rpc-transport/socket/src/Makefile.am
+++ b/rpc/rpc-transport/socket/src/Makefile.am
@@ -9,8 +9,10 @@ socket_la_SOURCES = socket.c name.c
socket_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la -lssl
AM_CPPFLAGS = $(GF_CPPFLAGS) \
- -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src/ \
- -I$(top_srcdir)/rpc/xdr/src/
+ -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/rpc-lib/src/ \
+ -I$(top_srcdir)/rpc/xdr/src/ \
+ -I$(top_builddir)/rpc/xdr/src/
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/rpc/xdr/src/Makefile.am b/rpc/xdr/src/Makefile.am
index e0f9c28be86..73640614c55 100644
--- a/rpc/xdr/src/Makefile.am
+++ b/rpc/xdr/src/Makefile.am
@@ -9,9 +9,10 @@ lib_LTLIBRARIES = libgfxdr.la
libgfxdr_la_CFLAGS = -Wall $(GF_CFLAGS) $(GF_DARWIN_LIBGLUSTERFS_CFLAGS)
libgfxdr_la_CPPFLAGS = $(GF_CPPFLAGS) -D__USE_FILE_OFFSET64 \
- -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src
+ -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src \
+ -I$(top_builddir)/rpc/xdr/src
-libgfxdr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+# libgfxdr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
libgfxdr_la_LDFLAGS = -version-info $(LIBGFXDR_LT_VERSION)
@@ -19,82 +20,44 @@ libgfxdr_la_SOURCES = xdr-generic.c xdr-nfs3.c msg-nfs3.c
nodist_libgfxdr_la_SOURCES = $(XDRSOURCES)
libgfxdr_la_HEADERS = xdr-generic.h xdr-nfs3.h msg-nfs3.h glusterfs3.h \
- $(XDRHEADERS)
+ rpc-pragmas.h $(XDRHEADERS)
libgfxdr_ladir = $(includedir)/glusterfs/rpc
-BUILT_SOURCES = $(XDRSOURCES) $(XDRHEADERS)
+# trick automake into doing BUILT_SOURCES magic
+BUILT_SOURCES = $(XDRHEADERS)
EXTRA_DIST = $(XDRGENFILES)
CLEANFILES = $(XDRSOURCES) $(XDRHEADERS)
xdrsrc=$(top_srcdir)/rpc/xdr/src
-glusterfs-fops.c: glusterfs-fops.x glusterfs-fops.h
- $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}`
-glusterfs-fops.h: glusterfs-fops.x
- $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}`
+# make's dependency resolution may mean that it decides to run
+# rpcgen again (unnecessarily), but as the .c file already exists,
+# rpcgen will exit with an error, resulting in a build error. We
+# could use a '-' (i.e. -@rpcgen ...) and suffer with noisy warnings
+# in the build. Or we do this crufty thing instead.
+$(XDRSOURCES): $(XDRHEADERS)
+ @rpcgen -c -o $(@:.c=.tmp) $(@:.c=.x) && mv $(@:.c=.tmp) $@
+
+# d*mn sed in netbsd6 doesn't do -i (inline)
+# (why are we still running smoke on netbsd6 and not netbsd7?)
+$(XDRHEADERS): $(XDRGENFILES)
+ @rpcgen -h -o $(@:.h=.tmp) $(@:.h=.x)
+ @sed -e '/#ifndef/ s/-/_/g' -e '/#define/ s/-/_/g' -e '/#endif/ s/-/_/' \
+ $(@:.h=.tmp) > $@ && rm -f $(@:.h=.tmp)
+
+# link .x files when doing out-of-tree builds
+# have to use .PHONY here to force it; all versions of make
+# will think the file already exists "here" by virtue of the
+# VPATH. And we have to have the .x file in $cwd in order to
+# have rpcgen generate "nice" #include directives
+# i.e. (nice):
+# #include "acl3-xdr.h"
+# versus (not nice):
+# #include "../../../../foo/src/rpc/xdr/src/acl3-xdr.h"
+.PHONY : $(XDRGENFILES)
+$(XDRGENFILES):
+ @if [ ! -e $@ ]; then ln -s $(xdrsrc)/$@ . ; fi;
-$(top_srcdir)/libglusterfs/src/glusterfs-fops.h: glusterfs-fops.h
- cp $(xdrsrc)/`basename $@` $(top_srcdir)/libglusterfs/src/
-
-glusterfs3-xdr.c: glusterfs3-xdr.x glusterfs3-xdr.h
- $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}`
-
-glusterfs3-xdr.h: glusterfs3-xdr.x
- $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}`
-
-cli1-xdr.c: cli1-xdr.x cli1-xdr.h
- $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}`
-
-cli1-xdr.h: cli1-xdr.x
- $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}`
-
-nlm4-xdr.c: nlm4-xdr.x nlm4-xdr.h
- $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}`
-
-nlm4-xdr.h: nlm4-xdr.x
- $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}`
-
-nsm-xdr.c: nsm-xdr.x nsm-xdr.h
- $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}`
-
-nsm-xdr.h: nsm-xdr.x
- $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}`
-
-rpc-common-xdr.c: rpc-common-xdr.x rpc-common-xdr.h
- $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}`
-
-rpc-common-xdr.h: rpc-common-xdr.x
- $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}`
-
-glusterd1-xdr.c: glusterd1-xdr.x glusterd1-xdr.h
- $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}`
-
-glusterd1-xdr.h: glusterd1-xdr.x
- $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}`
-
-acl3-xdr.c: acl3-xdr.x acl3-xdr.h
- $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}`
-
-acl3-xdr.h: acl3-xdr.x
- $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}`
-
-portmap-xdr.c: portmap-xdr.x portmap-xdr.h
- $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}`
-
-portmap-xdr.h: portmap-xdr.x
- $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}`
-
-mount3udp.c: mount3udp.x mount3udp.h
- $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}`
-
-mount3udp.h: mount3udp.x
- $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}`
-
-changelog-xdr.c: changelog-xdr.x changelog-xdr.h
- $(top_srcdir)/build-aux/xdrgen source $(xdrsrc)/`basename ${@:.c=.x}`
-
-changelog-xdr.h: changelog-xdr.x
- $(top_srcdir)/build-aux/xdrgen header $(xdrsrc)/`basename ${@:.h=.x}`
diff --git a/rpc/xdr/src/acl3-xdr.x b/rpc/xdr/src/acl3-xdr.x
index 39388e07c7e..bd9972c7c53 100644
--- a/rpc/xdr/src/acl3-xdr.x
+++ b/rpc/xdr/src/acl3-xdr.x
@@ -8,6 +8,10 @@
* cases as published by the Free Software Foundation.
*/
+#ifdef RPC_XDR
+%#include "rpc-pragmas.h"
+#endif
+%#include "compat.h"
%#include "xdr-nfs3.h"
struct aclentry {
diff --git a/rpc/xdr/src/changelog-xdr.x b/rpc/xdr/src/changelog-xdr.x
index ba1ebd27836..0bd6564a7f0 100644
--- a/rpc/xdr/src/changelog-xdr.x
+++ b/rpc/xdr/src/changelog-xdr.x
@@ -1,3 +1,18 @@
+/*
+ * Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
+ * This file is part of GlusterFS.
+ *
+ * This file is licensed to you under your choice of the GNU Lesser
+ * General Public License, version 3 or any later version (LGPLv3 or
+ * later), or the GNU General Public License, version 2 (GPLv2), in all
+ * cases as published by the Free Software Foundation.
+ */
+
+#ifdef RPC_XDR
+%#include "rpc-pragmas.h"
+#endif
+%#include "compat.h"
+
/* XDR: libgfchangelog -> changelog */
struct changelog_probe_req {
diff --git a/rpc/xdr/src/cli1-xdr.x b/rpc/xdr/src/cli1-xdr.x
index 80151d48822..55a9b3de19c 100644
--- a/rpc/xdr/src/cli1-xdr.x
+++ b/rpc/xdr/src/cli1-xdr.x
@@ -1,3 +1,18 @@
+/*
+ * Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
+ * This file is part of GlusterFS.
+ *
+ * This file is licensed to you under your choice of the GNU Lesser
+ * General Public License, version 3 or any later version (LGPLv3 or
+ * later), or the GNU General Public License, version 2 (GPLv2), in all
+ * cases as published by the Free Software Foundation.
+ */
+
+#ifdef RPC_XDR
+%#include "rpc-pragmas.h"
+#endif
+%#include "compat.h"
+
enum gf_cli_defrag_type {
GF_DEFRAG_CMD_START = 1,
GF_DEFRAG_CMD_STOP,
diff --git a/rpc/xdr/src/glusterd1-xdr.x b/rpc/xdr/src/glusterd1-xdr.x
index f5c45c9e45f..1ce57392b5b 100644
--- a/rpc/xdr/src/glusterd1-xdr.x
+++ b/rpc/xdr/src/glusterd1-xdr.x
@@ -1,3 +1,18 @@
+/*
+ * Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
+ * This file is part of GlusterFS.
+ *
+ * This file is licensed to you under your choice of the GNU Lesser
+ * General Public License, version 3 or any later version (LGPLv3 or
+ * later), or the GNU General Public License, version 2 (GPLv2), in all
+ * cases as published by the Free Software Foundation.
+ */
+
+#ifdef RPC_XDR
+%#include "rpc-pragmas.h"
+#endif
+%#include "compat.h"
+
enum glusterd_volume_status {
GLUSTERD_STATUS_NONE = 0,
GLUSTERD_STATUS_STARTED,
diff --git a/rpc/xdr/src/glusterfs-fops.x b/rpc/xdr/src/glusterfs-fops.x
index 4bfdd4b50ea..3b73499814d 100644
--- a/rpc/xdr/src/glusterfs-fops.x
+++ b/rpc/xdr/src/glusterfs-fops.x
@@ -1,3 +1,18 @@
+/*
+ * Copyright (c) 2016 Red Hat, Inc. <http://www.redhat.com>
+ * This file is part of GlusterFS.
+ *
+ * This file is licensed to you under your choice of the GNU Lesser
+ * General Public License, version 3 or any later version (LGPLv3 or
+ * later), or the GNU General Public License, version 2 (GPLv2), in all
+ * cases as published by the Free Software Foundation.
+ */
+
+#ifdef RPC_XDR
+%#include "rpc-pragmas.h"
+#endif
+%#include "compat.h"
+
/* NOTE: add members ONLY at the end (just before _MAXVALUE) */
/*
* OTHER NOTE: fop_enum_to_str and fop_enum_to_pri_str (in common-utils.h) also
diff --git a/rpc/xdr/src/glusterfs3-xdr.x b/rpc/xdr/src/glusterfs3-xdr.x
index 37fda8551b4..d6fb1bee037 100644
--- a/rpc/xdr/src/glusterfs3-xdr.x
+++ b/rpc/xdr/src/glusterfs3-xdr.x
@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
+ * This file is part of GlusterFS.
+ *
+ * This file is licensed to you under your choice of the GNU Lesser
+ * General Public License, version 3 or any later version (LGPLv3 or
+ * later), or the GNU General Public License, version 2 (GPLv2), in all
+ * cases as published by the Free Software Foundation.
+ */
+
+#ifdef RPC_XDR
+%#include "rpc-pragmas.h"
+#endif
+%#include "compat.h"
%#include "rpc-common-xdr.h"
%#include "glusterfs-fops.h"
diff --git a/rpc/xdr/src/mount3udp.x b/rpc/xdr/src/mount3udp.x
index 7fbe3ff523d..4fafaa053f8 100644
--- a/rpc/xdr/src/mount3udp.x
+++ b/rpc/xdr/src/mount3udp.x
@@ -8,6 +8,11 @@
cases as published by the Free Software Foundation.
*/
+#ifdef RPC_XDR
+%#include "rpc-pragmas.h"
+#endif
+%#include "compat.h"
+
/* This is used by rpcgen to auto generate the rpc stubs.
* mount3udp_svc.c is heavily modified though
*/
diff --git a/rpc/xdr/src/nlm4-xdr.x b/rpc/xdr/src/nlm4-xdr.x
index 9c308d80474..47538235171 100644
--- a/rpc/xdr/src/nlm4-xdr.x
+++ b/rpc/xdr/src/nlm4-xdr.x
@@ -8,6 +8,11 @@
cases as published by the Free Software Foundation.
*/
+#ifdef RPC_XDR
+%#include "rpc-pragmas.h"
+#endif
+%#include "compat.h"
+
/* .x file defined as according to the RFC */
%#include "xdr-common.h"
diff --git a/rpc/xdr/src/nsm-xdr.x b/rpc/xdr/src/nsm-xdr.x
index 8f97b1aaa1f..81b0b8cdea2 100644
--- a/rpc/xdr/src/nsm-xdr.x
+++ b/rpc/xdr/src/nsm-xdr.x
@@ -1,4 +1,19 @@
/*
+ * Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
+ * This file is part of GlusterFS.
+ *
+ * This file is licensed to you under your choice of the GNU Lesser
+ * General Public License, version 3 or any later version (LGPLv3 or
+ * later), or the GNU General Public License, version 2 (GPLv2), in all
+ * cases as published by the Free Software Foundation.
+ */
+
+#ifdef RPC_XDR
+%#include "rpc-pragmas.h"
+#endif
+%#include "compat.h"
+
+/*
* This defines the maximum length of the string
* identifying the caller.
*/
diff --git a/rpc/xdr/src/portmap-xdr.x b/rpc/xdr/src/portmap-xdr.x
index 0e694f3359b..66a86a1dae1 100644
--- a/rpc/xdr/src/portmap-xdr.x
+++ b/rpc/xdr/src/portmap-xdr.x
@@ -1,3 +1,17 @@
+/*
+ * Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
+ * This file is part of GlusterFS.
+ *
+ * This file is licensed to you under your choice of the GNU Lesser
+ * General Public License, version 3 or any later version (LGPLv3 or
+ * later), or the GNU General Public License, version 2 (GPLv2), in all
+ * cases as published by the Free Software Foundation.
+ */
+
+#ifdef RPC_XDR
+%#include "rpc-pragmas.h"
+#endif
+%#include "compat.h"
struct pmap_port_by_brick_req {
string brick<>;
diff --git a/rpc/xdr/src/rpc-common-xdr.x b/rpc/xdr/src/rpc-common-xdr.x
index c2b25705d20..464a7478c73 100644
--- a/rpc/xdr/src/rpc-common-xdr.x
+++ b/rpc/xdr/src/rpc-common-xdr.x
@@ -1,3 +1,18 @@
+/*
+ * Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
+ * This file is part of GlusterFS.
+ *
+ * This file is licensed to you under your choice of the GNU Lesser
+ * General Public License, version 3 or any later version (LGPLv3 or
+ * later), or the GNU General Public License, version 2 (GPLv2), in all
+ * cases as published by the Free Software Foundation.
+ */
+
+#ifdef RPC_XDR
+%#include "rpc-pragmas.h"
+#endif
+%#include "compat.h"
+
/* This file has definition of few XDR structures which are
* not captured in any section specific file */
diff --git a/rpc/xdr/src/rpc-pragmas.h b/rpc/xdr/src/rpc-pragmas.h
new file mode 100644
index 00000000000..4c54cf6f1df
--- /dev/null
+++ b/rpc/xdr/src/rpc-pragmas.h
@@ -0,0 +1,28 @@
+/*
+ Copyright (c) 2016 Red Hat, Inc. <http://www.redhat.com>
+ This file is part of GlusterFS.
+
+ This file is licensed to you under your choice of the GNU Lesser
+ General Public License, version 3 or any later version (LGPLv3 or
+ later), or the GNU General Public License, version 2 (GPLv2), in all
+ cases as published by the Free Software Foundation.
+*/
+
+#ifndef GLUSTERFS_RPC_PRAGMAS_H
+#define GLUSTERFS_RPC_PRAGMAS_H
+
+#if defined(__GNUC__)
+#if __GNUC__ >= 4
+#if !defined(__clang__)
+#if !defined(__NetBSD__)
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#endif
+#else
+#pragma clang diagnostic ignored "-Wunused-variable"
+#pragma clang diagnostic ignored "-Wunused-value"
+#endif
+#endif
+#endif
+
+#endif /* GLUSTERFS_RPC_PRAGMAS_H */
diff --git a/xlators/cluster/afr/src/Makefile.am b/xlators/cluster/afr/src/Makefile.am
index 5612733d3ed..7317846cbb1 100644
--- a/xlators/cluster/afr/src/Makefile.am
+++ b/xlators/cluster/afr/src/Makefile.am
@@ -15,7 +15,7 @@ afr_la_SOURCES = $(afr_common_source) $(AFR_SELFHEAL_SOURCES) afr.c
afr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
pump_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
-pump_la_SOURCES = $(afr_common_source) $(AFR_SELFHEAL_SOURCES) pump.c
+pump_la_SOURCES = $(afr_common_source) $(AFR_SELFHEAL_SOURCES) pump.c
pump_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = afr.h afr-transaction.h afr-inode-write.h afr-inode-read.h \
@@ -25,7 +25,8 @@ noinst_HEADERS = afr.h afr-transaction.h afr-inode-write.h afr-inode-read.h \
AM_CPPFLAGS = $(GF_CPPFLAGS) \
-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/xlators/lib/src \
- -I$(top_srcdir)/rpc/rpc-lib/src
+ -I$(top_srcdir)/rpc/rpc-lib/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/cluster/dht/src/Makefile.am b/xlators/cluster/dht/src/Makefile.am
index 9c38221a148..19ec002f0fd 100644
--- a/xlators/cluster/dht/src/Makefile.am
+++ b/xlators/cluster/dht/src/Makefile.am
@@ -18,25 +18,31 @@ nufa_la_SOURCES = $(dht_common_source) nufa.c
switch_la_SOURCES = $(dht_common_source) switch.c
tier_la_SOURCES = $(dht_common_source) tier.c tier-common.c
-dht_la_LDFLAGS = -module -avoid-version -export-symbols $(top_srcdir)/xlators/cluster/dht/src/dht.sym
+dht_la_LDFLAGS = -module -avoid-version -export-symbols \
+ $(top_srcdir)/xlators/cluster/dht/src/dht.sym
dht_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
-nufa_la_LDFLAGS = -module -avoid-version -export-symbols $(top_srcdir)/xlators/cluster/dht/src/nufa.sym
+nufa_la_LDFLAGS = -module -avoid-version -export-symbols \
+ $(top_srcdir)/xlators/cluster/dht/src/nufa.sym
nufa_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
-switch_la_LDFLAGS = -module -avoid-version -export-symbols $(top_srcdir)/xlators/cluster/dht/src/switch.sym
+switch_la_LDFLAGS = -module -avoid-version -export-symbols \
+ $(top_srcdir)/xlators/cluster/dht/src/switch.sym
switch_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
-tier_la_LDFLAGS = -module -avoid-version -export-symbols $(top_srcdir)/xlators/cluster/dht/src/tier.sym
+tier_la_LDFLAGS = -module -avoid-version -export-symbols \
+ $(top_srcdir)/xlators/cluster/dht/src/tier.sym
tier_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
-noinst_HEADERS = dht-common.h dht-mem-types.h dht-messages.h dht-helper.h tier-common.h tier.h\
+noinst_HEADERS = dht-common.h dht-mem-types.h dht-messages.h \
+ dht-helper.h tier-common.h tier.h \
$(top_builddir)/xlators/lib/src/libxlator.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
-I$(top_srcdir)/libglusterfs/src/gfdb \
- -I$(top_srcdir)/xlators/lib/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
-I$(top_srcdir)/rpc/rpc-lib/src \
+ -I$(top_srcdir)/xlators/lib/src \
-DDATADIR=\"$(localstatedir)\" \
-DLIBDIR=\"$(libdir)\" \
-DLIBGFDB_VERSION=\"$(LIBGFDB_VERSION)\"
diff --git a/xlators/cluster/ec/src/Makefile.am b/xlators/cluster/ec/src/Makefile.am
index c5d9ab1812b..0cd34b58f3c 100644
--- a/xlators/cluster/ec/src/Makefile.am
+++ b/xlators/cluster/ec/src/Makefile.am
@@ -64,10 +64,12 @@ ec_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
ec_la_SOURCES = $(ec_sources) $(ec_headers) $(ec_ext_sources) $(ec_ext_headers)
ec_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
-AM_CPPFLAGS = $(GF_CPPFLAGS)
+AM_CPPFLAGS = $(GF_CPPFLAGS)
AM_CPPFLAGS += -I$(top_srcdir)/libglusterfs/src
AM_CPPFLAGS += -I$(top_srcdir)/xlators/lib/src
AM_CPPFLAGS += -I$(top_srcdir)/rpc/rpc-lib/src
+AM_CPPFLAGS += -I$(top_srcdir)/rpc/xdr/src
+AM_CPPFLAGS += -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/cluster/stripe/src/Makefile.am b/xlators/cluster/stripe/src/Makefile.am
index e732c52423c..2b594567db1 100644
--- a/xlators/cluster/stripe/src/Makefile.am
+++ b/xlators/cluster/stripe/src/Makefile.am
@@ -9,10 +9,12 @@ stripe_la_SOURCES = stripe.c stripe-helpers.c \
stripe_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
-noinst_HEADERS = stripe.h stripe-mem-types.h $(top_builddir)/xlators/lib/src/libxlator.h
+noinst_HEADERS = stripe.h stripe-mem-types.h \
+ $(top_builddir)/xlators/lib/src/libxlator.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
- -I$(top_srcdir)/xlators/lib/src
+ -I$(top_srcdir)/xlators/lib/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/debug/error-gen/src/Makefile.am b/xlators/debug/error-gen/src/Makefile.am
index 8baf15612bd..038d2e8e66d 100644
--- a/xlators/debug/error-gen/src/Makefile.am
+++ b/xlators/debug/error-gen/src/Makefile.am
@@ -9,7 +9,8 @@ error_gen_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = error-gen.h error-gen-mem-types.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/debug/io-stats/src/Makefile.am b/xlators/debug/io-stats/src/Makefile.am
index c5df598549a..c69f3caf0fe 100644
--- a/xlators/debug/io-stats/src/Makefile.am
+++ b/xlators/debug/io-stats/src/Makefile.am
@@ -10,9 +10,9 @@ io_stats_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = io-stats-mem-types.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
- -I$(top_srcdir)/rpc/xdr/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
-I$(top_srcdir)/rpc/rpc-lib/src \
- -DDATADIR=\"$(localstatedir)\"
+ -DDATADIR=\"$(localstatedir)\"
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/debug/trace/src/Makefile.am b/xlators/debug/trace/src/Makefile.am
index 9bd53c89bfe..a37ea63af04 100644
--- a/xlators/debug/trace/src/Makefile.am
+++ b/xlators/debug/trace/src/Makefile.am
@@ -8,7 +8,8 @@ trace_la_SOURCES = trace.c
trace_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = trace.h trace-mem-types.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/encryption/crypt/src/Makefile.am b/xlators/encryption/crypt/src/Makefile.am
index 5e45a5da98a..05fd3d5096b 100644
--- a/xlators/encryption/crypt/src/Makefile.am
+++ b/xlators/encryption/crypt/src/Makefile.am
@@ -6,11 +6,13 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/encryption
crypt_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
crypt_la_SOURCES = keys.c data.c metadata.c atom.c crypt.c
-crypt_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la -lssl -lcrypto
+crypt_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
+ -lssl -lcrypto
noinst_HEADERS = crypt-common.h crypt-mem-types.h crypt.h metadata.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/encryption/rot-13/src/Makefile.am b/xlators/encryption/rot-13/src/Makefile.am
index cc4b7c13005..9978661509d 100644
--- a/xlators/encryption/rot-13/src/Makefile.am
+++ b/xlators/encryption/rot-13/src/Makefile.am
@@ -8,7 +8,8 @@ rot_13_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = rot-13.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/experimental/dht2/dht2-client/src/Makefile.am b/xlators/experimental/dht2/dht2-client/src/Makefile.am
index 39132994d08..a16b9df2f76 100644
--- a/xlators/experimental/dht2/dht2-client/src/Makefile.am
+++ b/xlators/experimental/dht2/dht2-client/src/Makefile.am
@@ -14,6 +14,8 @@ AM_CFLAGS = -Wall $(GF_CFLAGS)
AM_CPPFLAGS = $(GF_CPPFLAGS)
AM_CPPFLAGS += -I$(top_srcdir)/xlators/experimental/dht2/dht2-common/src/
AM_CPPFLAGS += -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS += -I$(top_srcdir)/rpc/xdr/src
+AM_CPPFLAGS += -I$(top_builddir)/rpc/xdr/src
AM_CPPFLAGS += -I$(top_srcdir)/xlators/lib/src
CLEANFILES =
diff --git a/xlators/experimental/dht2/dht2-server/src/Makefile.am b/xlators/experimental/dht2/dht2-server/src/Makefile.am
index 4f721551020..808c724ec9e 100644
--- a/xlators/experimental/dht2/dht2-server/src/Makefile.am
+++ b/xlators/experimental/dht2/dht2-server/src/Makefile.am
@@ -14,6 +14,8 @@ AM_CFLAGS = -Wall $(GF_CFLAGS)
AM_CPPFLAGS = $(GF_CPPFLAGS)
AM_CPPFLAGS += -I$(top_srcdir)/xlators/experimental/dht2/dht2-common/src/
AM_CPPFLAGS += -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS += -I$(top_srcdir)/rpc/xdr/src
+AM_CPPFLAGS += -I$(top_builddir)/rpc/xdr/src
AM_CPPFLAGS += -I$(top_srcdir)/xlators/lib/src
CLEANFILES =
diff --git a/xlators/experimental/fdl/src/Makefile.am b/xlators/experimental/fdl/src/Makefile.am
index aed0204284f..9ec9d4f06ff 100644
--- a/xlators/experimental/fdl/src/Makefile.am
+++ b/xlators/experimental/fdl/src/Makefile.am
@@ -11,19 +11,20 @@ sbin_PROGRAMS = gf_logdump gf_recon
gf_logdump_SOURCES = logdump.c
nodist_gf_logdump_SOURCES = libfdl.c
gf_logdump_LDADD = $(top_builddir)/libglusterfs/src/libglusterfs.la\
- $(top_builddir)/api/src/libgfapi.la
+ $(top_builddir)/api/src/libgfapi.la
# Eventually recon(ciliation) code will move elsewhere, but for now it's
# easier to have it next to the similar logdump code.
gf_recon_SOURCES = recon.c
nodist_gf_recon_SOURCES = librecon.c
gf_recon_LDADD = $(top_builddir)/libglusterfs/src/libglusterfs.la\
- $(top_builddir)/api/src/libgfapi.la
+ $(top_builddir)/api/src/libgfapi.la
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
- -I$(top_srcdir)/api/src -fPIC \
- -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
- -DDATADIR=\"$(localstatedir)\"
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -I$(top_srcdir)/api/src -fPIC \
+ -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+ -DDATADIR=\"$(localstatedir)\"
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/experimental/jbr-client/src/Makefile.am b/xlators/experimental/jbr-client/src/Makefile.am
index 58f399f0607..a20c9944b92 100644
--- a/xlators/experimental/jbr-client/src/Makefile.am
+++ b/xlators/experimental/jbr-client/src/Makefile.am
@@ -7,13 +7,13 @@ CLEANFILES = $(nodist_jbrc_la_SOURCES)
jbrc_la_LDFLAGS = -module -avoid-version
jbrc_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
-noinst_HEADERS = \
- $(top_srcdir)/xlators/lib/src/libxlator.h \
- $(top_srcdir)/glusterfsd/src/glusterfsd.h \
- jbrc.h jbr-messages.h
+noinst_HEADERS = $(top_srcdir)/xlators/lib/src/libxlator.h \
+ $(top_srcdir)/glusterfsd/src/glusterfsd.h \
+ jbrc.h jbr-messages.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) \
- -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/xlators/lib/src \
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/xlators/lib/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
-I$(top_srcdir)/rpc/rpc-lib/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/experimental/jbr-server/src/Makefile.am b/xlators/experimental/jbr-server/src/Makefile.am
index 66f73ba8c96..5d6209d709a 100644
--- a/xlators/experimental/jbr-server/src/Makefile.am
+++ b/xlators/experimental/jbr-server/src/Makefile.am
@@ -12,12 +12,12 @@ noinst_HEADERS = jbr-internal.h \
$(top_srcdir)/xlators/lib/src/libxlator.h \
$(top_srcdir)/glusterfsd/src/glusterfsd.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) \
- -I$(top_srcdir)/libglusterfs/src \
- -I$(top_srcdir)/xlators/lib/src \
- -I$(top_srcdir)/rpc/rpc-lib/src -DSBIN_DIR=\"$(sbindir)\" \
- -I$(top_srcdir)/api/src -DJBR_SCRIPT_PREFIX=\"$(jbrdir)\" \
- -I$(top_srcdir)/xlators/experimental/jbr-client/src/
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -I$(top_srcdir)/xlators/lib/src -I$(top_srcdir)/rpc/rpc-lib/src \
+ -DSBIN_DIR=\"$(sbindir)\" -I$(top_srcdir)/api/src \
+ -DJBR_SCRIPT_PREFIX=\"$(jbrdir)\" \
+ -I$(top_srcdir)/xlators/experimental/jbr-client/src/
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/experimental/posix2/common/src/Makefile.am b/xlators/experimental/posix2/common/src/Makefile.am
index 465f2f2ba32..07533d2bf37 100644
--- a/xlators/experimental/posix2/common/src/Makefile.am
+++ b/xlators/experimental/posix2/common/src/Makefile.am
@@ -9,5 +9,8 @@ libposix2common_la_CFLAGS = -Wall $(GF_CFLAGS)
libposix2common_la_CPPFLAGS = $(GF_CPPFLAGS)
libposix2common_la_CPPFLAGS += -I$(top_srcdir)/libglusterfs/src
+libposix2common_la_CPPFLAGS += -I$(top_srcdir)/rpc/xdr/src
+libposix2common_la_CPPFLAGS += -I$(top_builddir)/rpc/xdr/src
-CLEANFILES = \ No newline at end of file
+
+CLEANFILES =
diff --git a/xlators/experimental/posix2/ds/src/Makefile.am b/xlators/experimental/posix2/ds/src/Makefile.am
index d29c5e135a2..7b9e2739fc8 100644
--- a/xlators/experimental/posix2/ds/src/Makefile.am
+++ b/xlators/experimental/posix2/ds/src/Makefile.am
@@ -14,5 +14,7 @@ AM_CPPFLAGS = $(GF_CPPFLAGS)
AM_CPPFLAGS += -I$(top_srcdir)/xlators/storage/posix2/common/src
AM_CPPFLAGS += -I$(top_srcdir)/libglusterfs/src
AM_CPPFLAGS += -I$(top_srcdir)/xlators/lib/src
+AM_CPPFLAGS += -I$(top_srcdir)/rpc/xdr/src
+AM_CPPFLAGS += -I$(top_builddir)/rpc/xdr/src
-CLEANFILES = \ No newline at end of file
+CLEANFILES =
diff --git a/xlators/experimental/posix2/mds/src/Makefile.am b/xlators/experimental/posix2/mds/src/Makefile.am
index ddd49ef0012..fce1871b01a 100644
--- a/xlators/experimental/posix2/mds/src/Makefile.am
+++ b/xlators/experimental/posix2/mds/src/Makefile.am
@@ -14,5 +14,7 @@ AM_CPPFLAGS = $(GF_CPPFLAGS)
AM_CPPFLAGS += -I$(top_srcdir)/xlators/storage/posix2/common/src
AM_CPPFLAGS += -I$(top_srcdir)/libglusterfs/src
AM_CPPFLAGS += -I$(top_srcdir)/xlators/lib/src
+AM_CPPFLAGS += -I$(top_srcdir)/rpc/xdr/src
+AM_CPPFLAGS += -I$(top_builddir)/rpc/xdr/src
-CLEANFILES = \ No newline at end of file
+CLEANFILES =
diff --git a/xlators/features/arbiter/src/Makefile.am b/xlators/features/arbiter/src/Makefile.am
index dd262c3d6dc..c9f42aee8ba 100644
--- a/xlators/features/arbiter/src/Makefile.am
+++ b/xlators/features/arbiter/src/Makefile.am
@@ -8,7 +8,8 @@ arbiter_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = arbiter.h arbiter-mem-types.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/features/barrier/src/Makefile.am b/xlators/features/barrier/src/Makefile.am
index 4e909c8aad8..25099bc56e5 100644
--- a/xlators/features/barrier/src/Makefile.am
+++ b/xlators/features/barrier/src/Makefile.am
@@ -9,7 +9,8 @@ barrier_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = barrier.h barrier-mem-types.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/features/bit-rot/src/bitd/Makefile.am b/xlators/features/bit-rot/src/bitd/Makefile.am
index dfa29fd72d9..2df6f68a68a 100644
--- a/xlators/features/bit-rot/src/bitd/Makefile.am
+++ b/xlators/features/bit-rot/src/bitd/Makefile.am
@@ -4,15 +4,14 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
bit_rot_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
- -I$(top_srcdir)/rpc/xdr/src/ \
- -I$(top_srcdir)/rpc/rpc-lib/src \
- -I$(CONTRIBDIR)/timer-wheel \
- -I$(top_srcdir)/xlators/features/bit-rot/src/stub
+ -I$(top_srcdir)/rpc/xdr/src/ -I$(top_builddir)/rpc/xdr/src/ \
+ -I$(top_srcdir)/rpc/rpc-lib/src -I$(CONTRIBDIR)/timer-wheel \
+ -I$(top_srcdir)/xlators/features/bit-rot/src/stub
bit_rot_la_SOURCES = bit-rot.c bit-rot-scrub.c bit-rot-ssm.c \
bit-rot-scrub-status.c
bit_rot_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
- $(top_builddir)/xlators/features/changelog/lib/src/libgfchangelog.la
+ $(top_builddir)/xlators/features/changelog/lib/src/libgfchangelog.la
noinst_HEADERS = bit-rot.h bit-rot-scrub.h bit-rot-bitd-messages.h bit-rot-ssm.h \
bit-rot-scrub-status.h
diff --git a/xlators/features/bit-rot/src/stub/Makefile.am b/xlators/features/bit-rot/src/stub/Makefile.am
index 7e4b6837eec..e2c8319e979 100644
--- a/xlators/features/bit-rot/src/stub/Makefile.am
+++ b/xlators/features/bit-rot/src/stub/Makefile.am
@@ -7,10 +7,11 @@ bitrot_stub_la_SOURCES = bit-rot-stub-helpers.c bit-rot-stub.c
bitrot_stub_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = bit-rot-stub.h bit-rot-common.h bit-rot-stub-mem-types.h \
- bit-rot-object-version.h bit-rot-stub-messages.h
+ bit-rot-object-version.h bit-rot-stub-messages.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
- -I$(top_srcdir)/rpc/xdr/src -I$(top_srcdir)/rpc/rpc-lib/src
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -I$(top_srcdir)/rpc/rpc-lib/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/features/changelog/lib/src/Makefile.am b/xlators/features/changelog/lib/src/Makefile.am
index 8d3edb4d63f..92ee26827da 100644
--- a/xlators/features/changelog/lib/src/Makefile.am
+++ b/xlators/features/changelog/lib/src/Makefile.am
@@ -1,29 +1,33 @@
libgfchangelog_la_CFLAGS = -Wall $(GF_CFLAGS) $(GF_DARWIN_LIBGLUSTERFS_CFLAGS) \
- -DDATADIR=\"$(localstatedir)\"
+ -DDATADIR=\"$(localstatedir)\"
libgfchangelog_la_CPPFLAGS = $(GF_CPPFLAGS) -D__USE_FILE_OFFSET64 -fpic \
- -I../../../src/ -I$(top_srcdir)/libglusterfs/src \
- -I$(top_srcdir)/xlators/features/changelog/src \
- -I$(top_srcdir)/rpc/xdr/src -I$(top_srcdir)/rpc/rpc-lib/src \
- -I$(top_srcdir)/rpc/rpc-transport/socket/src \
- -DDATADIR=\"$(localstatedir)\"
+ -I../../../src/ -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/xlators/features/changelog/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -I$(top_srcdir)/rpc/rpc-lib/src \
+ -I$(top_srcdir)/rpc/rpc-transport/socket/src \
+ -DDATADIR=\"$(localstatedir)\"
libgfchangelog_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
- $(top_builddir)/rpc/xdr/src/libgfxdr.la \
- $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la
+ $(top_builddir)/rpc/xdr/src/libgfxdr.la \
+ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la
-libgfchangelog_la_LDFLAGS = $(GF_LDFLAGS) -version-info $(LIBGFCHANGELOG_LT_VERSION)
+libgfchangelog_la_LDFLAGS = $(GF_LDFLAGS) -version-info \
+ $(LIBGFCHANGELOG_LT_VERSION)
libgfchangelogdir = $(includedir)/glusterfs/gfchangelog
lib_LTLIBRARIES = libgfchangelog.la
CONTRIB_BUILDDIR = $(top_builddir)/contrib
-libgfchangelog_la_SOURCES = gf-changelog.c gf-changelog-journal-handler.c gf-changelog-helpers.c \
- gf-changelog-api.c gf-history-changelog.c gf-changelog-rpc.c gf-changelog-reborp.c \
- $(top_srcdir)/xlators/features/changelog/src/changelog-rpc-common.c
+libgfchangelog_la_SOURCES = gf-changelog.c gf-changelog-journal-handler.c \
+ gf-changelog-helpers.c gf-changelog-api.c gf-history-changelog.c \
+ gf-changelog-rpc.c gf-changelog-reborp.c \
+ $(top_srcdir)/xlators/features/changelog/src/changelog-rpc-common.c
-noinst_HEADERS = gf-changelog-helpers.h gf-changelog-rpc.h gf-changelog-journal.h changelog-lib-messages.h
+noinst_HEADERS = gf-changelog-helpers.h gf-changelog-rpc.h \
+ gf-changelog-journal.h changelog-lib-messages.h
CLEANFILES =
diff --git a/xlators/features/changelog/src/Makefile.am b/xlators/features/changelog/src/Makefile.am
index 27af7a5ebd3..eee7dfa238d 100644
--- a/xlators/features/changelog/src/Makefile.am
+++ b/xlators/features/changelog/src/Makefile.am
@@ -3,25 +3,26 @@ xlator_LTLIBRARIES = changelog.la
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
noinst_HEADERS = changelog-helpers.h changelog-mem-types.h changelog-rt.h \
- changelog-rpc-common.h changelog-misc.h changelog-encoders.h \
- changelog-rpc-common.h changelog-rpc.h changelog-ev-handle.h \
- changelog-messages.h
+ changelog-rpc-common.h changelog-misc.h changelog-encoders.h \
+ changelog-rpc-common.h changelog-rpc.h changelog-ev-handle.h \
+ changelog-messages.h
changelog_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
changelog_la_SOURCES = changelog.c changelog-rt.c changelog-helpers.c \
- changelog-encoders.c changelog-rpc.c changelog-barrier.c \
- changelog-rpc-common.c changelog-ev-handle.c
+ changelog-encoders.c changelog-rpc.c changelog-barrier.c \
+ changelog-rpc-common.c changelog-ev-handle.c
changelog_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
- $(top_builddir)/rpc/xdr/src/libgfxdr.la \
- $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la
+ $(top_builddir)/rpc/xdr/src/libgfxdr.la \
+ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
- -I$(top_srcdir)/rpc/xdr/src -I$(top_srcdir)/rpc/rpc-lib/src \
- -I$(top_srcdir)/rpc/rpc-transport/socket/src \
- -I$(top_srcdir)/xlators/features/changelog/lib/src/ \
- -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
- -DDATADIR=\"$(localstatedir)\"
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -I$(top_srcdir)/rpc/rpc-lib/src \
+ -I$(top_srcdir)/rpc/rpc-transport/socket/src \
+ -I$(top_srcdir)/xlators/features/changelog/lib/src/ \
+ -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+ -DDATADIR=\"$(localstatedir)\"
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/features/changetimerecorder/src/Makefile.am b/xlators/features/changetimerecorder/src/Makefile.am
index 503c6db5286..620017e3309 100644
--- a/xlators/features/changetimerecorder/src/Makefile.am
+++ b/xlators/features/changetimerecorder/src/Makefile.am
@@ -7,17 +7,19 @@ endif
changetimerecorder_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
-changetimerecorder_la_SOURCES = changetimerecorder.c ctr-helper.c ctr-xlator-ctx.c
+changetimerecorder_la_SOURCES = changetimerecorder.c \
+ ctr-helper.c ctr-xlator-ctx.c
changetimerecorder_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la\
- $(top_builddir)/libglusterfs/src/gfdb/libgfdb.la
+ $(top_builddir)/libglusterfs/src/gfdb/libgfdb.la
noinst_HEADERS = ctr-messages.h changetimerecorder.h ctr_mem_types.h \
ctr-helper.h ctr-xlator-ctx.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
- -I$(top_srcdir)/libglusterfs/src/gfdb \
- -DDATADIR=\"$(localstatedir)\"
+ -I$(top_srcdir)/libglusterfs/src/gfdb \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -DDATADIR=\"$(localstatedir)\"
AM_CFLAGS = -Wall $(GF_CFLAGS) $(SQLITE_CFLAGS)
diff --git a/xlators/features/compress/src/Makefile.am b/xlators/features/compress/src/Makefile.am
index b7c75e91b92..98271a9f3fc 100644
--- a/xlators/features/compress/src/Makefile.am
+++ b/xlators/features/compress/src/Makefile.am
@@ -9,8 +9,10 @@ cdc_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
cdc_la_SOURCES = cdc.c cdc-helper.c
cdc_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(ZLIB_LIBS)
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src -fPIC \
- -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) $(LIBZ_CFLAGS)
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS) \
+ $(LIBZ_CFLAGS)
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/features/ganesha/src/Makefile.am b/xlators/features/ganesha/src/Makefile.am
new file mode 100644
index 00000000000..54cfcb3ad4d
--- /dev/null
+++ b/xlators/features/ganesha/src/Makefile.am
@@ -0,0 +1,19 @@
+xlator_LTLIBRARIES = ganesha.la
+
+xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
+
+noinst_HEADERS = ganesha.h ganesha-mem-types.h
+
+ganesha_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
+
+ganesha_la_SOURCES = ganesha.c
+
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS)\
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -DGANESHA_DIR=\"$(sysconfdir)/ganesha\" \
+ -DGYSNCD_PREFIX=\"$(libexecdir)/glusterfs\"
+
+AM_CFLAGS = -Wall $(GF_CFLAGS)
+
+CLEANFILES =
diff --git a/xlators/features/gfid-access/src/Makefile.am b/xlators/features/gfid-access/src/Makefile.am
index 3b25f099123..ff95604c4de 100644
--- a/xlators/features/gfid-access/src/Makefile.am
+++ b/xlators/features/gfid-access/src/Makefile.am
@@ -8,7 +8,8 @@ gfid_access_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = gfid-access.h gfid-access-mem-types.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/features/glupy/src/Makefile.am b/xlators/features/glupy/src/Makefile.am
index 9b39b4687a3..f1802c3545e 100644
--- a/xlators/features/glupy/src/Makefile.am
+++ b/xlators/features/glupy/src/Makefile.am
@@ -3,17 +3,25 @@ xlator_LTLIBRARIES = glupy.la
# Ensure GLUSTER_PYTHON_PATH is passed to glupy.so
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
glupydir = $(xlatordir)/glupy
-AM_CPPFLAGS = $(PYTHONDEV_CPPFLAGS) $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src -isystem $(BUILD_PYTHON_INC)
+
+AM_CPPFLAGS = $(PYTHONDEV_CPPFLAGS) $(GF_CPPFLAGS) \
+ -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -isystem $(BUILD_PYTHON_INC)
+
AM_CFLAGS = $(PYTHONDEV_CPPFLAGS) -Wall -fno-strict-aliasing \
- -DGLUSTER_PYTHON_PATH=\"$(glupydir)\" \
- -DPATH_GLUSTERFS_GLUPY_MODULE=\"${xlatordir}/glupy${shrext_cmds}\" \
- $(GF_CFLAGS)
+ -DGLUSTER_PYTHON_PATH=\"$(glupydir)\" \
+ -DPATH_GLUSTERFS_GLUPY_MODULE=\"${xlatordir}/glupy${shrext_cmds}\" \
+ $(GF_CFLAGS)
# Flags to build glupy.so with
-glupy_la_LDFLAGS = $(PYTHONDEV_LDFLAGS) -module -avoid-version -nostartfiles -export-symbols $(top_srcdir)/xlators/features/glupy/src/glupy.sym
+glupy_la_LDFLAGS = $(PYTHONDEV_LDFLAGS) -module -avoid-version \
+ -nostartfiles -export-symbols \
+ $(top_srcdir)/xlators/features/glupy/src/glupy.sym
+
glupy_la_SOURCES = glupy.c
glupy_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
- -lpthread -l$(BUILD_PYTHON_LIB)
+ -lpthread -l$(BUILD_PYTHON_LIB)
noinst_HEADERS = glupy.h
diff --git a/xlators/features/index/src/Makefile.am b/xlators/features/index/src/Makefile.am
index 1e88f119833..6372672bc87 100644
--- a/xlators/features/index/src/Makefile.am
+++ b/xlators/features/index/src/Makefile.am
@@ -8,8 +8,8 @@ index_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = index.h index-mem-types.h index-messages.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) \
- -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/xdr/src \
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
-I$(top_srcdir)/rpc/rpc-lib/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/features/leases/src/Makefile.am b/xlators/features/leases/src/Makefile.am
index 343f5c82425..a7eea66d993 100644
--- a/xlators/features/leases/src/Makefile.am
+++ b/xlators/features/leases/src/Makefile.am
@@ -10,7 +10,8 @@ leases_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = leases.h leases-mem-types.h leases-messages.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
- -I$(CONTRIBDIR)/timer-wheel
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -I$(CONTRIBDIR)/timer-wheel
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/features/locks/src/Makefile.am b/xlators/features/locks/src/Makefile.am
index a3b3855fb9b..2884ec818ba 100644
--- a/xlators/features/locks/src/Makefile.am
+++ b/xlators/features/locks/src/Makefile.am
@@ -4,12 +4,14 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
locks_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
locks_la_SOURCES = common.c posix.c entrylk.c inodelk.c reservelk.c \
- clear.c
+ clear.c
+
locks_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = locks.h common.h locks-mem-types.h clear.h pl-messages.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall -fno-strict-aliasing $(GF_CFLAGS)
diff --git a/xlators/features/mac-compat/src/Makefile.am b/xlators/features/mac-compat/src/Makefile.am
index 1a312991f6b..f9fd21e7322 100644
--- a/xlators/features/mac-compat/src/Makefile.am
+++ b/xlators/features/mac-compat/src/Makefile.am
@@ -8,7 +8,8 @@ mac_compat_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = mac-compat.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/features/marker/src/Makefile.am b/xlators/features/marker/src/Makefile.am
index 0465b02012e..7871448a3e9 100644
--- a/xlators/features/marker/src/Makefile.am
+++ b/xlators/features/marker/src/Makefile.am
@@ -3,12 +3,17 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
marker_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
-marker_la_SOURCES = marker.c marker-quota.c marker-quota-helper.c marker-common.c
+marker_la_SOURCES = marker.c marker-quota.c marker-quota-helper.c \
+ marker-common.c
+
marker_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
-noinst_HEADERS = marker-mem-types.h marker.h marker-quota.h marker-quota-helper.h marker-common.h $(top_builddir)/xlators/lib/src/libxlator.h
+noinst_HEADERS = marker-mem-types.h marker.h marker-quota.h \
+ marker-quota-helper.h marker-common.h \
+ $(top_builddir)/xlators/lib/src/libxlator.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
-I$(top_srcdir)/xlators/lib/src
AM_CFLAGS = -Wall -fno-strict-aliasing $(GF_CFLAGS)
diff --git a/xlators/features/protect/src/Makefile.am b/xlators/features/protect/src/Makefile.am
index 98499712fab..58ca471141c 100644
--- a/xlators/features/protect/src/Makefile.am
+++ b/xlators/features/protect/src/Makefile.am
@@ -4,18 +4,19 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
prot_dht_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
prot_dht_la_SOURCES = prot_dht.c
-prot_dht_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+prot_dht_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
prot_client_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
prot_client_la_SOURCES = prot_client.c
-prot_client_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+prot_client_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
prot_server_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
prot_server_la_SOURCES = prot_server.c
-prot_server_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
+prot_server_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
- -I$(CONTRIBDIR)/libexecinfo
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -I$(CONTRIBDIR)/libexecinfo
AM_CFLAGS = -Wall $(GF_CFLAGS)
CLEANFILES =
diff --git a/xlators/features/quiesce/src/Makefile.am b/xlators/features/quiesce/src/Makefile.am
index 6468669af2a..a6cabb3012d 100644
--- a/xlators/features/quiesce/src/Makefile.am
+++ b/xlators/features/quiesce/src/Makefile.am
@@ -8,7 +8,8 @@ quiesce_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = quiesce.h quiesce-mem-types.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/features/quota/src/Makefile.am b/xlators/features/quota/src/Makefile.am
index a15135347ac..f261aaff8a1 100644
--- a/xlators/features/quota/src/Makefile.am
+++ b/xlators/features/quota/src/Makefile.am
@@ -11,11 +11,12 @@ quotad_la_SOURCES = quotad.c quotad-helpers.c quotad-aggregator.c
quotad_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = quota-mem-types.h quota.h quotad-aggregator.h \
- quotad-helpers.h quota-messages.h
+ quotad-helpers.h quota-messages.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
- -I$(top_srcdir)/xlators/cluster/dht/src -I$(top_srcdir)/rpc/xdr/src/ \
- -I$(top_srcdir)/rpc/rpc-lib/src
+ -I$(top_srcdir)/rpc/xdr/src/ -I$(top_builddir)/rpc/xdr/src/ \
+ -I$(top_srcdir)/rpc/rpc-lib/src \
+ -I$(top_srcdir)/xlators/cluster/dht/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/features/read-only/src/Makefile.am b/xlators/features/read-only/src/Makefile.am
index 3edac3f8a1d..e4a2017ef0d 100644
--- a/xlators/features/read-only/src/Makefile.am
+++ b/xlators/features/read-only/src/Makefile.am
@@ -14,7 +14,8 @@ worm_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
worm_la_SOURCES = read-only-common.c worm-helper.c worm.c
worm_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/features/shard/src/Makefile.am b/xlators/features/shard/src/Makefile.am
index 89173f1203e..bf5700d4bcc 100644
--- a/xlators/features/shard/src/Makefile.am
+++ b/xlators/features/shard/src/Makefile.am
@@ -9,7 +9,8 @@ shard_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = shard.h shard-mem-types.h shard-messages.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/features/snapview-client/src/Makefile.am b/xlators/features/snapview-client/src/Makefile.am
index 72d8a2a1973..a40d2b291ad 100644
--- a/xlators/features/snapview-client/src/Makefile.am
+++ b/xlators/features/snapview-client/src/Makefile.am
@@ -8,7 +8,8 @@ snapview_client_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = snapview-client.h snapview-client-mem-types.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/features/snapview-server/src/Makefile.am b/xlators/features/snapview-server/src/Makefile.am
index 6b588e5d235..d9deb5a093b 100644
--- a/xlators/features/snapview-server/src/Makefile.am
+++ b/xlators/features/snapview-server/src/Makefile.am
@@ -3,19 +3,20 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features
snapview_server_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
-snapview_server_la_SOURCES = snapview-server.c snapview-server-mgmt.c snapview-server-helpers.c
-snapview_server_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la\
- $(top_builddir)/api/src/libgfapi.la\
- $(RLLIBS) $(top_builddir)/rpc/xdr/src/libgfxdr.la \
- $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la
+snapview_server_la_SOURCES = snapview-server.c snapview-server-mgmt.c \
+ snapview-server-helpers.c
+
+snapview_server_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
+ $(top_builddir)/api/src/libgfapi.la \
+ $(RLLIBS) $(top_builddir)/rpc/xdr/src/libgfxdr.la \
+ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la
noinst_HEADERS = snapview-server.h snapview-server-mem-types.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
- -I$(top_srcdir)/api/src \
- -I$(top_srcdir)/rpc/rpc-lib/src \
- -I$(top_srcdir)/rpc/xdr/src \
- -DDATADIR=\"$(localstatedir)\"
+ -I$(top_srcdir)/api/src -I$(top_srcdir)/rpc/rpc-lib/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -DDATADIR=\"$(localstatedir)\"
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/features/trash/src/Makefile.am b/xlators/features/trash/src/Makefile.am
index 1304618cc68..ba3be5aac14 100644
--- a/xlators/features/trash/src/Makefile.am
+++ b/xlators/features/trash/src/Makefile.am
@@ -8,7 +8,8 @@ trash_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = trash.h trash-mem-types.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/features/upcall/src/Makefile.am b/xlators/features/upcall/src/Makefile.am
index 7f63e792281..46a76bd4efe 100644
--- a/xlators/features/upcall/src/Makefile.am
+++ b/xlators/features/upcall/src/Makefile.am
@@ -6,15 +6,15 @@ upcall_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
upcall_la_SOURCES = upcall.c upcall-internal.c
upcall_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
- $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \
- $(top_builddir)/rpc/xdr/src/libgfxdr.la
+ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \
+ $(top_builddir)/rpc/xdr/src/libgfxdr.la
noinst_HEADERS = upcall.h upcall-mem-types.h upcall-messages.h \
upcall-cache-invalidation.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
- -I$(top_srcdir)/rpc/rpc-lib/src \
- -I$(top_srcdir)/rpc/xdr/src
+ -I$(top_srcdir)/rpc/rpc-lib/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall -fno-strict-aliasing $(GF_CFLAGS)
diff --git a/xlators/meta/Makefile.am b/xlators/meta/Makefile.am
index e1c45f3051c..af437a64d6d 100644
--- a/xlators/meta/Makefile.am
+++ b/xlators/meta/Makefile.am
@@ -1 +1 @@
-SUBDIRS=src \ No newline at end of file
+SUBDIRS = src
diff --git a/xlators/meta/src/Makefile.am b/xlators/meta/src/Makefile.am
index df06760b409..29b871d7984 100644
--- a/xlators/meta/src/Makefile.am
+++ b/xlators/meta/src/Makefile.am
@@ -36,7 +36,8 @@ meta_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = meta.h meta-hooks.h meta-mem-types.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/mgmt/glusterd/src/Makefile.am b/xlators/mgmt/glusterd/src/Makefile.am
index 33a1fc48a23..5a7a4a7a9a6 100644
--- a/xlators/mgmt/glusterd/src/Makefile.am
+++ b/xlators/mgmt/glusterd/src/Makefile.am
@@ -12,7 +12,7 @@ glusterd_la_SOURCES = glusterd.c glusterd-handler.c glusterd-sm.c \
glusterd-syncop.c glusterd-hooks.c glusterd-volume-set.c \
glusterd-locks.c glusterd-snapshot.c glusterd-mgmt-handler.c \
glusterd-mgmt.c glusterd-peer-utils.c glusterd-statedump.c \
- glusterd-snapshot-utils.c glusterd-conn-mgmt.c \
+ glusterd-snapshot-utils.c glusterd-conn-mgmt.c \
glusterd-proc-mgmt.c glusterd-svc-mgmt.c glusterd-shd-svc.c \
glusterd-nfs-svc.c glusterd-quotad-svc.c glusterd-svc-helper.c \
glusterd-conn-helper.c glusterd-snapd-svc.c glusterd-snapd-svc-helper.c \
@@ -21,9 +21,9 @@ glusterd_la_SOURCES = glusterd.c glusterd-handler.c glusterd-sm.c \
glusterd_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
- $(top_builddir)/rpc/xdr/src/libgfxdr.la \
- $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \
- $(XML_LIBS) -lcrypto $(URCU_LIBS) $(URCU_CDS_LIBS)
+ $(top_builddir)/rpc/xdr/src/libgfxdr.la \
+ $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la \
+ $(XML_LIBS) -lcrypto $(URCU_LIBS) $(URCU_CDS_LIBS)
if ENABLE_BD_XLATOR
glusterd_la_LIBADD += -llvm2app
endif
@@ -42,10 +42,9 @@ noinst_HEADERS = glusterd.h glusterd-utils.h glusterd-op-sm.h \
$(CONTRIBDIR)/userspace-rcu/rculist-extra.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
- -I$(CONTRIBDIR)/rbtree \
- -I$(top_srcdir)/rpc/xdr/src -I$(top_srcdir)/rpc/rpc-lib/src \
- -I$(CONTRIBDIR)/mount \
- -I$(CONTRIBDIR)/userspace-rcu \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -I$(CONTRIBDIR)/rbtree -I$(top_srcdir)/rpc/rpc-lib/src \
+ -I$(CONTRIBDIR)/mount -I$(CONTRIBDIR)/userspace-rcu \
-DSBIN_DIR=\"$(sbindir)\" -DDATADIR=\"$(localstatedir)\" \
-DGSYNCD_PREFIX=\"$(libexecdir)/glusterfs\" \
-DCONFDIR=\"$(localstatedir)/run/gluster/shared_storage/nfs-ganesha\" \
diff --git a/xlators/mount/fuse/src/Makefile.am b/xlators/mount/fuse/src/Makefile.am
index 2c0235e0927..9392dec9d86 100644
--- a/xlators/mount/fuse/src/Makefile.am
+++ b/xlators/mount/fuse/src/Makefile.am
@@ -29,8 +29,9 @@ fuse_la_SOURCES = fuse-helpers.c fuse-resolve.c fuse-bridge.c \
fuse_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
fuse_la_LIBADD = $(GF_LDADD) @GF_FUSE_LDADD@
-AM_CPPFLAGS = $(GF_CPPFLAGS) \
- -I$(top_srcdir)/libglusterfs/src -I$(CONTRIBDIR)/fuse-include \
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -I$(CONTRIBDIR)/fuse-include \
-I$(CONTRIBDIR)/fuse-lib $(GF_FUSE_CFLAGS)
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/nfs/server/src/Makefile.am b/xlators/nfs/server/src/Makefile.am
index b2831e6990e..bc6f8e9068f 100644
--- a/xlators/nfs/server/src/Makefile.am
+++ b/xlators/nfs/server/src/Makefile.am
@@ -1,13 +1,16 @@
xlator_LTLIBRARIES = server.la
xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/nfs
nfsrpclibdir = $(top_srcdir)/rpc/rpc-lib/src
-server_la_LDFLAGS = -module -avoid-version -export-symbols $(top_srcdir)/xlators/nfs/server/src/nfsserver.sym
+server_la_LDFLAGS = -module -avoid-version -export-symbols \
+ $(top_srcdir)/xlators/nfs/server/src/nfsserver.sym
+
server_la_SOURCES = nfs.c nfs-common.c nfs-fops.c nfs-inodes.c \
nfs-generics.c mount3.c nfs3-fh.c nfs3.c nfs3-helpers.c nlm4.c \
nlmcbk_svc.c mount3udp_svc.c acl3.c netgroups.c exports.c \
mount3-auth.c auth-cache.c
+
server_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
- $(top_builddir)/api/src/libgfapi.la
+ $(top_builddir)/api/src/libgfapi.la
noinst_HEADERS = nfs.h nfs-common.h nfs-fops.h nfs-inodes.h nfs-generics.h \
mount3.h nfs3-fh.h nfs3.h nfs3-helpers.h nfs-mem-types.h nlm4.h \
@@ -15,10 +18,10 @@ noinst_HEADERS = nfs.h nfs-common.h nfs-fops.h nfs-inodes.h nfs-generics.h \
AM_CPPFLAGS = $(GF_CPPFLAGS) \
-DLIBDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/auth\" \
- -I$(top_srcdir)/libglusterfs/src \
- -I$(top_srcdir)/api/src \
+ -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/api/src \
+ -I$(top_srcdir)/rpc/xdr/src/ -I$(top_builddir)/rpc/xdr/src/ \
-I$(nfsrpclibdir) -I$(CONTRIBDIR)/rbtree \
- -I$(top_srcdir)/rpc/xdr/src/ -DDATADIR=\"$(localstatedir)\"
+ -DDATADIR=\"$(localstatedir)\"
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/performance/Makefile.am b/xlators/performance/Makefile.am
index eb4e32cbb14..17162643f33 100644
--- a/xlators/performance/Makefile.am
+++ b/xlators/performance/Makefile.am
@@ -1,3 +1,4 @@
-SUBDIRS = write-behind read-ahead readdir-ahead io-threads io-cache symlink-cache quick-read md-cache open-behind decompounder
+SUBDIRS = write-behind read-ahead readdir-ahead io-threads io-cache \
+ symlink-cache quick-read md-cache open-behind decompounder
CLEANFILES =
diff --git a/xlators/performance/decompounder/src/Makefile.am b/xlators/performance/decompounder/src/Makefile.am
index 693fe0aa5c2..149f2c02000 100644
--- a/xlators/performance/decompounder/src/Makefile.am
+++ b/xlators/performance/decompounder/src/Makefile.am
@@ -7,9 +7,10 @@ decompounder_la_SOURCES = decompounder.c
decompounder_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = decompounder-mem-types.h decompounder-messages.h \
- decompounder.h
+ decompounder.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/performance/io-cache/src/Makefile.am b/xlators/performance/io-cache/src/Makefile.am
index e6ce0bcd44d..bfa34ce5502 100644
--- a/xlators/performance/io-cache/src/Makefile.am
+++ b/xlators/performance/io-cache/src/Makefile.am
@@ -9,6 +9,7 @@ io_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = io-cache.h ioc-mem-types.h io-cache-messages.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
-I$(CONTRIBDIR)/rbtree
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/performance/io-threads/src/Makefile.am b/xlators/performance/io-threads/src/Makefile.am
index 1d09eace2ed..7570cf41ed2 100644
--- a/xlators/performance/io-threads/src/Makefile.am
+++ b/xlators/performance/io-threads/src/Makefile.am
@@ -8,7 +8,8 @@ io_threads_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = io-threads.h iot-mem-types.h io-threads-messages.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/performance/md-cache/src/Makefile.am b/xlators/performance/md-cache/src/Makefile.am
index 95a640ffd21..447ff0f30f0 100644
--- a/xlators/performance/md-cache/src/Makefile.am
+++ b/xlators/performance/md-cache/src/Makefile.am
@@ -9,6 +9,7 @@ md_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = md-cache-mem-types.h md-cache-messages.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
-I$(CONTRIBDIR)/rbtree
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/performance/open-behind/src/Makefile.am b/xlators/performance/open-behind/src/Makefile.am
index 58c3529bbef..41930dcd67d 100644
--- a/xlators/performance/open-behind/src/Makefile.am
+++ b/xlators/performance/open-behind/src/Makefile.am
@@ -8,7 +8,8 @@ open_behind_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = open-behind-mem-types.h open-behind-messages.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/performance/quick-read/src/Makefile.am b/xlators/performance/quick-read/src/Makefile.am
index af4ae7cbfcf..8eb6cece738 100644
--- a/xlators/performance/quick-read/src/Makefile.am
+++ b/xlators/performance/quick-read/src/Makefile.am
@@ -8,7 +8,8 @@ quick_read_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = quick-read.h quick-read-mem-types.h quick-read-messages.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/performance/read-ahead/src/Makefile.am b/xlators/performance/read-ahead/src/Makefile.am
index 0b1878707f7..99efca3660c 100644
--- a/xlators/performance/read-ahead/src/Makefile.am
+++ b/xlators/performance/read-ahead/src/Makefile.am
@@ -8,7 +8,8 @@ read_ahead_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = read-ahead.h read-ahead-mem-types.h read-ahead-messages.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/performance/readdir-ahead/src/Makefile.am b/xlators/performance/readdir-ahead/src/Makefile.am
index e54ab168a09..3d6b6ae951f 100644
--- a/xlators/performance/readdir-ahead/src/Makefile.am
+++ b/xlators/performance/readdir-ahead/src/Makefile.am
@@ -6,9 +6,12 @@ readdir_ahead_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
readdir_ahead_la_SOURCES = readdir-ahead.c
readdir_ahead_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
-noinst_HEADERS = readdir-ahead.h readdir-ahead-mem-types.h readdir-ahead-messages.h
+noinst_HEADERS = readdir-ahead.h readdir-ahead-mem-types.h \
+ readdir-ahead-messages.h
+
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/performance/symlink-cache/src/Makefile.am b/xlators/performance/symlink-cache/src/Makefile.am
index cc36ea99b6a..0bfb03a68de 100644
--- a/xlators/performance/symlink-cache/src/Makefile.am
+++ b/xlators/performance/symlink-cache/src/Makefile.am
@@ -8,7 +8,8 @@ symlink_cache_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = symlink-cache-messages.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/performance/write-behind/src/Makefile.am b/xlators/performance/write-behind/src/Makefile.am
index 4de88eff90a..a6a16fcc080 100644
--- a/xlators/performance/write-behind/src/Makefile.am
+++ b/xlators/performance/write-behind/src/Makefile.am
@@ -8,7 +8,8 @@ write_behind_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = write-behind-mem-types.h write-behind-messages.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/playground/template/src/Makefile.am b/xlators/playground/template/src/Makefile.am
index ef88d4d48bb..92cbe974093 100644
--- a/xlators/playground/template/src/Makefile.am
+++ b/xlators/playground/template/src/Makefile.am
@@ -8,7 +8,8 @@ template_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = template.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/protocol/auth/addr/src/Makefile.am b/xlators/protocol/auth/addr/src/Makefile.am
index 426e7c2fb36..6c8834d3e3e 100644
--- a/xlators/protocol/auth/addr/src/Makefile.am
+++ b/xlators/protocol/auth/addr/src/Makefile.am
@@ -6,9 +6,9 @@ addr_la_LDFLAGS = -module -avoid-version
addr_la_SOURCES = addr.c
addr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
-AM_CPPFLAGS = $(GF_CPPFLAGS) \
- -I$(top_srcdir)/libglusterfs/src \
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
-I$(top_srcdir)/xlators/protocol/server/src \
+ -I$(top_srcdir)/rpc/xdr/src/ -I$(top_builddir)/rpc/xdr/src/ \
-I$(top_srcdir)/rpc/rpc-lib/src/
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/protocol/auth/login/src/Makefile.am b/xlators/protocol/auth/login/src/Makefile.am
index d84db91c4e1..fd4b2d731b2 100644
--- a/xlators/protocol/auth/login/src/Makefile.am
+++ b/xlators/protocol/auth/login/src/Makefile.am
@@ -7,6 +7,7 @@ login_la_SOURCES = login.c
login_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
- -I$(top_srcdir)/xlators/protocol/server/src
+ -I$(top_srcdir)/xlators/protocol/server/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/protocol/client/src/Makefile.am b/xlators/protocol/client/src/Makefile.am
index 75acbc9e877..899db91e683 100644
--- a/xlators/protocol/client/src/Makefile.am
+++ b/xlators/protocol/client/src/Makefile.am
@@ -13,8 +13,8 @@ client_la_SOURCES = client.c client-helpers.c client-rpc-fops.c \
noinst_HEADERS = client.h client-mem-types.h client-messages.h client-common.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) \
- -I$(top_srcdir)/libglusterfs/src \
- -I$(top_srcdir)/rpc/xdr/src -I$(top_srcdir)/rpc/rpc-lib/src/
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -I$(top_srcdir)/rpc/rpc-lib/src/
AM_CFLAGS = -Wall $(GF_CFLAGS)
diff --git a/xlators/protocol/server/src/Makefile.am b/xlators/protocol/server/src/Makefile.am
index bb46fda6f08..d65e5b89957 100644
--- a/xlators/protocol/server/src/Makefile.am
+++ b/xlators/protocol/server/src/Makefile.am
@@ -10,18 +10,17 @@ server_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
server_la_SOURCES = server.c server-resolve.c server-helpers.c \
server-rpc-fops.c server-handshake.c authenticate.c server-common.c
-server_la_HEADERS = server.h server-helpers.h server-mem-types.h authenticate.h \
- server-messages.h server-common.h
+server_la_HEADERS = server.h server-helpers.h server-mem-types.h \
+ authenticate.h server-messages.h server-common.h
server_ladir = $(includedir)/glusterfs/server
-AM_CPPFLAGS = $(GF_CPPFLAGS) \
- -I$(top_srcdir)/libglusterfs/src \
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
-DCONFDIR=\"$(sysconfdir)/glusterfs\" \
-DLIBDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/auth\" \
-I$(top_srcdir)/xlators/protocol/lib/src \
-I$(top_srcdir)/rpc/rpc-lib/src \
- -I$(top_srcdir)/rpc/xdr/src
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS) \
-DDATADIR=\"$(localstatedir)\"
diff --git a/xlators/storage/bd/src/Makefile.am b/xlators/storage/bd/src/Makefile.am
index aad293e0c79..d56b42a1cbb 100644
--- a/xlators/storage/bd/src/Makefile.am
+++ b/xlators/storage/bd/src/Makefile.am
@@ -5,13 +5,14 @@ xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/storage
bd_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
LIBBD = -llvm2app -lrt
bd_la_SOURCES = bd.c bd-helper.c bd-aio.c
-bd_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(LIBBD) $(LIBAIO)
+bd_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
+ $(LIBBD) $(LIBAIO)
noinst_HEADERS = bd.h bd-aio.h bd-mem-types.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
- -I$(top_srcdir)/rpc/xdr/src \
- -I$(top_srcdir)/rpc/rpc-lib/src
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -I$(top_srcdir)/rpc/rpc-lib/src
AM_CFLAGS = -fno-strict-aliasing -Wall $(GF_CFLAGS)
diff --git a/xlators/storage/posix/src/Makefile.am b/xlators/storage/posix/src/Makefile.am
index 4e3fd3dd09e..47e64b0eac3 100644
--- a/xlators/storage/posix/src/Makefile.am
+++ b/xlators/storage/posix/src/Makefile.am
@@ -6,14 +6,14 @@ posix_la_LDFLAGS = -module $(GF_XLATOR_DEFAULT_LDFLAGS)
posix_la_SOURCES = posix.c posix-helpers.c posix-handle.c posix-aio.c
posix_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(LIBAIO) \
- $(ACL_LIBS)
+ $(ACL_LIBS)
noinst_HEADERS = posix.h posix-mem-types.h posix-handle.h posix-aio.h \
- posix-messages.h
+ posix-messages.h
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
- -I$(top_srcdir)/rpc/xdr/src \
- -I$(top_srcdir)/rpc/rpc-lib/src
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src \
+ -I$(top_srcdir)/rpc/rpc-lib/src
AM_CFLAGS = -fno-strict-aliasing -Wall $(GF_CFLAGS)
diff --git a/xlators/system/posix-acl/src/Makefile.am b/xlators/system/posix-acl/src/Makefile.am
index 5c2c716d2cd..c2214ecf4c9 100644
--- a/xlators/system/posix-acl/src/Makefile.am
+++ b/xlators/system/posix-acl/src/Makefile.am
@@ -6,7 +6,8 @@ posix_acl_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = posix-acl.h posix-acl-xattr.h posix-acl-mem-types.h
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)