From 6e2d116c6138874c0357b1afb1db5aa7cd80ceb6 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Wed, 20 Jul 2011 10:23:16 -0400 Subject: [PATCH] Fix build system for valid make dist Signed-off-by: David Goulet --- Makefile.am | 3 ++- configure.ac | 17 +++++++++++++---- include/Makefile.am | 2 +- libkernelctl/Makefile.am | 2 +- liblttkconsumerd/Makefile.am | 2 +- liblttsessiondcomm/Makefile.am | 1 + ltt-sessiond/Makefile.am | 3 ++- lttng/Makefile.am | 4 ++-- lttng/commands/add_context.c | 6 +++--- lttng/commands/create.c | 6 +++--- lttng/commands/destroy.c | 6 +++--- lttng/commands/disable_channels.c | 6 +++--- lttng/commands/disable_events.c | 6 +++--- lttng/commands/enable_channels.c | 6 +++--- lttng/commands/enable_events.c | 6 +++--- lttng/commands/list.c | 2 +- lttng/commands/set_session.c | 6 +++--- lttng/commands/start.c | 6 +++--- lttng/commands/stop.c | 6 +++--- lttng/commands/version.c | 4 +--- 20 files changed, 55 insertions(+), 45 deletions(-) diff --git a/Makefile.am b/Makefile.am index fe1c45cef..3d86d6e66 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,4 +9,5 @@ SUBDIRS = liblttsessiondcomm \ lttng \ ltt-kconsumerd \ ltt-sessiond \ - tests + tests \ + include diff --git a/configure.ac b/configure.ac index fdc8b6ff5..266117383 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,9 @@ -AC_INIT([lttng-tools], [0.0.1], [david.goulet@polymtl.ca], [http://lttng.org]) +AC_INIT([lttng-tools], [0.0.1], [david.goulet@polymtl.ca], ,[http://lttng.org]) AC_CONFIG_AUX_DIR([config]) +AC_CANONICAL_TARGET +AC_CANONICAL_HOST AC_CONFIG_MACRO_DIR([config]) -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE([foreign]) AM_SILENT_RULES([yes]) AC_CHECK_HEADERS([ \ @@ -25,11 +27,18 @@ AC_CHECK_DECL([cds_list_add], [], [AC_MSG_ERROR([liburcu 0.5.4 or newer is needed])], [[#include ]] ) -CFLAGS="-Wall $CFLAGS -g -fno-strict-aliasing" - AC_PROG_CC AC_PROG_LIBTOOL +CFLAGS="-Wall $CFLAGS -g -fno-strict-aliasing" + +DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir)" + +lttngincludedir="${includedir}/lttng" + +AC_SUBST(lttngincludedir) +AC_SUBST(DEFAULT_INCLUDES) + AC_CONFIG_FILES([ Makefile include/Makefile diff --git a/include/Makefile.am b/include/Makefile.am index d30101f8e..1f5dbd95c 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,3 +1,3 @@ -#nobase_include_HEADERS = lttng/lttng.h +lttnginclude_HEADERS = lttng/lttng.h noinst_HEADERS = lttngerr.h lttng-kernel.h lttng-kconsumerd.h lttng-share.h diff --git a/libkernelctl/Makefile.am b/libkernelctl/Makefile.am index 62781eacc..dac301d39 100644 --- a/libkernelctl/Makefile.am +++ b/libkernelctl/Makefile.am @@ -2,4 +2,4 @@ AM_CPPFLAGS = -I$(top_srcdir)/include noinst_LTLIBRARIES = libkernelctl.la -libkernelctl_la_SOURCES = libkernelctl.c +libkernelctl_la_SOURCES = libkernelctl.c libkernelctl.h kernel-ioctl.h diff --git a/liblttkconsumerd/Makefile.am b/liblttkconsumerd/Makefile.am index 86967bed3..5594ee03b 100644 --- a/liblttkconsumerd/Makefile.am +++ b/liblttkconsumerd/Makefile.am @@ -2,7 +2,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/liblttkconsumerd -I$(top_s lib_LTLIBRARIES = liblttkconsumerd.la -liblttkconsumerd_la_SOURCES = liblttkconsumerd.c +liblttkconsumerd_la_SOURCES = liblttkconsumerd.c liblttkconsumerd.h liblttkconsumerd_la_LIBADD = \ $(top_builddir)/libkernelctl/libkernelctl.la \ diff --git a/liblttsessiondcomm/Makefile.am b/liblttsessiondcomm/Makefile.am index 8c0d83450..24437c7bf 100644 --- a/liblttsessiondcomm/Makefile.am +++ b/liblttsessiondcomm/Makefile.am @@ -3,4 +3,5 @@ AM_CPPFLAGS = -I$(top_srcdir)/include noinst_LTLIBRARIES = liblttsessiondcomm.la liblttsessiondcomm_la_SOURCES = \ + liblttsessiondcomm.h \ liblttsessiondcomm.c diff --git a/ltt-sessiond/Makefile.am b/ltt-sessiond/Makefile.am index 6242325d0..13c272a24 100644 --- a/ltt-sessiond/Makefile.am +++ b/ltt-sessiond/Makefile.am @@ -5,7 +5,8 @@ AM_CFLAGS = -fno-strict-aliasing bin_PROGRAMS = ltt-sessiond -ltt_sessiond_SOURCES = utils.c trace.c session.c traceable-app.c ust-ctl.c kernel-ctl.c main.c +ltt_sessiond_SOURCES = utils.c trace.c session.c traceable-app.c ust-ctl.c kernel-ctl.c main.c \ + utils.h trace.h session.h traceable-app.h ust-ctl.h kernel-ctl.h ltt-sessiond.h ltt_sessiond_LDADD = \ $(top_builddir)/liblttsessiondcomm/liblttsessiondcomm.la \ diff --git a/lttng/Makefile.am b/lttng/Makefile.am index 91cf32bfa..7a828006b 100644 --- a/lttng/Makefile.am +++ b/lttng/Makefile.am @@ -2,13 +2,13 @@ AM_CPPFLAGS = -I$(top_srcdir)/include bin_PROGRAMS = lttng -lttng_SOURCES = conf.c commands/start.c \ +lttng_SOURCES = cmd.h conf.c conf.h commands/start.c \ commands/list.c commands/create.c commands/destroy.c \ commands/stop.c commands/enable_events.c \ commands/disable_events.c commands/enable_channels.c \ commands/disable_channels.c commands/add_context.c \ commands/set_session.c commands/version.c \ - utils.c lttng.c + utils.c utils.h lttng.c lttng_LDADD = \ $(top_builddir)/liblttngctl/liblttngctl.la diff --git a/lttng/commands/add_context.c b/lttng/commands/add_context.c index 76620e74b..edc8f37ac 100644 --- a/lttng/commands/add_context.c +++ b/lttng/commands/add_context.c @@ -25,9 +25,9 @@ #include #include -#include "cmd.h" -#include "conf.h" -#include "utils.h" +#include "../cmd.h" +#include "../conf.h" +#include "../utils.h" static char *opt_event_name; static char *opt_channel_name; diff --git a/lttng/commands/create.c b/lttng/commands/create.c index 22065e17f..4eb9809c7 100644 --- a/lttng/commands/create.c +++ b/lttng/commands/create.c @@ -26,9 +26,9 @@ #include #include -#include "cmd.h" -#include "conf.h" -#include "utils.h" +#include "../cmd.h" +#include "../conf.h" +#include "../utils.h" static char *opt_output_path; static char *opt_session_name; diff --git a/lttng/commands/destroy.c b/lttng/commands/destroy.c index 1eca989e6..516f8ab95 100644 --- a/lttng/commands/destroy.c +++ b/lttng/commands/destroy.c @@ -25,9 +25,9 @@ #include #include -#include "cmd.h" -#include "conf.h" -#include "utils.h" +#include "../cmd.h" +#include "../conf.h" +#include "../utils.h" static char *opt_session_name; diff --git a/lttng/commands/disable_channels.c b/lttng/commands/disable_channels.c index 655eb95d0..c23019b45 100644 --- a/lttng/commands/disable_channels.c +++ b/lttng/commands/disable_channels.c @@ -25,9 +25,9 @@ #include #include -#include "cmd.h" -#include "conf.h" -#include "utils.h" +#include "../cmd.h" +#include "../conf.h" +#include "../utils.h" static char *opt_channels; static char *opt_kernel; diff --git a/lttng/commands/disable_events.c b/lttng/commands/disable_events.c index ae3913f91..952b2b65c 100644 --- a/lttng/commands/disable_events.c +++ b/lttng/commands/disable_events.c @@ -25,9 +25,9 @@ #include #include -#include "cmd.h" -#include "conf.h" -#include "utils.h" +#include "../cmd.h" +#include "../conf.h" +#include "../utils.h" static char *opt_event_list; static char *opt_kernel; diff --git a/lttng/commands/enable_channels.c b/lttng/commands/enable_channels.c index f149cc745..1878096bf 100644 --- a/lttng/commands/enable_channels.c +++ b/lttng/commands/enable_channels.c @@ -25,9 +25,9 @@ #include #include -#include "cmd.h" -#include "conf.h" -#include "utils.h" +#include "../cmd.h" +#include "../conf.h" +#include "../utils.h" static char *opt_channels; static char *opt_kernel; diff --git a/lttng/commands/enable_events.c b/lttng/commands/enable_events.c index 3e35a6c38..70caf6fbb 100644 --- a/lttng/commands/enable_events.c +++ b/lttng/commands/enable_events.c @@ -25,9 +25,9 @@ #include #include -#include "cmd.h" -#include "conf.h" -#include "utils.h" +#include "../cmd.h" +#include "../conf.h" +#include "../utils.h" static char *opt_event_list; static int opt_event_type; diff --git a/lttng/commands/list.c b/lttng/commands/list.c index 241a04345..52c44eeb6 100644 --- a/lttng/commands/list.c +++ b/lttng/commands/list.c @@ -22,7 +22,7 @@ #include #include -#include "cmd.h" +#include "../cmd.h" static int opt_pid; static int opt_channels; diff --git a/lttng/commands/set_session.c b/lttng/commands/set_session.c index 86e81f513..df0297f9f 100644 --- a/lttng/commands/set_session.c +++ b/lttng/commands/set_session.c @@ -25,9 +25,9 @@ #include #include -#include "cmd.h" -#include "conf.h" -#include "utils.h" +#include "../cmd.h" +#include "../conf.h" +#include "../utils.h" static char *opt_session_name; diff --git a/lttng/commands/start.c b/lttng/commands/start.c index 710458b6c..2eacc462f 100644 --- a/lttng/commands/start.c +++ b/lttng/commands/start.c @@ -25,9 +25,9 @@ #include #include -#include "cmd.h" -#include "conf.h" -#include "utils.h" +#include "../cmd.h" +#include "../conf.h" +#include "../utils.h" static char *opt_session_name; diff --git a/lttng/commands/stop.c b/lttng/commands/stop.c index c79a553d1..87862b4b9 100644 --- a/lttng/commands/stop.c +++ b/lttng/commands/stop.c @@ -25,9 +25,9 @@ #include #include -#include "cmd.h" -#include "conf.h" -#include "utils.h" +#include "../cmd.h" +#include "../conf.h" +#include "../utils.h" static char *opt_session_name; diff --git a/lttng/commands/version.c b/lttng/commands/version.c index 2fc86035f..7b8852308 100644 --- a/lttng/commands/version.c +++ b/lttng/commands/version.c @@ -25,9 +25,7 @@ #include #include -#include "cmd.h" -#include "conf.h" -#include "utils.h" +#include "../cmd.h" enum { OPT_HELP = 1, -- 2.34.1