Backport:Fix: Don't override user variables within the build system
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 2 May 2017 17:18:33 +0000 (13:18 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 21 Sep 2018 04:00:52 +0000 (00:00 -0400)
Backport: This is necessery for the following commit regarding extra
          version information. Mostly move the AM_CPPFLAGS to the
  configure.ac file.

Instead use the appropriately prefixed AM_* variables as to not interfere
when a user variable is passed to a make command. The proper use of flag
variables is documented at :

https://www.gnu.org/software/automake/manual/automake.html#Flag-Variables-Ordering

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
55 files changed:
configure.ac
extras/bindings/swig/python/Makefile.am
extras/core-handler/Makefile.am
src/bin/lttng-consumerd/Makefile.am
src/bin/lttng-crash/Makefile.am
src/bin/lttng-relayd/Makefile.am
src/bin/lttng-sessiond/Makefile.am
src/bin/lttng/Makefile.am
src/bin/lttng/commands/enable_events.c
src/common/Makefile.am
src/common/compat/Makefile.am
src/common/config/Makefile.am
src/common/consumer/Makefile.am
src/common/daemonize.c
src/common/defaults.h
src/common/hashtable/Makefile.am
src/common/health/Makefile.am
src/common/index/Makefile.am
src/common/kernel-consumer/Makefile.am
src/common/kernel-ctl/Makefile.am
src/common/relayd/Makefile.am
src/common/sessiond-comm/Makefile.am
src/common/testpoint/Makefile.am
src/common/ust-consumer/Makefile.am
src/lib/lttng-ctl/Makefile.am
src/lib/lttng-ctl/filter/Makefile.am
tests/regression/kernel/Makefile.am
tests/regression/tools/crash/Makefile.am
tests/regression/tools/filtering/Makefile.am
tests/regression/tools/health/Makefile.am
tests/regression/tools/live/Makefile.am
tests/regression/tools/mi/Makefile.am
tests/regression/tools/wildcard/Makefile.am
tests/regression/ust/baddr-statedump/Makefile.am
tests/regression/ust/clock-override/Makefile.am
tests/regression/ust/daemon/Makefile.am
tests/regression/ust/exit-fast/Makefile.am
tests/regression/ust/fork/Makefile.am
tests/regression/ust/getcpu-override/Makefile.am
tests/regression/ust/high-throughput/Makefile.am
tests/regression/ust/libc-wrapper/Makefile.am
tests/regression/ust/linking/Makefile.am
tests/regression/ust/low-throughput/Makefile.am
tests/regression/ust/multi-session/Makefile.am
tests/regression/ust/overlap/demo/Makefile.am
tests/regression/ust/type-declarations/Makefile.am
tests/regression/ust/ust-dl/Makefile.am
tests/unit/Makefile.am
tests/unit/ini_config/Makefile.am
tests/unit/test_utils_expand_path.c
tests/unit/test_utils_parse_size_suffix.c
tests/utils/Makefile.am
tests/utils/testapp/gen-ust-events/Makefile.am
tests/utils/testapp/gen-ust-nevents/Makefile.am
tests/utils/testapp/gen-ust-tracef/Makefile.am

index 6455e574cd8cca23cebd2fe9fc73ca92473f4578..2139cd3c6bb283984363850523930fb1e926086d 100644 (file)
@@ -8,7 +8,7 @@ AC_CONFIG_MACRO_DIR([m4])
 AC_CANONICAL_TARGET
 AC_CANONICAL_HOST
 
-AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip tar-pax])
+AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip tar-pax nostdinc])
 AM_MAINTAINER_MODE([enable])
 
 # Enable silent rules if available (Introduced in AM 1.11)
@@ -59,9 +59,6 @@ AS_IF([test "x$ax_cv___attribute__" = "xyes"],
         [AC_MSG_ERROR([The compiler does not support __attribute__ extensions])])
 
 AX_PTHREAD(,[AC_MSG_ERROR([Could not configure pthreads support])])
