* [PATCH 0/2] Modifications needed by the NumPy interface
@ 2019-05-30 13:15 Yordan Karadzhov
2019-05-30 13:15 ` [PATCH 1/2] trace-cmd: Install public interface headers Yordan Karadzhov
2019-05-30 13:15 ` [PATCH 2/2] kernel-shark: " Yordan Karadzhov
0 siblings, 2 replies; 3+ messages in thread
From: Yordan Karadzhov @ 2019-05-30 13:15 UTC (permalink / raw)
To: rostedt; +Cc: linux-trace-devel, Yordan Karadzhov
The patch-set contains modifications of the build system (the "install"
part in particular) needed in order to implement a standalone version
of the NumPy data processing interface.
Yordan Karadzhov (2):
trace-cmd: Install public interface headers
kernel-shark: Install public interface headers
Makefile | 26 ++++++++----
kernel-shark/README | 4 ++
kernel-shark/src/CMakeLists.txt | 56 ++++++++++++++++++++++---
kernel-shark/src/plugins/CMakeLists.txt | 3 +-
4 files changed, 74 insertions(+), 15 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] trace-cmd: Install public interface headers
2019-05-30 13:15 [PATCH 0/2] Modifications needed by the NumPy interface Yordan Karadzhov
@ 2019-05-30 13:15 ` Yordan Karadzhov
2019-05-30 13:15 ` [PATCH 2/2] kernel-shark: " Yordan Karadzhov
1 sibling, 0 replies; 3+ messages in thread
From: Yordan Karadzhov @ 2019-05-30 13:15 UTC (permalink / raw)
To: rostedt; +Cc: linux-trace-devel, Yordan Karadzhov
Installing the header files included in the public interfaces of
the trace-cmd libraries will make possible the libraries to be used
for development.
Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
Makefile | 26 ++++++++++++++++++--------
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index cde45f8..ac514b1 100644
--- a/Makefile
+++ b/Makefile
@@ -49,10 +49,18 @@ html_install = $(prefix)/share/kernelshark/html
html_install_SQ = '$(subst ','\'',$(html_install))'
img_install = $(prefix)/share/kernelshark/html/images
img_install_SQ = '$(subst ','\'',$(img_install))'
-libdir ?= $(prefix)/lib
-libdir_SQ = '$(subst ','\'',$(libdir))'
-includedir = $(prefix)/include/trace-cmd
-includedir_SQ = '$(subst ','\'',$(includedir))'
+
+tcmd_libdir ?= $(prefix)/lib/trace-cmd
+tcmd_libdir_SQ = '$(subst ','\'',$(tcmd_libdir))'
+
+tevt_libdir ?= $(prefix)/lib/traceevent
+tevt_libdir_SQ = '$(subst ','\'',$(tevt_libdir))'
+
+tcmd_includedir = $(prefix)/include/trace-cmd
+tcmd_includedir_SQ = '$(subst ','\'',$(tcmd_includedir))'
+
+tevt_includedir = $(prefix)/include/traceevent
+tevt_includedir_SQ = '$(subst ','\'',$(tevt_includedir))'
export man_dir man_dir_SQ html_install html_install_SQ INSTALL
export img_install img_install_SQ
@@ -335,10 +343,12 @@ install_gui: install_cmd gui
$(Q)$(MAKE) $(S) -C $(kshark-dir)/build install
install_libs: libs
- $(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(libdir_SQ))
- $(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(libdir_SQ))
- $(Q)$(call do_install,$(src)/include/traceevent/event-parse.h,$(includedir_SQ))
- $(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(includedir_SQ))
+ $(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(tcmd_libdir_SQ))
+ $(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(tevt_libdir_SQ))
+ $(Q)$(call do_install,$(src)/include/traceevent/event-parse.h,$(tevt_includedir_SQ))
+ $(Q)$(call do_install,$(src)/include/traceevent/trace-seq.h,$(tevt_includedir_SQ))
+ $(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(tcmd_includedir_SQ))
+ $(Q)$(call do_install,$(src)/include/trace-cmd/trace-filter-hash.h,$(tcmd_includedir_SQ))
doc:
$(MAKE) -C $(src)/Documentation all
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] kernel-shark: Install public interface headers
2019-05-30 13:15 [PATCH 0/2] Modifications needed by the NumPy interface Yordan Karadzhov
2019-05-30 13:15 ` [PATCH 1/2] trace-cmd: Install public interface headers Yordan Karadzhov
@ 2019-05-30 13:15 ` Yordan Karadzhov
1 sibling, 0 replies; 3+ messages in thread
From: Yordan Karadzhov @ 2019-05-30 13:15 UTC (permalink / raw)
To: rostedt; +Cc: linux-trace-devel, Yordan Karadzhov
Installing the header files included in the public interfaces of
the KernelShark libraries will make possible the libraries to be used
for development.
A symbolic link that points to the latest versions of the libraries is
added to INSTALL_PREFIX/lib/kernelshark
Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
kernel-shark/README | 4 ++
kernel-shark/src/CMakeLists.txt | 56 ++++++++++++++++++++++---
kernel-shark/src/plugins/CMakeLists.txt | 3 +-
3 files changed, 56 insertions(+), 7 deletions(-)
diff --git a/kernel-shark/README b/kernel-shark/README
index 379c390..573e279 100644
--- a/kernel-shark/README
+++ b/kernel-shark/README
@@ -44,6 +44,10 @@ as a CMake Command-Line option.
2.1.3 By default, installation prefix is "/usr/local". It can be changed using
-D_INSTALL_PREFIX= as a CMake Command-Line option.
+2.1.4 In order to install a development version (including headers e.t.c) add
+-D_DEVEL=1 as a CMake Command-Line option.
+
+
Example:
cmake -D_DOXYGEN_DOC=1 -D_DEBUG=1 -D_INSTALL_PREFIX=/usr ../
diff --git a/kernel-shark/src/CMakeLists.txt b/kernel-shark/src/CMakeLists.txt
index 6cbc00f..36ce884 100644
--- a/kernel-shark/src/CMakeLists.txt
+++ b/kernel-shark/src/CMakeLists.txt
@@ -1,5 +1,13 @@
message("\n src ...")
+macro(install_symlink filepath sympath)
+ install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${filepath} ${sympath})")
+ install(CODE "LIST(APPEND CMAKE_INSTALL_MANIFEST_FILES ${sympath})")
+ install(CODE "message(\"-- Created symlink: ${sympath} -> ${filepath}\")")
+endmacro(install_symlink)
+
+set(KS_INCLUDS_DESTINATION "${_INSTALL_PREFIX}/include/${KS_APP_NAME}")
+
message(STATUS "libkshark")
add_library(kshark SHARED libkshark.c
libkshark-model.c
@@ -14,6 +22,22 @@ target_link_libraries(kshark ${CMAKE_DL_LIBS}
set_target_properties(kshark PROPERTIES SUFFIX ".so.${KS_VERSION_STRING}")
+install(TARGETS kshark LIBRARY DESTINATION ${_INSTALL_PREFIX}/lib/${KS_APP_NAME}
+ COMPONENT core)
+
+if (_DEVEL)
+
+ install_symlink("libkshark.so.${KS_VERSION_STRING}"
+ "${_INSTALL_PREFIX}/lib/${KS_APP_NAME}/libkshark.so")
+
+ install(FILES "${KS_DIR}/src/libkshark.h"
+ "${KS_DIR}/src/libkshark-plugin.h"
+ "${KS_DIR}/src/libkshark-model.h"
+ DESTINATION ${KS_INCLUDS_DESTINATION}
+ COMPONENT devel)
+
+endif (_DEVEL)
+
if (OPENGL_FOUND AND GLUT_FOUND)
message(STATUS "libkshark-plot")
@@ -26,6 +50,21 @@ if (OPENGL_FOUND AND GLUT_FOUND)
set_target_properties(kshark-plot PROPERTIES SUFFIX ".so.${KS_VERSION_STRING}")
+ install(TARGETS kshark-plot LIBRARY DESTINATION ${_INSTALL_PREFIX}/lib/${KS_APP_NAME}
+ COMPONENT core)
+
+ if (_DEVEL)
+
+ install_symlink("libkshark-plot.so.${KS_VERSION_STRING}"
+ "${_INSTALL_PREFIX}/lib/${KS_APP_NAME}/libkshark-plot.so")
+
+ install(FILES "${KS_DIR}/src/KsPlotTools.hpp"
+ "${KS_DIR}/src/libkshark-plot.h"
+ DESTINATION ${KS_INCLUDS_DESTINATION}
+ COMPONENT devel)
+
+ endif (_DEVEL)
+
endif (OPENGL_FOUND AND GLUT_FOUND)
if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
@@ -77,21 +116,26 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
add_executable(kshark-record kshark-record.cpp)
target_link_libraries(kshark-record kshark-gui)
- install(TARGETS ${KS_APP_NAME} kshark-record kshark kshark-plot kshark-gui
+ install(TARGETS ${KS_APP_NAME} kshark-record kshark-gui
RUNTIME DESTINATION ${_INSTALL_PREFIX}/bin/
- LIBRARY DESTINATION ${_INSTALL_PREFIX}/lib/${KS_APP_NAME}/)
+ LIBRARY DESTINATION ${_INSTALL_PREFIX}/lib/${KS_APP_NAME}
+ COMPONENT core)
install(FILES "${KS_DIR}/${KS_APP_NAME}.desktop"
- DESTINATION ${_INSTALL_PREFIX}/share/applications/)
+ DESTINATION ${_INSTALL_PREFIX}/share/applications/
+ COMPONENT core)
install(FILES "${KS_DIR}/icons/${KS_ICON}"
- DESTINATION ${_INSTALL_PREFIX}/share/icons/${KS_APP_NAME})
+ DESTINATION ${_INSTALL_PREFIX}/share/icons/${KS_APP_NAME}
+ COMPONENT core)
install(FILES "${KS_DIR}/org.freedesktop.kshark-record.policy"
- DESTINATION ${_INSTALL_PREFIX}/share/polkit-1/actions/)
+ DESTINATION ${_INSTALL_PREFIX}/share/polkit-1/actions/
+ COMPONENT core)
install(PROGRAMS "${KS_DIR}/bin/kshark-su-record"
- DESTINATION ${_INSTALL_PREFIX}/bin/)
+ DESTINATION ${_INSTALL_PREFIX}/bin/
+ COMPONENT core)
endif (Qt5Widgets_FOUND AND Qt5Network_FOUND)
diff --git a/kernel-shark/src/plugins/CMakeLists.txt b/kernel-shark/src/plugins/CMakeLists.txt
index 6c77179..51f6f65 100644
--- a/kernel-shark/src/plugins/CMakeLists.txt
+++ b/kernel-shark/src/plugins/CMakeLists.txt
@@ -28,6 +28,7 @@ BUILD_PLUGIN(NAME missed_events
list(APPEND PLUGIN_LIST "missed_events default") # This plugin will be loaded by default
install(TARGETS sched_events missed_events
- LIBRARY DESTINATION ${KS_PLUGIN_INSTALL_PREFIX})
+ LIBRARY DESTINATION ${KS_PLUGIN_INSTALL_PREFIX}
+ COMPONENT core)
set(PLUGINS ${PLUGIN_LIST} PARENT_SCOPE)
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-05-30 13:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-30 13:15 [PATCH 0/2] Modifications needed by the NumPy interface Yordan Karadzhov
2019-05-30 13:15 ` [PATCH 1/2] trace-cmd: Install public interface headers Yordan Karadzhov
2019-05-30 13:15 ` [PATCH 2/2] kernel-shark: " Yordan Karadzhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).