configure: standardise include path
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 19 Mar 2021 14:17:15 +0000 (10:17 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 19 Mar 2021 18:33:16 +0000 (14:33 -0400)
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 <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
configure.ac
src/Makefile.am
tests/benchmark/Makefile.am
tests/common/Makefile.am
tests/regression/Makefile.am
tests/unit/Makefile.am
tests/utils/Makefile.am

index e6b9211c87a76ecf44884768b8c446a7f2cbf768..2b7ace568b60eddb682ea5c34d9d814d672accc6 100644 (file)
@@ -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"
index 215f09c00fbd2b714bd2bb466cea2bde9ffa47dd..37fa9fe94d562a71cdc2aee09ae31572a2153106 100644 (file)
@@ -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
index d268f3aa3155b8a87c9df795b73f7050b6a852d5..30c5291a6ba763117693c0c322905bf627f493b6 100644 (file)
@@ -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
index 223b9291a8cea4d86c459bca2a0e302e231d1a10..bfd5d57b08a66351e71abafc99e6feaf5aa636f2 100644 (file)
@@ -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
 
index 2cad8c4f7b176e040c8e6831efd4bbaa8491f355..f41bd1add51c3658938783a2a02026ac058c2fd5 100644 (file)
@@ -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
index ce01c9195765f0f967f7bd683f94189e64dfcbe6..f3ab6709a59df024afbd9f9deabec9499b240f24 100644 (file)
@@ -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) \
index 08c3778e146c7eadbf775e503e1eb63f42da8482..d39f7977c0da851fe67b71dd87ec16311767687b 100644 (file)
@@ -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
This page took 0.041456 seconds and 4 git commands to generate.