-LIBS="$PTHREAD_LIBS $LIBS"
-CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-CC="$PTHREAD_CC"
 
 AX_LIB_SOCKET_NSL
 
@@ -436,7 +433,7 @@ AC_ARG_WITH(kmod-prefix,
                [Specify the installation prefix of the kmod library.
                Headers must be in PATH/include; libraries in PATH/lib.]),
                [
-                       CPPFLAGS="$CPPFLAGS -I${withval}/include"
+                       AM_CPPFLAGS="$AM_CPPFLAGS -I${withval}/include"
                        LDFLAGS="$LDFLAGS -L${withval}/lib64 -L${withval}/lib"
                ])
 
@@ -461,7 +458,7 @@ AC_ARG_WITH(lttng-ust-prefix,
                  [Specify the installation prefix of the lttng-ust library.
                  Headers must be in PATH/include; libraries in PATH/lib.]),
                  [
-                   CPPFLAGS="$CPPFLAGS -I${withval}/include"
+                   AM_CPPFLAGS="$AM_CPPFLAGS -I${withval}/include"
                    LDFLAGS="$LDFLAGS -L${withval}/lib64 -L${withval}/lib"
                  ])
 
@@ -958,9 +955,11 @@ modify their sources.
 # export flex condition
 AM_CONDITIONAL([HAVE_FLEX], [test "x$have_flex" = "xyes"])
 
-CFLAGS="-Wall $CFLAGS -g -fno-strict-aliasing"
+AM_CFLAGS="-Wall -fno-strict-aliasing $PTHREAD_CFLAGS"
+AC_SUBST(AM_CFLAGS)
 
-DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir) -I\$(top_builddir)/src -I\$(top_builddir)/include -include config.h"
+AM_CPPFLAGS="-I\$(top_srcdir)/include -I\$(top_builddir)/include -I\$(top_srcdir)/src -include config.h $AM_CPPFLAGS"
+AC_SUBST(AM_CPPFLAGS)
 
 lttngincludedir="${includedir}/lttng"
 
index af1daf87c1f2fc8a7e839945e6ade224586ac404..25f0a4395d18089838e634e2d35c0771fae66ae9 100644 (file)
@@ -1,7 +1,7 @@
 lttng.i: lttng.i.in
        $(SED) "s/LTTNG_VERSION_STR/LTTng $(PACKAGE_VERSION)/g" < $(srcdir)/lttng.i.in >lttng.i
 
-AM_CFLAGS = $(PYTHON_INCLUDE) -I$(top_srcdir)/include
+AM_CPPFLAGS += $(PYTHON_INCLUDE)
 
 EXTRA_DIST = lttng.i.in
 nodist_python_PYTHON = lttng.py
index eaa6b16c58c35078441845bd28ebbff1c2e7b8cc..63ee13bb017ae7aedc8440295269c668a6f9ff61 100644 (file)
@@ -1,6 +1,3 @@
-AM_CFLAGS = -O2 -g
-AM_LDFLAGS =
-
 noinst_PROGRAMS = crash
 crash_SOURCES = crash.c
 
index acb8d7d44b896ba639245cf8f6a4f05375e6cba8..0cd5b8a2d8946879aaf523e296d5e9b1fb9f77a3 100644 (file)
@@ -1,5 +1,3 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
-
 lttnglibexec_PROGRAMS = lttng-consumerd
 
 lttng_consumerd_SOURCES = lttng-consumerd.c \
index a0adfbc84f28df3e967c3e0e6ae253260c5bd098..a910b5b1ae26f10902514cf7c65b7143882401cc 100644 (file)
@@ -1,5 +1,4 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src \
-                         -DINSTALL_BIN_PATH=\""$(bindir)"\"
+AM_CPPFLAGS += -DINSTALL_BIN_PATH=\""$(bindir)"\"
 
 bin_PROGRAMS = lttng-crash
 
