diff mbox series

[04/10] libtraceevent: Move installed headers into their own directory

Message ID 20211216213956.13934-5-rostedt@goodmis.org (mailing list archive)
State Accepted
Commit 1bdb9b7b66983408726ed4c8984e4659865e0155
Headers show
Series libtraceevent: Makefile updates fixes and unit tests | expand

Commit Message

Steven Rostedt Dec. 16, 2021, 9:39 p.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

It was noted that it is confusing that the headers that get installed and
are API are in the same directory as the source code. Create a
include/traceevent directory and move the headers that get installed onto
the system into that directory.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 Makefile                                  | 14 ++++++++------
 {src => include/traceevent}/event-parse.h |  0
 {src => include/traceevent}/event-utils.h |  0
 {src => include/traceevent}/kbuffer.h     |  0
 {src => include/traceevent}/trace-seq.h   |  0
 plugins/Makefile                          |  2 +-
 6 files changed, 9 insertions(+), 7 deletions(-)
 rename {src => include/traceevent}/event-parse.h (100%)
 rename {src => include/traceevent}/event-utils.h (100%)
 rename {src => include/traceevent}/kbuffer.h (100%)
 rename {src => include/traceevent}/trace-seq.h (100%)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 8b3b5cc1ea35..965eb56a8ea0 100644
--- a/Makefile
+++ b/Makefile
@@ -117,9 +117,11 @@  N		=
 LIBTRACEEVENT_STATIC = $(bdir)/libtraceevent.a
 LIBTRACEEVENT_SHARED = $(bdir)/libtraceevent.so.$(EVENT_PARSE_VERSION)
 
-INCLUDES = -I. -I $(srctree)/include $(CONFIG_INCLUDES)
+EP_HEADERS_DIR = $(src)/include/traceevent
 
-export LIBTRACEEVENT_STATIC LIBTRACEEVENT_SHARED
+INCLUDES = -I. -I $(srctree)/include -I $(EP_HEADERS_DIR) $(CONFIG_INCLUDES)
+
+export LIBTRACEEVENT_STATIC LIBTRACEEVENT_SHARED EP_HEADERS_DIR
 
 # Set compile option CFLAGS
 ifdef EXTRA_CFLAGS
@@ -334,10 +336,10 @@  install_pkgconfig: $(PKG_CONFIG_FILE)
 	$(Q)$(call do_install_pkgconfig_file,$(prefix))
 
 install_headers:
-	$(Q)$(call do_install,src/event-parse.h,$(includedir_SQ),644);
-	$(Q)$(call do_install,src/event-utils.h,$(includedir_SQ),644);
-	$(Q)$(call do_install,src/trace-seq.h,$(includedir_SQ),644);
-	$(Q)$(call do_install,src/kbuffer.h,$(includedir_SQ),644)
+	$(Q)$(call do_install,$(EP_HEADERS_DIR)/event-parse.h,$(includedir_SQ),644);
+	$(Q)$(call do_install,$(EP_HEADERS_DIR)/event-utils.h,$(includedir_SQ),644);
+	$(Q)$(call do_install,$(EP_HEADERS_DIR)/trace-seq.h,$(includedir_SQ),644);
+	$(Q)$(call do_install,$(EP_HEADERS_DIR)/kbuffer.h,$(includedir_SQ),644)
 
 install: install_libs
 
diff --git a/src/event-parse.h b/include/traceevent/event-parse.h
similarity index 100%
rename from src/event-parse.h
rename to include/traceevent/event-parse.h
diff --git a/src/event-utils.h b/include/traceevent/event-utils.h
similarity index 100%
rename from src/event-utils.h
rename to include/traceevent/event-utils.h
diff --git a/src/kbuffer.h b/include/traceevent/kbuffer.h
similarity index 100%
rename from src/kbuffer.h
rename to include/traceevent/kbuffer.h
diff --git a/src/trace-seq.h b/include/traceevent/trace-seq.h
similarity index 100%
rename from src/trace-seq.h
rename to include/traceevent/trace-seq.h
diff --git a/plugins/Makefile b/plugins/Makefile
index 8b1dbf68757c..4c8cb177b668 100644
--- a/plugins/Makefile
+++ b/plugins/Makefile
@@ -62,7 +62,7 @@  CONFIG_FLAGS   =
 OBJ            = $@
 N              =
 
-INCLUDES = -I. -I.. -I../src -I $(srctree)/include $(CONFIG_INCLUDES)
+INCLUDES = -I. -I.. -I../src -I $(srctree)/include -I $(EP_HEADERS_DIR) $(CONFIG_INCLUDES)
 
 # Set compile option CFLAGS
 ifdef EXTRA_CFLAGS