From 4f2a40d56c5cf84efab7c4cce066152b1ce7676a Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 3 Feb 2020 17:38:23 -0500 Subject: [PATCH] tests: append to AM_CFLAGS instead of overriding it MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The Makefiles modified by this patch currently override the AM_CFLAGS value, which means that anything put in AM_CFLAGS by configure (for example, the warning flags) is lost. I believe the intention is to add some flags to CFLAGS, so modify them such that they append instead of override. notification/Makefile.am overrides AM_LDFLAGS with nothing. It feels like it was not the intention to actually clear that variable, but rather that it is just the by-product of a copy paste. If it was really the intention to clear the value of AM_LDFLAGS, there would have been a comment to explain it, right? Signed-off-by: Simon Marchi Change-Id: I4ef926d9135b16200e5f17d09461506a5e955068 Signed-off-by: Jérémie Galarneau --- tests/regression/tools/notification/Makefile.am | 4 +--- tests/utils/testapp/userspace-probe-elf-binary/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/regression/tools/notification/Makefile.am b/tests/regression/tools/notification/Makefile.am index 3430f450a..bc2c9123c 100644 --- a/tests/regression/tools/notification/Makefile.am +++ b/tests/regression/tools/notification/Makefile.am @@ -1,8 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only -AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests -I$(top_srcdir)/tests/utils/ -I$(srcdir) -AM_LDFLAGS = - +AM_CFLAGS += -I$(top_srcdir)/tests/utils LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la LIB_LTTNG_CTL = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la diff --git a/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am b/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am index aa27a82ed..af76ae7fc 100644 --- a/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am +++ b/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only # no optimization -AM_CFLAGS = -O0 +AM_CFLAGS += -O0 noinst_LTLIBRARIES = libfoo.la libfoo_la_SOURCES = foo.c foo.h -- 2.34.1