index d820b92485214c77b3fe51a9c830362a28cc58a4..07bc29c175a7705adc5ed481345467cfbbf6929b 100644 (file)
@@ -1,6 +1,5 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src \
-                         -DINSTALL_BIN_PATH=\""$(lttnglibexecdir)"\" \
-                         -DINSTALL_LIB_PATH=\""$(libdir)"\"
+AM_CPPFLAGS += -DINSTALL_BIN_PATH=\""$(lttnglibexecdir)"\" \
+       -DINSTALL_LIB_PATH=\""$(libdir)"\"
 
 AM_CFLAGS = -fno-strict-aliasing
 
index c4849488f157e4480466515b4654c2205d9f6104..827de138e08a81ad727fef4c815df44a6d375478 100644 (file)
@@ -1,6 +1,5 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src \
-                         -DINSTALL_BIN_PATH=\""$(lttnglibexecdir)"\" \
-                         -DINSTALL_LIB_PATH=\""$(libdir)"\"
+AM_CPPFLAGS +=-DINSTALL_BIN_PATH=\""$(lttnglibexecdir)"\" \
+       -DINSTALL_LIB_PATH=\""$(libdir)"\"
 
 AM_CFLAGS = -fno-strict-aliasing
 
index 03aa31bd04e153e41afaba8d127c80cd123c60bb..2aaaae811b434315651da605438cb7baa2d02317 100644 (file)
@@ -1,5 +1,4 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src \
-                         -DINSTALL_BIN_PATH=\""$(bindir)"\"
+AM_CPPFLAGS += -DINSTALL_BIN_PATH=\""$(bindir)"\"
 
 AUTOMAKE_OPTIONS = subdir-objects
 
index f5e8ba61abbcaf78fc59f2a973b5bbd9d33b8f8e..cf9d9e9498c34fcd676c2814e033293ab9c7b12b 100644 (file)
@@ -26,7 +26,7 @@
 #include <inttypes.h>
 #include <ctype.h>
 
-#include <src/common/sessiond-comm/sessiond-comm.h>
+#include <common/sessiond-comm/sessiond-comm.h>
 #include <common/compat/string.h>
 
 /* Mi dependancy */
index 7cbc11cb2b5161882b824611f333ffaf21bd9059..29a35e6adfb422451b20d0ad76459896293b0f87 100644 (file)
@@ -1,5 +1,3 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
-
 AUTOMAKE_OPTIONS = subdir-objects
 
 SUBDIRS =
@@ -57,8 +55,6 @@ if BUILD_LIB_CONSUMER
 SUBDIRS += consumer
 endif
 
-AM_CFLAGS = -fno-strict-aliasing
-
 noinst_HEADERS = lttng-kernel.h defaults.h macros.h error.h futex.h \
                                 uri.h utils.h lttng-kernel-old.h \
                                 align.h bitfield.h bug.h time.h
index 2d2b02a0d5c8dee442831283532b77f758f3b1cc..c5418baebec2c738ccc3448c285246b642e7e227 100644 (file)
@@ -1,5 +1,3 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
-
 noinst_LTLIBRARIES = libcompat.la
 
 if COMPAT_EPOLL
index afc83f26f377b01e29f37f44fdbd69a658fa0df6..dbb47b818cc0b654af11b76fea23d5fc8075ca8e 100644 (file)
@@ -1,5 +1,3 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
-
 noinst_LTLIBRARIES = libconfig.la
 
 libconfig_la_SOURCES = ini.c ini.h session-config.c session-config.h \
index 029fb1d68354d09b0f966e96a22cd8085bdf3918..c628312892c1b6adf44632659493f712f53a97a9 100644 (file)
@@ -1,5 +1,3 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
-
 # Consumer library
 noinst_LTLIBRARIES = libconsumer.la
 
index d5f5ffda5f14e2a4a85b3bdb4291206ff9affeea..40cef3840000a9a44848d779f531a9ea400ae983 100644 (file)
@@ -25,8 +25,8 @@
 
 #include <urcu/system.h>
 
