Add 'src' dir to global include path
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 2 Apr 2021 15:47:52 +0000 (11:47 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 9 Apr 2021 15:39:45 +0000 (11:39 -0400)
The objective is to move internal headers from the global 'include'
directory to their respective private directories under 'src'.

Move the private generated 'config.h' to 'src/common/config.h', this way
it can be include with 'common/config.h' and reduce the risk of clashing
with a similarly named file.

This is part of an effort to standardize our autotools setup across
projects to simplify maintenance.

Change-Id: Ie62a81e46458bffb6d31af66411865f23cf1cb4f
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
.gitignore
configure.ac
doc/examples/Makefile.am
src/common/.placeholder [new file with mode: 0644]

index 7bf195fbaa0b04c2675b3daa748f707b54f32d0f..42171575269fcd4dc83e9d899bc447a73d2316d0 100644 (file)
@@ -19,9 +19,6 @@ cscope.*
 /configure
 /aclocal.m4
 /autom4te.cache
-/include/config.h
-/include/config.h.in
-/include/stamp-h1
 /include/lttng/stamp-h2
 /include/lttng/stamp-h3
 /include/lttng/ust-version.h
@@ -49,8 +46,11 @@ cscope.*
 /config.status
 /libtool
 
-/src/lttng-ust.pc
+/src/common/config.h
+/src/common/config.h.in
+/src/common/stamp-h1
 /src/lttng-ust-ctl.pc
+/src/lttng-ust.pc
 
 /doc/examples/demo/demo
 /doc/examples/easy-ust/sample
index 99b998524b7236d6361bef844716131b6ee569a4..80226c789f0d9a8ae9d6200cc1e14e6d6c73a1ca 100644 (file)
@@ -38,7 +38,7 @@ m4_define([ust_ctl_lib_version], ust_ctl_lib_version_current[:]ust_ctl_lib_versi
 AC_PREREQ([2.69])
 AC_INIT([lttng-ust],[ust_version],[mathieu dot desnoyers at efficios dot com],[],[https://lttng.org])
 
-AC_CONFIG_HEADERS([include/config.h include/lttng/ust-config.h include/lttng/ust-version.h])
+AC_CONFIG_HEADERS([src/common/config.h include/lttng/ust-config.h include/lttng/ust-version.h])
 AC_CONFIG_AUX_DIR([config])
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -501,7 +501,7 @@ AC_SUBST(AM_CXXFLAGS)
 # 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"
+AM_CPPFLAGS="-I\$(top_builddir)/include -I\$(top_srcdir)/include -I\$(top_builddir)/src -I\$(top_srcdir)/src -include common/config.h"
 AC_SUBST(AM_CPPFLAGS)
 
 AC_SUBST(JNI_CPPFLAGS)
index 93132f6a9d9e14aad8263f3feb8e0232f6ab6493..06e40662f1004e8aa6a0234330bb79584c280fbe 100644 (file)
@@ -136,7 +136,9 @@ all-local:
                                CPPFLAGS="$(CPPFLAGS)" \
                                AM_CPPFLAGS="$(AM_CPPFLAGS) \
                                -I$$rel_src_subdir$(top_srcdir)/include/ \
-                               -I$$rel_build_subdir$(top_builddir)/include/" \
+                               -I$$rel_build_subdir$(top_builddir)/include/ \
+                               -I$$rel_src_subdir$(top_srcdir)/src/ \
+                               -I$$rel_build_subdir$(top_builddir)/src/" \
                                CFLAGS='$(CFLAGS)' \
                                AM_CFLAGS='$(AM_CFLAGS)' \
                                LDFLAGS="$(LDFLAGS)" \
diff --git a/src/common/.placeholder b/src/common/.placeholder
new file mode 100644 (file)
index 0000000..959eb25
--- /dev/null
@@ -0,0 +1 @@
+# Git doesn't support empty folders
This page took 0.02686 seconds and 4 git commands to generate.