2017-05-08 12:55:49 -04:00
SOURCES = site.h
build: libgfxdr.so calls GF_FREE(), needs to link with -lglusterfs
The previous change to remove the xdrgen script exposed (or
created) a recursive build dependency: libglusterfs needs the
generated headers, and libgfxdr should be linked with libglusterfs
for GF_FREE/__gf_free.
(Much grumbling about libglusterfs being the kitchen sink of gluster
elided. This would not be necessary if there were two or more libs,
a gluster "runtime" library with common gluster code shared by the
xlators and daemons, and a utility library with things like the
rbtree, memory allocation, and whatnot.)
So. Link at build time or link at runtime? For truth-and-beauty, link
with libglusterfs.so at build time. Without truth-and-beauty, don't
link with libglusterfs and rely on the other things that link with
libglusterfs to provide resolution of __gf_free().
Truth-and-beauty it is. But how to generate the headers first, then
build libglusterfs, then come back and build libgfxdr? Autotools is a
maze of twisty passages, all different. Things that work with gnu
make on linux don't work with the BSD make. Finally I hit on this
solution. Add a shadow directory where make only generates the headers,
then build libglusterfs using the generated headers, and finally build
libgfxdr and link with libglusterfs.
See original BZ 1330604
change http://review.gluster.org/14085
Change-Id: Iede8a30e3103176cb8f0b054885f30fcb352492b
BUG: 1429696
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: https://review.gluster.org/16873
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2017-03-08 14:44:50 -05:00
2012-07-12 15:51:41 -07:00
EXTRA_DIST = autogen.sh \
2018-04-16 13:49:44 +05:30
COPYING-GPLV2 COPYING-LGPLV3 COMMITMENT \
2015-02-23 20:50:37 +05:30
INSTALL README.md AUTHORS THANKS NEWS \
2015-02-18 19:45:23 +05:30
glusterfs.spec glusterfs-api.pc.in libgfchangelog.pc.in libgfdb.pc.in \
2014-05-08 12:30:23 -03:00
run-tests.sh \
2014-02-27 12:39:43 +05:30
build-aux/pkg-version \
2014-10-06 22:46:44 +02:00
contrib/umountd \
2013-09-15 19:56:25 -07:00
$( shell find $( top_srcdir) /tests -type f -print)
2009-02-18 17:36:07 +05:30
build: libgfxdr.so calls GF_FREE(), needs to link with -lglusterfs
The previous change to remove the xdrgen script exposed (or
created) a recursive build dependency: libglusterfs needs the
generated headers, and libgfxdr should be linked with libglusterfs
for GF_FREE/__gf_free.
(Much grumbling about libglusterfs being the kitchen sink of gluster
elided. This would not be necessary if there were two or more libs,
a gluster "runtime" library with common gluster code shared by the
xlators and daemons, and a utility library with things like the
rbtree, memory allocation, and whatnot.)
So. Link at build time or link at runtime? For truth-and-beauty, link
with libglusterfs.so at build time. Without truth-and-beauty, don't
link with libglusterfs and rely on the other things that link with
libglusterfs to provide resolution of __gf_free().
Truth-and-beauty it is. But how to generate the headers first, then
build libglusterfs, then come back and build libgfxdr? Autotools is a
maze of twisty passages, all different. Things that work with gnu
make on linux don't work with the BSD make. Finally I hit on this
solution. Add a shadow directory where make only generates the headers,
then build libglusterfs using the generated headers, and finally build
libgfxdr and link with libglusterfs.
See original BZ 1330604
change http://review.gluster.org/14085
Change-Id: Iede8a30e3103176cb8f0b054885f30fcb352492b
BUG: 1429696
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: https://review.gluster.org/16873
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2017-03-08 14:44:50 -05:00
SUBDIRS = $( ARGP_STANDALONE_DIR) rpc/xdr/gen libglusterfs rpc api xlators \
2016-04-26 17:04:04 -04:00
glusterfsd $( FUSERMOUNT_SUBDIR) doc extras cli heal \
@SYNCDAEMON_SUBDIR@ @UMOUNTD_SUBDIR@ tools events
2009-02-18 17:36:07 +05:30
2012-07-12 15:51:41 -07:00
pkgconfigdir = @pkgconfigdir@
2015-05-17 15:26:03 +02:00
pkgconfig_DATA = glusterfs-api.pc libgfchangelog.pc
i f U S E _ G F D B
pkgconfig_DATA += libgfdb.pc
e n d i f
2012-07-12 15:51:41 -07:00
2015-11-13 14:07:03 -05:00
CLEANFILES = glusterfs-api.pc libgfchangelog.pc libgfdb.pc \
2018-02-06 14:27:00 +05:30
contrib/umountd/Makefile
2009-02-18 17:36:07 +05:30
2009-03-09 10:31:53 -07:00
gitclean : distclean
2009-02-18 17:36:07 +05:30
find . -name Makefile.in -exec rm -f { } \;
find . -name mount.glusterfs -exec rm -f { } \;
rm -fr autom4te.cache
rm -f missing aclocal.m4 config.h.in config.guess config.sub ltmain.sh install-sh configure depcomp
2012-11-26 20:02:18 -08:00
2017-10-10 13:23:50 +02:00
# dist-hook gets executed with 'make dist', this is the only target getting
# executed, a dist-hook in other Makefile.am files seem to get ignored.
2014-02-27 12:39:43 +05:30
dist-hook : gen -VERSION gen -ChangeLog
2015-01-19 10:20:28 +01:00
-rm -fr $( distdir) /contrib/umountd/.deps
2017-10-10 13:23:50 +02:00
-rm -f $( distdir) /events/src/eventtypes.py
-rm -f $( distdir) /tests/env.rc
2016-05-23 11:06:38 +02:00
-cp -f $( top_srcdir) /build-aux/config.sub.dist $( distdir) /config.sub
-cp -f $( top_srcdir) /build-aux/config.guess.dist $( distdir) /config.guess
2015-01-19 10:20:28 +01:00
2015-06-04 14:55:17 +05:30
.PHONY : gen -VERSION gen -ChangeLog clang -check
clang-check :
@$( top_srcdir) /extras/clang-checker.sh
2014-02-27 12:39:43 +05:30
gen-ChangeLog :
2013-01-30 11:29:54 -05:00
( cd $( srcdir) && git diff && echo = = = = = git log = = = = && git log) > $( distdir) /ChangeLog
2014-02-27 12:39:43 +05:30
2016-04-26 17:04:04 -04:00
.PHONY : gen -VERSION
2014-02-27 12:39:43 +05:30
gen-VERSION :
2015-06-17 23:33:25 +02:00
if test -d $( top_srcdir) /.git; then \
cd $( top_srcdir) ; \
./build-aux/pkg-version --full \
> $( abs_top_builddir) /$( distdir) /VERSION; \
2014-02-27 12:39:43 +05:30
fi
2016-04-26 17:04:04 -04:00