-#include <src/common/daemonize.h>
-#include <src/common/error.h>
+#include <common/daemonize.h>
+#include <common/error.h>
 
 LTTNG_HIDDEN
 int lttng_daemonize(pid_t *child_ppid, int *completion_flag,
index efe7f3058c79f96ce46ee9954ac5d30052ed9c5a..5f4d4d0b936a755bd0d21b046e697f072d68ce62 100644 (file)
@@ -21,7 +21,7 @@
 #define _DEFAULTS_H
 
 #include <pthread.h>
-#include <src/common/macros.h>
+#include <common/macros.h>
 
 /* Default unix group name for tracing. */
 #define DEFAULT_TRACING_GROUP                   "tracing"
index 765f64953ef841389adf2b8b87a58bf24c6ad146..000afd05d10e393710763205206e2b9243dfbe50 100644 (file)
@@ -1,5 +1,3 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
-
 noinst_LTLIBRARIES = libhashtable.la
 
 libhashtable_la_SOURCES = hashtable.c hashtable.h \
index d82f9de9ecf33bcf5b30d73e45c17311bb48139d..727c2f900c472f9f61b1a6513af37972e29470bb 100644 (file)
@@ -1,5 +1,3 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
-
 noinst_LTLIBRARIES = libhealth.la
 
 libhealth_la_SOURCES = health.c
index 054b0aa54bb9457e50cd4236dcaf8f0831606723..ee73ea2ca31ecc79b9f902b36b4b66e7c9d79ec1 100644 (file)
@@ -1,5 +1,3 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
-
 noinst_LTLIBRARIES = libindex.la
 
 libindex_la_SOURCES = index.c index.h ctf-index.h
index ed5462a6597fa50999bea7a216dd562b9087fef5..008041e1d8064b7669def0d28a3a950ab11a502a 100644 (file)
@@ -1,5 +1,3 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
-
 # Kernel consumer library
 noinst_LTLIBRARIES = libkernel-consumer.la
 
index ab057dd3618b8abada4f04e8baf4d589d28f3734..0766499f5196b2d4e1660d07ce86d24107012a79 100644 (file)
@@ -1,5 +1,3 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
-
 noinst_LTLIBRARIES = libkernel-ctl.la
 
 libkernel_ctl_la_SOURCES = kernel-ctl.c kernel-ctl.h kernel-ioctl.h
index 274da87be1cea48b1dade25d286616f6bf7fb068..84eee1b8e59748310e3c11d9ffcbb0239b0580ff 100644 (file)
@@ -1,5 +1,3 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
-
 # Relayd library
 noinst_LTLIBRARIES = librelayd.la
 
index 8f0a839b611416bbeb9313527398990fcd36992b..501746a2c93f33c1794f7ca31bcf9c896cb8d416 100644 (file)
@@ -1,5 +1,3 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
-
 # Session daemon communication lib
 noinst_LTLIBRARIES = libsessiond-comm.la
 
index 7d3df162f84c1e5b8e23218f1937e2fa05b5e399..5c15725eb56741acf6c94d8f3a642a31ea1d877d 100644 (file)
@@ -1,5 +1,3 @@
-AM_CPPFLAGS =
-
 noinst_LTLIBRARIES = libtestpoint.la
 
 libtestpoint_la_SOURCES = testpoint.h testpoint.c
index ab8d38add5fc1fe5b3608ceee8446c9cfce4e7a0..1acdc7f12f3a49f9f9aa38cca9b8630951d6b6f4 100644 (file)
@@ -1,7 +1,5 @@
 if HAVE_LIBLTTNG_UST_CTL
 
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
-
 noinst_LTLIBRARIES = libust-consumer.la
 
 libust_consumer_la_SOURCES = ust-consumer.c ust-consumer.h
index 6b6a6eed127525f17a2a94454ea18e8fbf3dacc1..b133a5e156332f42b766dee6315c292dff9ced30 100644 (file)
@@ -1,7 +1,7 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(builddir)
-
 SUBDIRS = filter
 
+AM_CPPFLAGS += -I$(srcdir) -I$(builddir)
+
 lib_LTLIBRARIES = liblttng-ctl.la
 
 liblttng_ctl_la_SOURCES = lttng-ctl.c snapshot.c lttng-ctl-helper.h \
index 13a9e195a5f24b11bc85a2862221c76fd9106d07..c96c88dd55820d33e07e3b28371d8feb561c7f2d 100644 (file)
@@ -1,5 +1,4 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src \
-                         -I$(srcdir) -I$(builddir)
+AM_CPPFLAGS += -I$(srcdir) -I$(builddir)
 
 noinst_PROGRAMS = filter-grammar-test
 noinst_LTLIBRARIES = libfilter.la
@@ -20,7 +19,7 @@ libfilter_la_SOURCES = \
        filter-bytecode.h \
        filter-ir.h \
        memstream.h
-libfilter_la_CFLAGS = -include filter-symbols.h
+libfilter_la_CFLAGS = -include filter-symbols.h $(AM_CFLAGS)
 
 AM_YFLAGS = -t -d -v
 
index e9ec04ea9593dbfbc61005859a7ea4ff4573c997..92c21bc9fb13413db5d80d8db23e3a7e00e1f9e7 100644 (file)
@@ -1,4 +1,3 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
 EXTRA_DIST = test_event_basic test_all_events test_syscall \
                test_clock_override test_rotation_destroy_flush \
                test_select_poll_epoll
@@ -6,7 +5,7 @@ EXTRA_DIST = test_event_basic test_all_events test_syscall \
 noinst_PROGRAMS = select_poll_epoll
 select_poll_epoll_SOURCES = select_poll_epoll.c
 select_poll_epoll_LDADD = -lpthread -lpopt
-select_poll_epoll_CFLAGS = -fno-stack-protector -D_FORTIFY_SOURCE=0
+select_poll_epoll_CFLAGS = -fno-stack-protector -D_FORTIFY_SOURCE=0 $(AM_CFLAGS)
 
 all-local:
        @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
index 627a478383598a44272c671a8650f5d0f92951c7..5cfca6527bda1aea5d64c86de6ba314081630a38 100644 (file)
@@ -1,5 +1,3 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
 noinst_SCRIPTS = test_crash
 EXTRA_DIST = test_crash
 
index f96ac89bdc6728786ea15ebce089409bd0e6d4b1..712edefb63c7cec039a475e9882071c1ea13a7bc 100644 (file)
@@ -1,5 +1,4 @@
-AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests -I$(srcdir) -O2 -g
-AM_LDFLAGS =
+AM_CPPFLAGS += -I$(top_srcdir)/tests -I$(srcdir)
 
 if LTTNG_TOOLS_BUILD_WITH_LIBDL
 LIBS += -ldl
index 4d835f3dfa4d360fe4b4538de2679197a97af519..3cb2936ccf401c0934da0ff22b877cf7f1d5e377 100644 (file)
@@ -1,5 +1,4 @@
-AM_CFLAGS = -I. -O2 -g -I$(top_srcdir)/include
-AM_LDFLAGS =
+AM_CPPFLAGS += -I. -I$(top_srcdir)/include
 
 if LTTNG_TOOLS_BUILD_WITH_LIBDL
 LIBS += -ldl
index 8bc213d7ccab107650ba588b82e3f1b83892c517..44e4490102a7273a66d44c3e1aafca06a48b1e3a 100644 (file)
@@ -1,5 +1,4 @@
-AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests/utils/ -I$(srcdir)
-AM_LDFLAGS =
+AM_CPPFLAGS += -I$(top_srcdir)/tests/utils/ -I$(srcdir)
 
 if LTTNG_TOOLS_BUILD_WITH_LIBDL
 LIBS += -ldl
index f26efe0d0eec43160fd61de204f3500c6f8be410..b1b28f4a7283b3e403a02c75ea011aaeaf03b653 100644 (file)
@@ -1,5 +1,3 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
-
 noinst_PROGRAMS = validate_xml extract_xml
 validate_xml_SOURCES = validate_xml.c
 validate_xml_CPPFLAGS = $(libxml2_CFLAGS) $(AM_CPPFLAGS)
index b95b495e46ecc55b09a450429dc102abc6acb097..1261baa386b4db3a4396ca6e79763749c96e508f 100644 (file)
@@ -1,5 +1,4 @@
-AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests -I$(srcdir) -O2 -g
-AM_LDFLAGS =
+AM_CPPFLAGS += -I$(top_srcdir)/tests -I$(srcdir)
 
 if LTTNG_TOOLS_BUILD_WITH_LIBDL
 LIBS += -ldl
index 7caf457661a38471037d49ede663d9840f297824..bf32717978734c3d5ade23f6be245a85f4775ab4 100644 (file)
@@ -2,7 +2,7 @@ objcopy_verbose = $(objcopy_verbose_@AM_V@)
 objcopy_verbose_ = $(objcopy_verbose_@AM_DEFAULT_V@)
 objcopy_verbose_0 = @echo OBJCOPY $@;
 
-AM_CPPFLAGS = -I$(srcdir) -g
+AM_CPPFLAGS += -I$(srcdir) -g
 
 noinst_PROGRAMS = prog
 prog_SOURCES = prog.c tp.c tp.h
index 2a226303aa7d36c4455ce4ad5c9477dcf0b4b911..8559ef02e1f5c2a39bc4401537527491cdc98f18 100644 (file)
@@ -9,8 +9,6 @@ EXTRA_DIST = test_clock_override lttng-ust-clock-override-test.c
 
 else
 
-AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir)/src
-
 # The rpath is necessary because libtool won't build a shared library
 # if it's noinst_
 GETCPU_LIBTOOL_FLAGS = \
index 76a34ef07eb7cb41a4919dd0eb6ebfd1bd963e45..cc63b63b744c1b45b589bad8bfcde31d4c5daf46 100644 (file)
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I$(srcdir)
+AM_CPPFLAGS += -I$(srcdir)
 
 noinst_PROGRAMS = daemon
 daemon_SOURCES = daemon.c ust_tests_daemon.h
index 539803d7beb82fcd995345cd88867d03211847bd..4424b0d20f16d83d29eb05e14b3ee37daa0035d0 100644 (file)
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I$(srcdir)
+AM_CPPFLAGS += -I$(srcdir)
 
 noinst_PROGRAMS = exit-fast
 exit_fast_SOURCES = exit-fast.c ust_tests_exitfast.h
index 89a2ec985e972848cf51ae80376340c8c8d6bfea..b07cf9dba0cbadb233c7f85ac2ea17fc0cedb627 100644 (file)
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I$(srcdir)
+AM_CPPFLAGS += -I$(srcdir)
 
 noinst_PROGRAMS = fork fork2
 fork_SOURCES = fork.c ust_tests_fork.h
index 21076e134e54c88e0f998fef29a735e07c2f9224..a6487d9bb7f6ce9c6d939b282bd3afa8927d04aa 100644 (file)
@@ -10,8 +10,6 @@ EXTRA_DIST = test_getcpu_override run-getcpu-override \
 
 else
 
-AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir)/src
-
 # The rpath is necessary because libtool won't build a shared library
 # if it's noinst_
 GETCPU_LIBTOOL_FLAGS = \
index 25913c3f4695ffe40bbca44879f8e04b01cb39ef..22a31e18b062df7f43b6ec27e08199e2fc09dda0 100644 (file)
@@ -1,5 +1,4 @@
-AM_CFLAGS = -I$(srcdir) -O2
-AM_LDFLAGS = -llttng-ust
+AM_CPPFLAGS += -I$(srcdir)
 
 if LTTNG_TOOLS_BUILD_WITH_LIBDL
 LIBS += -ldl
index d35ca81294a23f0487a2b9fb947e30245f33f5e2..2a800728eb0fd6f5cd6d57500ac101ecffce2dfe 100644 (file)
@@ -1,5 +1,3 @@
-AM_CPPFLAGS = -I$(srcdir)
-
 noinst_PROGRAMS = prog
 prog_SOURCES = prog.c
 prog_LDADD = -llttng-ust -llttng-ust-libc-wrapper
index 1c80ae8392144f0448ba0c228c3815e509df6d65..c70bc53a2eccaed40aebc4d5b87b19cc269dc247 100644 (file)
@@ -1,6 +1,6 @@
 # -Wsystem-headers is needed to print warnings in the tracepoint
 # description file.
