Skip to content

Makefile and meson.build install headers in different places #3

Description

@amadio

Makefile installs into /usr/include/tracefs/tracefs.h, while meson installs into /usr/include/libtracefs/tracefs.h. Linux's perf includes the header with #include <tracefs/tracefs.h>, so in Gentoo, where the ebuild uses meson to install libtracefs, we need a patch so that perf can find the header in the right place:
https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-util/perf/files/perf-6.4-libtracefs.patch

It would be nice if the Makefile and meson builds installed into the same place, then I could drop the patch for perf:

diff --git a/include/meson.build b/include/meson.build
index 52db432..3a9f140 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -7,5 +7,5 @@ headers = [
 ]
 
 foreach h : headers
-    install_headers(h, subdir : 'libtracefs')
+    install_headers(h, subdir : 'tracefs')
 endforeach
diff --git a/src/meson.build b/src/meson.build
index 31fd9ed..4853912 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -53,7 +53,7 @@ pkg = import('pkgconfig')
 pkg.generate(
     libtracefs,
     libraries: [libtraceevent_dep],
-    subdirs: 'libtracefs',
+    subdirs: 'tracefs',
     filebase: meson.project_name(),
     name: meson.project_name(),
     version: meson.project_version(),

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions