From: David Goulet Date: Tue, 13 Mar 2012 15:34:28 +0000 (-0400) Subject: Make libcompat independent not to confuse automake X-Git-Tag: v2.0.0-rc3~6 X-Git-Url: https://git.liburcu.org/?a=commitdiff_plain;h=d31efcff675bdd407f300de4ad971b74abb0c38f;p=lttng-tools.git Make libcompat independent not to confuse automake Moving libcompat.la to the compat/ subdirectory and building it before every other libs. (closes #101 #153) Signed-off-by: David Goulet --- diff --git a/configure.ac b/configure.ac index a0f0bad16..3156273df 100644 --- a/configure.ac +++ b/configure.ac @@ -177,6 +177,7 @@ AC_CONFIG_FILES([ src/common/ust-consumer/Makefile src/common/hashtable/Makefile src/common/sessiond-comm/Makefile + src/common/compat/Makefile src/lib/Makefile src/lib/lttng-ctl/Makefile src/bin/Makefile diff --git a/src/bin/lttng-sessiond/Makefile.am b/src/bin/lttng-sessiond/Makefile.am index 88b7c6974..44948fc14 100644 --- a/src/bin/lttng-sessiond/Makefile.am +++ b/src/bin/lttng-sessiond/Makefile.am @@ -32,7 +32,7 @@ lttng_sessiond_LDADD = -lrt -lurcu-common -lurcu \ $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \ $(top_builddir)/src/common/hashtable/libhashtable.la \ $(top_builddir)/src/common/libcommon.la \ - $(top_builddir)/src/common/libcompat.la + $(top_builddir)/src/common/compat/libcompat.la if HAVE_LIBLTTNG_UST_CTL lttng_sessiond_LDADD += -llttng-ust-ctl diff --git a/src/common/Makefile.am b/src/common/Makefile.am index ba93810a8..5d79210b8 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = -SUBDIRS = hashtable kernel-ctl sessiond-comm kernel-consumer ust-consumer +SUBDIRS = compat hashtable kernel-ctl sessiond-comm kernel-consumer ust-consumer AM_CFLAGS = -fno-strict-aliasing @@ -10,17 +10,6 @@ noinst_LTLIBRARIES = libcommon.la libcommon_la_SOURCES = runas.c runas.h common.h -if COMPAT_EPOLL -COMPAT=compat/compat-epoll.c -else -COMPAT=compat/compat-poll.c -endif - -noinst_LTLIBRARIES += libcompat.la - -libcompat_la_SOURCES = compat/poll.h compat/fcntl.h compat/splice.h compat/endian.h \ - compat/socket.h compat/compat-fcntl.c $(COMPAT) - # Consumer library noinst_LTLIBRARIES += libconsumer.la @@ -30,7 +19,7 @@ libconsumer_la_LIBADD = \ $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \ $(top_builddir)/src/common/kernel-consumer/libkernel-consumer.la \ $(top_builddir)/src/common/hashtable/libhashtable.la \ - $(top_builddir)/src/common/libcompat.la + $(top_builddir)/src/common/compat/libcompat.la if HAVE_LIBLTTNG_UST_CTL libconsumer_la_LIBADD += \ diff --git a/src/common/compat/Makefile.am b/src/common/compat/Makefile.am new file mode 100644 index 000000000..ee5aabaf8 --- /dev/null +++ b/src/common/compat/Makefile.am @@ -0,0 +1,12 @@ +AM_CPPFLAGS = -I$(top_srcdir)/include + +noinst_LTLIBRARIES = libcompat.la + +if COMPAT_EPOLL +COMPAT=compat-epoll.c +else +COMPAT=compat-poll.c +endif + +libcompat_la_SOURCES = poll.h fcntl.h splice.h endian.h \ + socket.h compat-fcntl.c $(COMPAT)