-AM_CPPFLAGS = -I$(srcdir) -I$(top_builddir)/include -Wsystem-headers
+AM_CPPFLAGS += -I$(srcdir) -Wsystem-headers
 
 # Set LIBS to nothing so the application does not link on useless
 # libraries.
@@ -10,7 +10,7 @@ LIBS =
 demo_builtin_SOURCES = demo.c tp.c tp2.c tp3.c ust_tests_demo.h \
        ust_tests_demo2.h ust_tests_demo3.h
 demo_builtin_LDADD = -llttng-ust
-demo_builtin_CFLAGS = -Werror=old-style-definition
+demo_builtin_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS)
 
 # Build a version statically linked to the providers
 # contains ust_tests_demo.h and ust_tests_demo2.h provider probes
@@ -79,7 +79,7 @@ liblttng_ust_provider_ust_tests_demo3_la_LDFLAGS = \
 
 noinst_PROGRAMS += demo
 demo_SOURCES = demo.c ust_tests_demo.h
-demo_CFLAGS = -DTEST_DYNAMIC_LINKAGE
+demo_CFLAGS = -DTEST_DYNAMIC_LINKAGE $(AM_CFLAGS)
 
 if LTTNG_TOOLS_BUILD_WITH_LIBDL
 demo_LDADD = -ldl
index 630d797b38f6493e25e0037a8397fdaeaad2dec2..8ce8f24397eae0a4d358a9f623bd1c738ca3c529 100644 (file)
@@ -1,5 +1,4 @@
-AM_CFLAGS = -I$(srcdir) -O2
-AM_LDFLAGS = -llttng-ust
+AM_CPPFLAGS += -I$(srcdir)
 
 if LTTNG_TOOLS_BUILD_WITH_LIBDL
 LIBS += -ldl
index c821e5a1e2a500cb943c8b70df7e5e6a383f7397..744a27ef9b17c1e3eace9167353a4e13f4484cd0 100644 (file)
@@ -1,5 +1,4 @@
-AM_CFLAGS = -I$(srcdir) -O2
-AM_LDFLAGS = -llttng-ust
+AM_CFLAGS += -I$(srcdir)
 
 if LTTNG_TOOLS_BUILD_WITH_LIBDL
 LIBS += -ldl
index 15f5600d61f0465d6cf6bf72207711d9e3bf6b41..4d4efb154b5542da867b37817199e8e9582d107d 100644 (file)
@@ -10,7 +10,7 @@ EXTRA_DIST = demo-trace demo.c ust_tests_demo.h \
 
 else
 
-AM_CFLAGS=-I$(srcdir)
+AM_CPPFLAGS += -I$(srcdir)
 
 # Force the shared flag on the noinst libraries since they are
 # only built static by default
index be4978be32fd7186dbbc59a67d4268f391cda035..593f6dc36f030b77d8bd230f0ab59cf84fd68c70 100644 (file)
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I$(srcdir)
+AM_CPPFLAGS += -I$(srcdir)
 
 noinst_PROGRAMS = type-declarations
 type_declarations_SOURCES = type-declarations.c ust_tests_td.h
index 433d08844b709336fb98bc15c17524f6e97a6b61..0bf9a691ec5dbf54a5a52a81f467da7a2359fdba 100644 (file)
@@ -15,7 +15,7 @@ objcopy_verbose = $(objcopy_verbose_@AM_V@)
 objcopy_verbose_ = $(objcopy_verbose_@AM_DEFAULT_V@)
 objcopy_verbose_0 = @echo OBJCOPY $@;
 
-AM_CPPFLAGS = -I$(srcdir) -g
+AM_CPPFLAGS += -I$(srcdir) -g
 
 noinst_PROGRAMS = prog
 prog_SOURCES = prog.c
