Fix: Don't override user variables within the build system
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 9 May 2017 18:25:01 +0000 (14:25 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 9 May 2017 18:54:11 +0000 (14:54 -0400)
Instead use the appropriatly 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: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
32 files changed:
configure.ac
doc/examples/Makefile.am
doc/examples/clock-override/Makefile
doc/examples/demo-tracef/Makefile
doc/examples/demo-tracelog/Makefile
doc/examples/demo/Makefile
doc/examples/easy-ust/Makefile
doc/examples/gen-tp/Makefile
doc/examples/getcpu-override/Makefile
doc/examples/hello-static-lib/Makefile
liblttng-ust-ctl/Makefile.am
liblttng-ust-cyg-profile/Makefile.am
liblttng-ust-dl/Makefile.am
liblttng-ust-fd/Makefile.am
liblttng-ust-fork/Makefile.am
liblttng-ust-java-agent/jni/common/Makefile.am
liblttng-ust-java-agent/jni/jul/Makefile.am
liblttng-ust-java-agent/jni/log4j/Makefile.am
liblttng-ust-java/Makefile.am
liblttng-ust-libc-wrapper/Makefile.am
liblttng-ust-python-agent/Makefile.am
liblttng-ust/Makefile.am
libringbuffer/Makefile.am
snprintf/Makefile.am
tests/benchmark/Makefile.am
tests/ctf-types/Makefile.am
tests/hello/Makefile.am
tests/test-app-ctx/Makefile.am
tests/trace_event/Makefile.am
tests/tracepoint/Makefile.am
tests/tracepoint/benchmark/Makefile.am
tests/ust-variant/Makefile.am

index 99868a62eee849300af4d7b3421db04c271e58b5..4fb8bce5639870c6e8e151c756f62846c890b6e9 100644 (file)
@@ -188,8 +188,6 @@ dnl AC_CHECK_TYPES([ptrdiff_t])
 AC_FUNC_MALLOC
 AC_CHECK_FUNCS([gettimeofday munmap socket strerror strtol sched_getcpu sysconf])
 
-CFLAGS="-Wall $CFLAGS"
-
 # URCU
 
 # urcu - check if we just find the headers it out of the box.
@@ -307,10 +305,13 @@ AS_IF([test "x$jni_interface" = "xyes" || test "x$java_agent_jul" = "xyes" || te
        AX_JNI_INCLUDE_DIR
        for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
        do
-               CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
+               JNI_CPPFLAGS="$JNI_CPPFLAGS -I$JNI_INCLUDE_DIR"
        done
 
+       saved_CPPFLAGS="$CPPFLAGS"
+       CPPFLAGS="$CPPFLAGS $JNI_CPPFLAGS"
        AX_PROG_JAVAH
+       CPPFLAGS="$saved_CPPFLAGS"
 ])
 
 AS_IF([test "x$java_agent_log4j" = "xyes"], [
@@ -447,6 +448,10 @@ _AC_DEFINE_AND_SUBST([LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS], [3000])
 # By default, do not retry on buffer full condition.
 _AC_DEFINE_AND_SUBST([LTTNG_UST_DEFAULT_BLOCKING_RETRY_TIMEOUT_MS], [0])
 
+AM_CFLAGS="-Wall"
+AC_SUBST(AM_CFLAGS)
+AC_SUBST(JNI_CPPFLAGS)
+
 AC_CONFIG_FILES([
        Makefile
        doc/Makefile
index 239046fdb31a331673819cd3456f02737aa98a1b..02e449a0047be9a8c187a26d7246299a3536441b 100644 (file)
@@ -131,7 +131,7 @@ all-local:
                rel_build_subdir="../"; \
        fi; \
        for subdir in $(SUBDIRS_PROXY); do \
-               (cd $$subdir && $(MAKE) AM_CC="$(CC)" AM_CPPFLAGS="$(CPPFLAGS) -I$$rel_src_subdir$(top_srcdir)/include/ -I$$rel_build_subdir$(top_builddir)/include/" AM_CFLAGS='$(CFLAGS)' AM_LDFLAGS='$(LDFLAGS) -L../../../liblttng-ust/.libs -Wl,-rpath="$(PWD)/../../liblttng-ust/.libs/" -Wl,-rpath-link="$(PWD)/../../liblttng-ust/.libs/"' LTTNG_GEN_TP_PATH="../../../tools/" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \
+               (cd $$subdir && $(MAKE) CC="$(CC)" CPPFLAGS="$(CPPLAGS)" AM_CPPFLAGS="$(AM_CPPFLAGS) -I$$rel_src_subdir$(top_srcdir)/include/ -I$$rel_build_subdir$(top_builddir)/include/" CFLAGS='$(CFLAGS)' AM_CFLAGS='$(AM_CFLAGS)' LDFLAGS="$(LDFLAGS)" AM_LDFLAGS='$(AM_LDFLAGS) -L../../../liblttng-ust/.libs -Wl,-rpath="$(PWD)/../../liblttng-ust/.libs/" -Wl,-rpath-link="$(PWD)/../../liblttng-ust/.libs/"' LTTNG_GEN_TP_PATH="../../../tools/" $(AM_MAKEFLAGS) all && cd ..) || exit 1; \
        done; \
        if [ x"$(SUBDIRS_JUL)" != x"" ]; then \
                for subdir in $(SUBDIRS_JUL); do \
@@ -154,9 +154,9 @@ all-local:
                                cmake \
                                -DCMAKE_INCLUDE_PATH="$(abs_top_srcdir)/include;$(abs_top_builddir)/include" \
                                -DCMAKE_LIBRARY_PATH="$(abs_top_builddir)/liblttng-ust/.libs" \
-                               -DCMAKE_C_FLAGS="$(CFLAGS) $(CPPFLAGS)" \
-                               -DCMAKE_CXX_FLAGS="$(CXXFLAGS) $(CPPFLAGS)" \
-                               -DCMAKE_EXE_LINKER_FLAGS="$(LDFLAGS)" \
+                               -DCMAKE_C_FLAGS="$(AM_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)" \
+                               -DCMAKE_CXX_FLAGS="$(AM_CXXFLAGS) $(AM_CPPFLAGS) $(CXXFLAGS) $(CPPFLAGS)" \
+                               -DCMAKE_EXE_LINKER_FLAGS="$(AM_LDFLAGS) $(LDFLAGS)" \
                                .. && \
                                $(MAKE) && \
                                cd .. \
index 8f38c4fc78fb52b4450544958dfaa855820ff6a6..5433427c10a31d3bfbad7cdc3756e2154e0fc05e 100644 (file)
 #
 # This makefile is purposefully kept simple to support GNU and BSD make.
 
-ifdef AM_CC
-       CC = $(AM_CC)
-endif
-
 LIBS = -ldl    # On Linux
 #LIBS = -lc    # On BSD
 LOCAL_CPPFLAGS += -I.
@@ -26,12 +22,12 @@ LOCAL_CPPFLAGS += -I.
 all: lttng-ust-clock-override-example.so
 
 lttng-ust-clock-override-example.o: lttng-ust-clock-override-example.c
-       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
-               $(AM_CFLAGS) -fpic -c -o $@ $<
+       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -fpic -c -o $@ $<
 
 lttng-ust-clock-override-example.so: lttng-ust-clock-override-example.o
-       $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) $(CFLAGS) \
-               $(AM_LDFLAGS) $(AM_CFLAGS) lttng-ust-clock-override-example.o
+       $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) $(AM_CFLAGS) \
+               $(AM_LDFLAGS) $(CFLAGS) lttng-ust-clock-override-example.o
 
 .PHONY: clean
 clean:
index 40e9a581e90df7657881590dab99270704be75ea..1e4544c41a34542639a001ab53401cc3f21948a4 100644 (file)
 #
 # This makefile is purposefully kept simple to support GNU and BSD make.
 
-ifdef AM_CC
-       CC = $(AM_CC)
-endif
-
 LIBS = -ldl -llttng-ust        # On Linux
 #LIBS = -lc    # On BSD
 LOCAL_CPPFLAGS += -I.
@@ -26,11 +22,11 @@ LOCAL_CPPFLAGS += -I.
 all: demo-tracef
 
 demo-tracef.o: demo-tracef.c
-       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
-               $(AM_CFLAGS) -c -o $@ $<
+       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -c -o $@ $<
 
 demo-tracef: demo-tracef.o
-       $(CC) $(LDFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
+       $(CC) $(LDFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(CFLAGS) \
                -o $@ $< $(LIBS)
 
 .PHONY: clean
index cc6843a88a6c63f453cac4acf8696d3afeb55f63..a16d6c5237d3a05f37fea8c00dc104b90ea8a513 100644 (file)
 #
 # This makefile is purposefully kept simple to support GNU and BSD make.
 
-ifdef AM_CC
-       CC = $(AM_CC)
-endif
-
 LIBS = -ldl -llttng-ust        # On Linux
 #LIBS = -lc    # On BSD
 LOCAL_CPPFLAGS += -I.
@@ -26,11 +22,11 @@ LOCAL_CPPFLAGS += -I.
 all: demo-tracelog
 
 demo-tracelog.o: demo-tracelog.c
-       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
-               $(AM_CFLAGS) -c -o $@ $<
+       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -c -o $@ $<
 
 demo-tracelog: demo-tracelog.o
-       $(CC) $(LDFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
+       $(CC) $(LDFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(CFLAGS) \
                -o $@ $< $(LIBS)
 
 .PHONY: clean
index 9c847b13a84d6a21cd270e03224c274ac789c86c..6272a2ba1081e1e1644c82c9a120952bfc199e29 100644 (file)
 #
 # This makefile is purposefully kept simple to support GNU and BSD make.
 
-ifdef AM_CC
-       CC = $(AM_CC)
-endif
-
 LIBS = -ldl    # On Linux
 #LIBS = -lc    # On BSD
 LOCAL_CPPFLAGS += -I.
@@ -25,31 +21,31 @@ LOCAL_CPPFLAGS += -I.
 all: demo lttng-ust-provider-ust-tests-demo.so lttng-ust-provider-ust-tests-demo3.so
 
 tp.o: tp.c ust_tests_demo.h
-       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
-               $(AM_CFLAGS) -fpic -c -o $@ $<
+       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -fpic -c -o $@ $<
 
 tp2.o: tp2.c ust_tests_demo2.h
-       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
-               $(AM_CFLAGS) -fpic -c -o $@ $<
+       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -fpic -c -o $@ $<
 
 lttng-ust-provider-ust-tests-demo.so: tp.o tp2.o
-       $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) $(CFLAGS) \
-               $(AM_LDFLAGS) $(AM_CFLAGS) -llttng-ust tp.o tp2.o
+       $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) $(AM_CFLAGS) \
+               $(AM_LDFLAGS) $(CFLAGS) -llttng-ust tp.o tp2.o
 
 tp3.o: tp3.c ust_tests_demo3.h
-       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
-               $(AM_CFLAGS) -fpic -c -o $@ $<
+       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -fpic -c -o $@ $<
 
 lttng-ust-provider-ust-tests-demo3.so: tp3.o
-       $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) $(CFLAGS) \
-               $(AM_LDFLAGS) $(AM_CFLAGS) -llttng-ust tp3.o
+       $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) $(AM_CFLAGS) \
+               $(AM_LDFLAGS) $(CFLAGS) -llttng-ust tp3.o
 
 demo.o: demo.c
-       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
-               $(AM_CFLAGS) -c -o $@ $<
+       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -c -o $@ $<
 
 demo: demo.o
-       $(CC) $(LDFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
+       $(CC) $(LDFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(CFLAGS) \
                -o $@ demo.o $(LIBS)
 
 .PHONY: clean
index 723780f31940bb35f466cc8107ccf5b86e371e21..022729389f4a14fe0e032e99720ba3249d5cc266 100644 (file)
 #
 # This makefile is purposefully kept simple to support GNU and BSD make.
 
-ifdef AM_CC
-       CC = $(AM_CC)
-endif
-
 LIBS = -ldl -llttng-ust                # On Linux
 #LIBS = -lc -llttng-ust                # On BSD
 LOCAL_CPPFLAGS += -I.
@@ -27,16 +23,16 @@ LOCAL_CPPFLAGS += -I.
 all: sample
 
 sample: sample.o tp.o
-       $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
+       $(CC) -o $@ $(LDFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(CFLAGS) \
                sample.o tp.o $(LIBS)
 
 sample.o: sample.c sample_component_provider.h
-       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
-               $(AM_CFLAGS) -c -o $@ $<
+       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -c -o $@ $<
 
 tp.o: tp.c sample_component_provider.h
-       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
-               $(AM_CFLAGS) -c -o $@ $<
+       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -c -o $@ $<
 
 html: sample_component_provider.html sample.html tp.html
 
index 5c2a78cdb5619b1114f794579dfd5e0e02b8999e..6d9ec10d5e5dd47f4db4604713c1c8cd50bcafdc 100644 (file)
 #
 # This makefile is purposefully kept simple to support GNU and BSD make.
 
-ifdef AM_CC
-       CC = $(AM_CC)
-endif
-
 LIBS = -ldl -llttng-ust                #On Linux
 #LIBS = -lc -llttng-ust                #On BSD
 
 all: sample
 
 sample: sample.o sample_tracepoint.o
-       $(CC) $(LDFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
+       $(CC) $(LDFLAGS) $(AM_CFLAGS) $(AM_LDFLAGS) $(CFLAGS) \
                -o $@ sample.o sample_tracepoint.o $(LIBS)
 
 sample.o: sample.c sample_tracepoint.h
-       $(CC) $(CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) $(AM_CFLAGS) \
+       $(CC) $(CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) $(CFLAGS) \
                -c -o $@ $<
 
 # Use this command to compile the .c manually
 #sample_tracepoint.o: sample_tracepoint.c sample_tracepoint.h
-#      $(CC) $(CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) $(AM_CFLAGS) \
+#      $(CC) $(CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) $(CFLAGS) \
 #              -I. -c -o $@ $<
 
 # This rule generate .o only and depends on rules for generating
 # the .h and .c
 %.o: %.tp %.c %.h
-       CPPFLAGS="$(CPPFLAGS) $(AM_CPPFLAGS)" \
-       CFLAGS="$(CFLAGS) $(AM_CFLAGS)" \
-       LDFLAGS="$(LDFLAGS) $(AM_LDFLAGS)" \
+       CPPFLAGS="$(AM_CPPFLAGS) $(CPPFLAGS)" \
+       CFLAGS="$(AM_CFLAGS) $(CFLAGS)" \
+       LDFLAGS="$(AM_LDFLAGS) $(LDFLAGS)" \
        CC="$(CC)" \
        $(LTTNG_GEN_TP_PATH)lttng-gen-tp -o $@ $<
 
index ec752d72d59febd90060cda609f1ffa34ec534db..de295c66c927a9cc53c365a66667e06f9542955d 100644 (file)
 #
 # This makefile is purposefully kept simple to support GNU and BSD make.
 
-ifdef AM_CC
-       CC = $(AM_CC)
-endif
-
 LIBS = -ldl    # On Linux
 #LIBS = -lc    # On BSD
 LOCAL_CPPFLAGS += -I.
@@ -26,12 +22,12 @@ LOCAL_CPPFLAGS += -I.
 all: lttng-ust-getcpu-override-example.so
 
 lttng-ust-getcpu-override-example.o: lttng-ust-getcpu-override-example.c
-       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
-               $(AM_CFLAGS) -fpic -c -o $@ $<
+       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -fpic -c -o $@ $<
 
 lttng-ust-getcpu-override-example.so: lttng-ust-getcpu-override-example.o
-       $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) $(CFLAGS) \
-               $(AM_LDFLAGS) $(AM_CFLAGS) lttng-ust-getcpu-override-example.o
+       $(CC) -shared -Wl,--no-as-needed -o $@ $(LDFLAGS) $(AM_CFLAGS) \
+               $(AM_LDFLAGS) $(CFLAGS) lttng-ust-getcpu-override-example.o
 
 .PHONY: clean
 clean:
index ec185c1ca38ba59bc0dad57d85803e41e991144b..cf72b35d34e720c2ea4bf45a8132ab2a16b9ab92 100644 (file)
 #
 # This makefile is purposefully kept simple to support GNU and BSD make.
 
-ifdef AM_CC
-       CC = $(AM_CC)
-endif
-
 LOCAL_CPPFLAGS += -I.
 LIBS = -ldl -llttng-ust        # On Linux
 #LIBS = -lc -llttng-ust        # On BSD
@@ -25,19 +21,19 @@ LIBS = -ldl -llttng-ust     # On Linux
 all: hello
 
 lttng-ust-provider-hello.o: tp.c ust_tests_hello.h
-       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
-               $(AM_CFLAGS) -c -o $@ $<
+       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -c -o $@ $<
 
 lttng-ust-provider-hello.a: lttng-ust-provider-hello.o
        ar -rc $@ lttng-ust-provider-hello.o
 
 hello.o: hello.c
-       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(CFLAGS) $(AM_CPPFLAGS) \
-               $(AM_CFLAGS) -c -o $@ $<
+       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) \
+               $(CFLAGS) -c -o $@ $<
 
 hello: hello.o lttng-ust-provider-hello.a
        $(CC) -o $@ $(LDFLAGS) $(CPPFLAGS) $(AM_LDFLAGS) $(AM_CFLAGS) \
-               hello.o lttng-ust-provider-hello.a $(LIBS)
+               $(CFLAGS) hello.o lttng-ust-provider-hello.a $(LIBS)
 
 .PHONY: clean
 clean:
index e10ba8ba826a1ce10b7c2bb77ac2140aedfdc279..6043d17cdbbecba5f4565f02a1067932be9fb28a 100644 (file)
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/liblttng-ust-comm -I$(top_builddir)/include
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
 
 lib_LTLIBRARIES = liblttng-ust-ctl.la
 
index d325f53518a94b4d36c22e0475016d85bce02102..3130282d2fd383cf8c326404cd1e2dc1e4b994bc 100644 (file)
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
 
 lib_LTLIBRARIES = liblttng-ust-cyg-profile.la \
        liblttng-ust-cyg-profile-fast.la
index 049ac65535aaf3ff656f9c0ae0794fe301f5353d..c0168f395bf9e4a093339d3e61a703e397e39f39 100644 (file)
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
 
 lib_LTLIBRARIES = liblttng-ust-dl.la
 liblttng_ust_dl_la_SOURCES = \
@@ -16,4 +16,4 @@ if LTTNG_UST_BUILD_WITH_LIBC_DL
 liblttng_ust_dl_la_LIBADD += -lc
 endif
 
-liblttng_ust_dl_la_CFLAGS = -DUST_COMPONENT=liblttng-ust-dl -fno-strict-aliasing
+liblttng_ust_dl_la_CFLAGS = -DUST_COMPONENT=liblttng-ust-dl $(AM_CFLAGS)
index 52f897d687137fe449488a8348eda74bc16eb4e2..e9fc3b4055641de2e8fd5b6ff2ebc388fac7a6ea 100644 (file)
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
 
 lib_LTLIBRARIES = liblttng-ust-fd.la
 liblttng_ust_fd_la_SOURCES = \
@@ -14,4 +14,4 @@ if LTTNG_UST_BUILD_WITH_LIBC_DL
 liblttng_ust_fd_la_LIBADD += -lc
 endif
 
-liblttng_ust_fd_la_CFLAGS = -DUST_COMPONENT=liblttng-ust-fd -fno-strict-aliasing
+liblttng_ust_fd_la_CFLAGS = -DUST_COMPONENT=liblttng-ust-fd $(AM_CFLAGS)
index aea276e4fb4a33ff6fec64b33691e903191a9143..2f0976d4da05c5b956a608aa63e91cae1be5118b 100644 (file)
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
 
 lib_LTLIBRARIES = liblttng-ust-fork.la
 liblttng_ust_fork_la_SOURCES = ustfork.c
@@ -13,4 +13,4 @@ if LTTNG_UST_BUILD_WITH_LIBC_DL
 liblttng_ust_fork_la_LIBADD += -lc
 endif
 
-liblttng_ust_fork_la_CFLAGS = -DUST_COMPONENT=liblttng-ust-fork -fno-strict-aliasing
+liblttng_ust_fork_la_CFLAGS = -DUST_COMPONENT=liblttng-ust-fork $(AM_CFLAGS)
index 704f2bb03e46b9d50a6c57cb9d3c56c7d499311c..7612932a80e97f32baf07026c18a656ad284261e 100644 (file)
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(JNI_CPPFLAGS)
 
 lib_LTLIBRARIES = liblttng-ust-context-jni.la
 liblttng_ust_context_jni_la_SOURCES = lttng_ust_context.c lttng_ust_context.h
index a94d44e7a20f5a9cb07f76b12b9c9ecb18e15d13..45bc1b5647040620434dab4a307fc9c79366cd9a 100644 (file)
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(JNI_CPPFLAGS)
 
 lib_LTLIBRARIES = liblttng-ust-jul-jni.la
 liblttng_ust_jul_jni_la_SOURCES = lttng_ust_jul.c \
index 5545631dd5a4fff8d971540d7d6b60fb57937b39..5e5fe0fcf1ffc238ea39ca802f3ce75b8f97c1a3 100644 (file)
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(JNI_CPPFLAGS)
 
 lib_LTLIBRARIES = liblttng-ust-log4j-jni.la
 liblttng_ust_log4j_jni_la_SOURCES = lttng_ust_log4j.c \
index 0c2f6a5c838f9e62562cd915e6d44ba7be080be7..399b62cac1d06cb322d3b549c9998523d72027fe 100644 (file)
@@ -7,7 +7,7 @@ dist_noinst_JAVA = $(pkgpath)/LTTngUst.java
 jar_DATA = $(jarfile)
 BUILT_SOURCES = org_lttng_ust_LTTngUst.h
 
-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(JNI_CPPFLAGS)
 lib_LTLIBRARIES = liblttng-ust-java.la
 liblttng_ust_java_la_SOURCES = LTTngUst.c lttng_ust_java.h
 nodist_liblttng_ust_java_la_SOURCES = org_lttng_ust_LTTngUst.h
index d402d53c836b81824619c67847d5a783bfbd3a59..e73b4d88ad52c9a8f634c6ae316e953937f12e2c 100644 (file)
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
 
 lib_LTLIBRARIES = liblttng-ust-libc-wrapper.la \
   liblttng-ust-pthread-wrapper.la
index 726ffe4e6d88a55cca00ea112bff989a179f9d8d..2c6668ae766c2549b39d05414c24aa1aa772a076 100644 (file)
@@ -1,7 +1,7 @@
 # tracepoint provider: always built/installed (does not depend on Python per se)
 AM_CPPFLAGS = -I$(top_srcdir)/include/ \
        -I$(top_builddir)/include/
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
 lib_LTLIBRARIES = liblttng-ust-python-agent.la
 liblttng_ust_python_agent_la_SOURCES = lttng_ust_python.c lttng_ust_python.h
 liblttng_ust_python_agent_la_LIBADD = -lc -llttng-ust \
index e79591a838f9ac9612356aed41fb7856c9edeb4e..982be69b7dd45157458b78a758c54d4168349c74 100644 (file)
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
 
 noinst_LTLIBRARIES = liblttng-ust-runtime.la liblttng-ust-support.la
 
@@ -17,7 +17,7 @@ liblttng_ust_tracepoint_la_LIBADD = \
        -lpthread \
        $(top_builddir)/snprintf/libustsnprintf.la
 liblttng_ust_tracepoint_la_LDFLAGS = -no-undefined -version-info $(LTTNG_UST_LIBRARY_VERSION)
-liblttng_ust_tracepoint_la_CFLAGS = -DUST_COMPONENT="liblttng_ust_tracepoint" -fno-strict-aliasing
+liblttng_ust_tracepoint_la_CFLAGS = -DUST_COMPONENT="liblttng_ust_tracepoint" $(AM_CFLAGS)
 
 liblttng_ust_runtime_la_SOURCES = \
        lttng-ust-comm.c \
@@ -100,4 +100,4 @@ liblttng_ust_la_LIBADD = \
        liblttng-ust-tracepoint.la \
        liblttng-ust-runtime.la liblttng-ust-support.la
 
-liblttng_ust_la_CFLAGS = -DUST_COMPONENT="liblttng_ust" -fno-strict-aliasing
+liblttng_ust_la_CFLAGS = -DUST_COMPONENT="liblttng_ust" $(AM_CFLAGS)
index 33db165323def56ab75dc7a97dccaf07190809cd..9c3b99380305186f62a33a2060709664eac505c2 100644 (file)
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
 
 noinst_LTLIBRARIES = libringbuffer.la
 
@@ -17,4 +17,4 @@ libringbuffer_la_LIBADD = \
        -lpthread \
        -lrt
 
-libringbuffer_la_CFLAGS = -DUST_COMPONENT="libringbuffer" -fno-strict-aliasing
+libringbuffer_la_CFLAGS = -DUST_COMPONENT="libringbuffer" $(AM_CFLAGS)
index a32ed4f00f07ccd180269fcc165428ee763c6cc2..b01d13ead1aa6c6a75f3b5e7ffeb174c8ef39f31 100644 (file)
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libustcomm
-AM_CFLAGS = -fno-strict-aliasing
+AM_CFLAGS += -fno-strict-aliasing
 
 noinst_LTLIBRARIES = libustsnprintf.la
 libustsnprintf_la_SOURCES = \
@@ -19,4 +19,4 @@ libustsnprintf_la_SOURCES = \
        patient_write.c
 
 libustsnprintf_la_LDFLAGS = -no-undefined -static
-libustsnprintf_la_CFLAGS = -DUST_COMPONENT="lttng_ust_snprintf" -fPIC -fno-strict-aliasing
+libustsnprintf_la_CFLAGS = -DUST_COMPONENT="lttng_ust_snprintf" -fPIC $(AM_CFLAGS)
index 89452d2ea9e44a4e189026be1867dc4b76177baa..4ea420c61fe1f1a831a521b6e9b8a9493c865bf1 100644 (file)
@@ -5,7 +5,7 @@ bench1_SOURCES = bench.c tp.c ust_tests_benchmark.h
 bench1_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la
 bench2_SOURCES = bench.c tp.c ust_tests_benchmark.h
 bench2_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la
-bench2_CFLAGS = -DTRACING
+bench2_CFLAGS = -DTRACING $(AM_CFLAGS)
 
 dist_noinst_SCRIPTS = test_benchmark ptime
 
index 366870ec75aab31cc5b7918cabe8bb4f4e8850f2..a9b40b6ac25a8cee36de141c4cf206c423aaac54 100644 (file)
@@ -3,7 +3,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers
 noinst_PROGRAMS = ctf-types
 ctf_types_SOURCES = ctf-types.c tp.c ust_tests_ctf_types.h
 ctf_types_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la
-ctf_types_CFLAGS = -Werror=old-style-definition
+ctf_types_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS)
 
 if LTTNG_UST_BUILD_WITH_LIBDL
 ctf_types_LDADD += -ldl
index 324c2cd9d0eb8c707afbe386f9840dbf8a42a7a7..cb4d46266646fd57fd79a2806c4bc755e1593ffa 100644 (file)
@@ -3,7 +3,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers
 noinst_PROGRAMS = hello
 hello_SOURCES = hello.c tp.c ust_tests_hello.h
 hello_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la
-hello_CFLAGS = -Werror=old-style-definition
+hello_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS)
 
 if LTTNG_UST_BUILD_WITH_LIBDL
 hello_LDADD += -ldl
index 324c2cd9d0eb8c707afbe386f9840dbf8a42a7a7..cb4d46266646fd57fd79a2806c4bc755e1593ffa 100644 (file)
@@ -3,7 +3,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers
 noinst_PROGRAMS = hello
 hello_SOURCES = hello.c tp.c ust_tests_hello.h
 hello_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la
-hello_CFLAGS = -Werror=old-style-definition
+hello_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS)
 
 if LTTNG_UST_BUILD_WITH_LIBDL
 hello_LDADD += -ldl
index 3e2fe8154dd6f2e343c1f7fee983bb652bdfe5a3..2105a181ef2c505833ec62ebe6ae6a57cb432ea6 100644 (file)
@@ -5,6 +5,6 @@ trace_event_test_SOURCES = trace_event_test.c trace_event_test.h
 trace_event_test_LDADD = $(top_builddir)/libust/libust.la \
                         $(top_builddir)/libust-initializer.o -lpthread -lrt
 
-CFLAGS_trace_event_test.o = -I$(src)
+CFLAGS_trace_event_test.o = -I$(src) $(AM_CFLAGS)
 noinst_SCRIPTS = run
 EXTRA_DIST = run
index 3c3fe90d2db36a983bbc1c862843d6ab045468e3..cf8aaa0058dd7e3f22225488c977e30fae936c94 100644 (file)
@@ -9,6 +9,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/include
 #FIXME: this test is broken:
 #ust/tests/tracepoint/tracepoint_test.c:64: undefined reference to
 #`register_trace_ust_event_msg'
-#CFLAGS_tracepoint_test.o = -I$(src)
+#CFLAGS_tracepoint_test.o = -I$(src) $(AM_CFLAGS)
 noinst_SCRIPTS = run
 EXTRA_DIST = run
index 1080b44805f414f512647c060ea2ed931b9654c8..4a387074c4f9aca09d33898a728cddaf469a292f 100644 (file)
@@ -4,4 +4,4 @@ noinst_PROGRAMS = tracepoint_benchmark
 tracepoint_benchmark_SOURCES = tracepoint_benchmark.c tracepoint_benchmark.h
 tracepoint_benchmark_LDADD = $(top_builddir)/libust/libust.la $(top_builddir)/libust-initializer.o -lpthread
 
-CFLAGS_tracepoint_benchmark.o = -I$(src) -g
+CFLAGS_tracepoint_benchmark.o = -I$(src) -g $(AM_CFLAGS)
index 3c3d61db97e42ba73a12a0a0e9f637be4111ba85..5d741bdfdb2dd76730d5d190f22beafaa2269275 100644 (file)
@@ -3,7 +3,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers
 noinst_PROGRAMS = ust-variant
 ust_variant_SOURCES = ust-variant.c
 ust_variant_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la
-ust_variant_CFLAGS = -Werror=old-style-definition
+ust_variant_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS)
 
 if LTTNG_UST_BUILD_WITH_LIBDL
 ust_variant_LDADD += -ldl
This page took 0.047889 seconds and 5 git commands to generate.