From: Michael Jeanson Date: Fri, 19 Mar 2021 14:17:15 +0000 (-0400) Subject: configure: standardise include path X-Git-Tag: v0.13.0~29 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0195634254d90bac8517076685032ccffee75456;p=urcu.git configure: standardise include path Use the same include setup as our other projects, set the default includes globally in configure.ac in AM_CPPFLAGS. This is part of an effort to standardise our autotools setup across project to simplify maintenance. Change-Id: Ia40344e22920bafca9ed34ea2867acf38a1807e3 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/configure.ac b/configure.ac index e6b9211..2b7ace5 100644 --- a/configure.ac +++ b/configure.ac @@ -238,7 +238,10 @@ AC_SUBST([URCU_LIBRARY_VERSION], [urcu_lib_version]) AC_SUBST(LT_NO_UNDEFINED) -AM_CPPFLAGS="-include config.h" +# The order in which the include folders are searched is important. +# The top_builddir should always be searched first in the event that a build +# time generated file is included. +AM_CPPFLAGS="-I\$(top_builddir)/include -I\$(top_srcdir)/include -include config.h" AC_SUBST(AM_CPPFLAGS) AM_CFLAGS="-Wall -Wextra -Wno-unused-parameter $PTHREAD_CFLAGS" diff --git a/src/Makefile.am b/src/Makefile.am index 215f09c..37fa9fe 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS += -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src +AM_CPPFLAGS += -I$(top_srcdir)/src #Add the -version-info directly here since we are only building # library that use the version-info diff --git a/tests/benchmark/Makefile.am b/tests/benchmark/Makefile.am index d268f3a..30c5291 100644 --- a/tests/benchmark/Makefile.am +++ b/tests/benchmark/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS += -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests/common -g +AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/tests/common TEST_EXTENSIONS = .tap TAP_LOG_DRIVER_FLAGS = --merge --comments diff --git a/tests/common/Makefile.am b/tests/common/Makefile.am index 223b929..bfd5d57 100644 --- a/tests/common/Makefile.am +++ b/tests/common/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS += -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src +AM_CPPFLAGS += -I$(top_srcdir)/src noinst_HEADERS = thread-id.h diff --git a/tests/regression/Makefile.am b/tests/regression/Makefile.am index 2cad8c4..f41bd1a 100644 --- a/tests/regression/Makefile.am +++ b/tests/regression/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS += -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests/utils -I$(top_srcdir)/tests/common -g +AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/tests/utils -I$(top_srcdir)/tests/common TEST_EXTENSIONS = .tap TAP_LOG_DRIVER_FLAGS = --merge --comments diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index ce01c91..f3ab670 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS += -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests/utils -I$(top_srcdir)/tests/common -g +AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/tests/utils -I$(top_srcdir)/tests/common LOG_DRIVER_FLAGS = --merge --comments LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \ diff --git a/tests/utils/Makefile.am b/tests/utils/Makefile.am index 08c3778..d39f797 100644 --- a/tests/utils/Makefile.am +++ b/tests/utils/Makefile.am @@ -1,4 +1,4 @@ -AM_CFLAGS += -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src +AM_CPPFLAGS += -I$(top_srcdir)/src noinst_LIBRARIES = libtap.a libtap_a_SOURCES = tap.c tap.h