index 72e1e37d7a87d8dcd46cc234a1993ffdea987e7a..114089536a34d684cfb8de3c1a10aa7f892e4126 100644 (file)
@@ -1,7 +1,6 @@
 SUBDIRS = ini_config
 
-AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests/utils/ -I$(srcdir)
-AM_LDFLAGS =
+AM_CPPFLAGS += -I$(top_srcdir)/tests/utils/ -I$(srcdir)
 
 LOG_DRIVER_FLAGS='--merge'
 LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
index 0a4d582866bba3fa2a50392983b3b3fa180071be..450237047b151afde1ee7fefda21e3996b22a372 100644 (file)
@@ -1,4 +1,4 @@
-AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests/utils/
+AM_CPPFLAGS += -I$(top_srcdir)/tests/utils/
 
 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
 LIBCONFIG=$(top_builddir)/src/common/config/libconfig.la
index 9bf81b924f24d621f3b28f83b7e5cc386a907f06..aa7984b4026b38e4385f11d26b07545444c9bb1c 100644 (file)
@@ -26,8 +26,7 @@
 
 #include <tap/tap.h>
 
-#include <src/common/utils.h>
-
+#include <common/utils.h>
 #include <common/common.h>
 
 /* For error.h */
index a950a08914bcfe620f1c7ad0834e7722b957aea4..14438ad32365910129e4a7d7a8609a21352f753a 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <tap/tap.h>
 
-#include <src/common/utils.h>
+#include <common/utils.h>
 
 /* For error.h */
 int lttng_opt_quiet = 1;
index d2eb49fa6fcbaab359db7069847f5dcba61282b4..9d327e0ec7b96fbb0aa554dab2699ffcbb765bd5 100644 (file)
@@ -1,6 +1,5 @@
 SUBDIRS = . tap testapp
 
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src
 EXTRA_DIST = utils.sh test_utils.py babelstats.pl warn_processes.sh
 dist_noinst_SCRIPTS = utils.sh test_utils.py babelstats.pl
 noinst_LTLIBRARIES = libtestutils.la
index 3945f779f4b8227d83b13b663df04f66897da7f4..00665998af1a9c251b122b1b5129a9fd581a87ab 100644 (file)
@@ -1,6 +1,4 @@
-AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src \
-               -I$(top_srcdir)/tests/utils -I$(top_srcdir)/tests/utils/testapp \
-               -I$(srcdir) -O2 -g
+AM_CPPFLAGS += -I$(top_srcdir)/tests/utils -I$(srcdir) -I$(top_srcdir)/tests/utils/testapp
 
 if LTTNG_TOOLS_BUILD_WITH_LIBDL
 LIBS += -ldl
index 321630dc7e8b4e914e12d463a47a8cbd83700032..46ad53d2c039a80d6c5774afa2ac54c2d7b2fbbd 100644 (file)
@@ -1,6 +1,4 @@
-AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(srcdir) \
-               -I$(top_srcdir)/tests/utils -I$(top_srcdir)/tests/utils/testapp \
-               -O2 -g
+AM_CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/tests/utils -I$(top_srcdir)/tests/utils/testapp
 
 if LTTNG_TOOLS_BUILD_WITH_LIBDL
 LIBS += -ldl
index 6b6099662eb9d3954b3103caa18777d0bbb7c214..eb74afa77a8e55546fb78fab5f983c2abdd6df1b 100644 (file)
@@ -1,12 +1,11 @@
-AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(srcdir) -O2 -g \
-       -I$(top_srcdir)/tests/utils/testapp
+AM_CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/tests/utils/testapp
 AM_LDFLAGS =
 
 if LTTNG_TOOLS_BUILD_WITH_LIBDL
-LIBS += -ldl
+AM_LDFLAGS += -ldl
 endif
 if LTTNG_TOOLS_BUILD_WITH_LIBC_DL
-LIBS += -lc
+AM_LDFLAGS += -lc
 endif
 
 if HAVE_LIBLTTNG_UST_CTL
This page took 0.046157 seconds and 5 git commands to generate.