SHA256
1
0
forked from pool/libtracefs

Accepting request 1063658 from home:wagi:branches:devel:trace

- Sync meson build patch with latest upstream version
  * Documentation is build via extra build target

OBS-URL: https://build.opensuse.org/request/show/1063658
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libtracefs?expand=0&rev=28
This commit is contained in:
Jan Engelhardt 2023-02-08 10:01:09 +00:00 committed by Git OBS Bridge
parent a5b2247176
commit ae6c72b25c
3 changed files with 219 additions and 175 deletions

View File

@ -1,43 +1,78 @@
From 376e39f8d2f45709fdee46fc2f97b3f56c767ce9 Mon Sep 17 00:00:00 2001 From de739be1299aaa30469fc90ddc0f97ea915c784e Mon Sep 17 00:00:00 2001
From: Daniel Wagner <dwagner@suse.de> From: Daniel Wagner <dwagner@suse.de>
Date: Thu, 7 Jul 2022 14:05:49 +0200 Date: Thu, 7 Jul 2022 14:05:49 +0200
Subject: [PATCH] libtracefs: Add initial support for meson Subject: [PATCH v7] libtracefs: Add initial support for meson
Introduce Meson as build framework for building libtracefs. This Introduce Meson as build framework for building libtracefs.
lives besides the Makefiles until all the expected initial fallouts
have been dealed with.
The build steps are: The build steps are:
# configure using .build as build directory and install destination # configure using .build as build directory and install destination
# /tmp/test # /tmp/test
meson --prefix=/tmp/libtracefs .build meson setup --prefix=/tmp/libtraceevent .build
# trigger the build # trigger the build
ninja -C .build meson compile -C .build
# install the library # In case you want to build the documentation, trigger the
ninja -C .build install # build via the 'docs' target:
meson compile -C build docs
In case you want to build/install the documentation the setup is # install the library (and documentation)
meson install -C .build
meson -Ddocs-build=true .build
Signed-off-by: Daniel Wagner <dwagner@suse.de> Signed-off-by: Daniel Wagner <dwagner@suse.de>
--- ---
Documentation/install-man.sh.in | 15 +++ v7:
Documentation/list-txt.sh | 11 ++ - set default html doc path to share/doc/libtracefs-doc
Documentation/meson.build | 177 ++++++++++++++++++++++++++++++++ - list libtraceevent in Required pkg-config section.
include/meson.build | 9 ++ - install (any) man5 pages (keep it in sync with other projects)
meson.build | 50 +++++++++
meson_options.txt | 18 ++++ v6:
samples/extract-example.sh | 3 + - changed project defaults to --default-library=both
samples/meson.build | 46 +++++++++ - code style consistency updates
src/meson.build | 65 ++++++++++++ - hardening doc install script (shellcheck)
utest/meson.build | 17 +++ - renamed install-man.sh.in to install-docs.sh.in
10 files changed, 411 insertions(+) - install-docs.sh.in installs html pages too
create mode 100755 Documentation/install-man.sh.in - introduces docs target
create mode 100644 Documentation/list-txt.sh - updated copyright year
- streamlined documentation meson build file
v5:
- build unit test only if cunit is found
- default build target is debug
- do not install man pages into subdirs
- install sqlhist (because we install the man page too, so why not the tool?)
v4:
- add subdir include path to cflags in pkgconfg file
- refactoring build instruction for section 1 and section 3 documentation
into one loop (reduce code duplication)
v3:
- build documetation
- build samples
- set default location to /usr/local
v2:
- updated commit message
- dropped the include path patch, the pkg-config
from libtraceevent is including them
v1:
- initial version
Documentation/install-docs.sh.in | 20 ++++
Documentation/meson.build | 197 +++++++++++++++++++++++++++++++
include/meson.build | 11 ++
meson.build | 47 ++++++++
meson_options.txt | 16 +++
samples/extract-example.sh | 3 +
samples/meson.build | 45 +++++++
src/meson.build | 63 ++++++++++
utest/meson.build | 17 +++
9 files changed, 419 insertions(+)
create mode 100755 Documentation/install-docs.sh.in
create mode 100644 Documentation/meson.build create mode 100644 Documentation/meson.build
create mode 100644 include/meson.build create mode 100644 include/meson.build
create mode 100644 meson.build create mode 100644 meson.build
@ -47,55 +82,44 @@ Signed-off-by: Daniel Wagner <dwagner@suse.de>
create mode 100644 src/meson.build create mode 100644 src/meson.build
create mode 100644 utest/meson.build create mode 100644 utest/meson.build
diff --git a/Documentation/install-man.sh.in b/Documentation/install-man.sh.in diff --git a/Documentation/install-docs.sh.in b/Documentation/install-docs.sh.in
new file mode 100755 new file mode 100755
index 000000000000..8ab2cb982e1d index 000000000000..eca9b1f42dcc
--- /dev/null --- /dev/null
+++ b/Documentation/install-man.sh.in +++ b/Documentation/install-docs.sh.in
@@ -0,0 +1,15 @@ @@ -0,0 +1,20 @@
+#!/bin/bash +#!/bin/bash
+
+for man in $(find @SRCDIR@ -name '*\.1' -type f); do
+ [ ! -d ${DESTDIR}/@MANDIR@/man1/ ] && install -d ${DESTDIR}/@MANDIR@/man1/
+
+ echo Installing $man to ${DESTDIR}/@MANDIR@/man1/
+ install -m 0644 $man ${DESTDIR}/@MANDIR@/man1/
+done
+
+for man in $(find @SRCDIR@ -name '*\.3' -type f); do
+ [ ! -d ${DESTDIR}/@MANDIR@/man3/ ] && install -d ${DESTDIR}/@MANDIR@/man3/
+
+ echo Installing $man to ${DESTDIR}/@MANDIR@/man3/
+ install -m 0644 $man ${DESTDIR}/@MANDIR@/man3/
+done
diff --git a/Documentation/list-txt.sh b/Documentation/list-txt.sh
new file mode 100644
index 000000000000..89c3bceff14c
--- /dev/null
+++ b/Documentation/list-txt.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+SECTION=$1
+TXT_PATH=$2
+
+if [ "$SECTION" = "1" ] ; then
+ ls -1 ${TXT_PATH}/libtracefs-*.txt.1
+elif [ "$SECTION" = "3" ] ; then
+ ls -1 ${TXT_PATH}/libtracefs-*.txt
+ ls -1 ${TXT_PATH}/libtracefs.txt
+fi
diff --git a/Documentation/meson.build b/Documentation/meson.build
new file mode 100644
index 000000000000..07ac222201b8
--- /dev/null
+++ b/Documentation/meson.build
@@ -0,0 +1,177 @@
+# SPDX-License-Identifier: LGPL-2.1 +# SPDX-License-Identifier: LGPL-2.1
+# +#
+# Copyright (c) 2022 Daniel Wagner, SUSE LLC +# Copyright (c) 2023 Daniel Wagner, SUSE LLC
+
+for section in 1 3 5; do
+ while IFS= read -r -d '' man; do
+ [ ! -d "${DESTDIR}@MANDIR@/man${section}" ] && install -d "${DESTDIR}@MANDIR@/man${section}"
+
+ echo Installing "${man}" to "${DESTDIR}@MANDIR@/man${section}"
+ install -m 0644 "${man}" "${DESTDIR}@MANDIR@/man${section}/"
+ done< <(find "@SRCDIR@" -name "*\.${section}" -type f -print0)
+done
+
+while IFS= read -r -d '' html; do
+ [ ! -d "${DESTDIR}@HTMLDIR@" ] && install -d "${DESTDIR}@HTMLDIR@"
+
+ echo Installing "${html}" to "${DESTDIR}@HTMLDIR@"
+ install -m 0644 "${html}" "${DESTDIR}@HTMLDIR@"
+done< <(find "@SRCDIR@" -name "*\.html" -type f -print0)
diff --git a/Documentation/meson.build b/Documentation/meson.build
new file mode 100644
index 000000000000..efb78b602965
--- /dev/null
+++ b/Documentation/meson.build
@@ -0,0 +1,197 @@
+# SPDX-License-Identifier: LGPL-2.1
+#
+# Copyright (c) 2023 Daniel Wagner, SUSE LLC
+ +
+# input text file: man page section +# input text file: man page section
+
+sources = { +sources = {
+ 'libtracefs-sqlhist.txt.1': '1', + 'libtracefs-sqlhist.txt.1': '1',
+ 'libtracefs-cpu-open.txt': '3', + 'libtracefs-cpu-open.txt': '3',
@ -137,20 +161,23 @@ index 000000000000..07ac222201b8
+ 'libtracefs-utils.txt': '3', + 'libtracefs-utils.txt': '3',
+} +}
+ +
+# +conf_dir = meson.current_source_dir() + '/'
+top_source_dir = meson.current_source_dir() + '/../'
+
+##
+# For asciidoc ... +# For asciidoc ...
+# -7.1.2, no extra settings are needed. +# -7.1.2, no extra settings are needed.
+# 8.0-, set ASCIIDOC8. +# 8.0-, set ASCIIDOC8.
+# +#
+ +
+# +#
+# For docbook-xsl ... +# For docbook-xsl ...
+# -1.68.1, set ASCIIDOC_NO_ROFF? (based on changelog from 1.73.0) +# -1.68.1, set ASCIIDOC_NO_ROFF? (based on changelog from 1.73.0)
+# 1.69.0, no extra settings are needed? +# 1.69.0, no extra settings are needed?
+# 1.69.1-1.71.0, set DOCBOOK_SUPPRESS_SP? +# 1.69.1-1.71.0, set DOCBOOK_SUPPRESS_SP?
+# 1.71.1, no extra settings are needed? +# 1.71.1, no extra settings are needed?
+# 1.72.0, set DOCBOOK_XSL_172. +# 1.72.0, set DOCBOOK_XSL_172.
+# 1.73.0-, set ASCIIDOC_NO_ROFF +# 1.73.0-, set ASCIIDOC_NO_ROFF
+# +#
+ +
+# +#
@ -171,7 +198,7 @@ index 000000000000..07ac222201b8
+else +else
+ asciidoc = find_program('asciidoc') + asciidoc = find_program('asciidoc')
+ asciidoc_extra = ['--unsafe'] + asciidoc_extra = ['--unsafe']
+ asciidoc_extra += ['-f', meson.current_source_dir() + '/asciidoc.conf'] + asciidoc_extra += ['-f', conf_dir + 'asciidoc.conf']
+ asciidoc_html = 'xhtml11' + asciidoc_html = 'xhtml11'
+ +
+ r = run_command(asciidoc, '--version', check: true) + r = run_command(asciidoc, '--version', check: true)
@ -181,11 +208,11 @@ index 000000000000..07ac222201b8
+ endif + endif
+endif +endif
+ +
+manpage_xsl = meson.current_source_dir() + '/manpage-normal.xsl' +manpage_xsl = conf_dir + 'manpage-normal.xsl'
+ +
+if get_option('docbook-xls-172') +if get_option('docbook-xls-172')
+ asciidoc_extra += ['-a', 'libtraceevent-asciidoc-no-roff'] + asciidoc_extra += ['-a', 'libtraceevent-asciidoc-no-roff']
+ manpage_xsl = meson.current_source_dir() + '/manpage-1.72.xsl' + manpage_xsl = conf_dir + 'manpage-1.72.xsl'
+elif get_option('asciidoc-no-roff') +elif get_option('asciidoc-no-roff')
+ # docbook-xsl after 1.72 needs the regular XSL, but will not + # docbook-xsl after 1.72 needs the regular XSL, but will not
+ # pass-thru raw roff codes from asciidoc.conf, so turn them off. + # pass-thru raw roff codes from asciidoc.conf, so turn them off.
@ -196,51 +223,63 @@ index 000000000000..07ac222201b8
+xmlto_extra = [] +xmlto_extra = []
+ +
+if get_option('man-bold-literal') +if get_option('man-bold-literal')
+ xmlto_extra += ['-m ', meson.current_source_dir() + '/manpage-bold-literal.xsl'] + xmlto_extra += ['-m ', conf_dir + 'manpage-bold-literal.xsl']
+endif +endif
+ +
+if get_option('docbook-suppress-sp') +if get_option('docbook-suppress-sp')
+ xmlto_extra += ['-m ', meson.current_source_dir() + '/manpage-suppress-sp.xsl'] + xmlto_extra += ['-m ', conf_dir + 'manpage-suppress-sp.xsl']
+endif +endif
+ +
+gen = generator(asciidoc, +check_doc = custom_target(
+ output: '@BASENAME@.xml', + 'check-doc',
+ arguments: [ + output: 'dummy',
+ '-b', 'docbook', + command : [
+ '-d', 'manpage', + top_source_dir + 'check-manpages.sh',
+ '-a', 'libtraceevent_version=' + meson.project_version(), + meson.current_source_dir()])
+ '-o', '@OUTPUT@']
+ + asciidoc_extra
+ + ['@INPUT@'])
+ +
+gen = generator(
+ asciidoc,
+ output: '@BASENAME@.xml',
+ arguments: [
+ '-b', 'docbook',
+ '-d', 'manpage',
+ '-a', 'libtraceevent_version=' + meson.project_version(),
+ '-o', '@OUTPUT@']
+ + asciidoc_extra
+ + ['@INPUT@'])
+
+man = []
+html = []
+foreach txt, section : sources +foreach txt, section : sources
+ # build man page(s) + # build man page(s)
+ xml = gen.process(txt) + xml = gen.process(txt)
+ man = custom_target(txt.underscorify() + '_man', + man += custom_target(
+ input: xml, + txt.underscorify() + '_man',
+ output: '@BASENAME@.' + section, + input: xml,
+ command: [xmlto, + output: '@BASENAME@.' + section,
+ '-m', manpage_xsl, + depends: check_doc,
+ 'man', + command: [
+ '-o', '@OUTPUT@'] + xmlto,
+ + xmlto_extra + '-m', manpage_xsl,
+ + ['@INPUT@'], + 'man',
+ build_by_default : true) + '-o', '@OUTPUT@']
+ + xmlto_extra
+ + ['@INPUT@'])
+ +
+ # build html pages + # build html pages
+ custom_target( + html += custom_target(
+ txt.underscorify() + '_html', + txt.underscorify() + '_html',
+ input: txt, + input: txt,
+ output: '@BASENAME@.html', + output: '@BASENAME@.html',
+ command: [asciidoc, + depends: check_doc,
+ '-b', asciidoc_html, + command: [
+ '-d', 'manpage', + asciidoc,
+ '-a', 'libtraceevent_version=' + meson.project_version(), + '-b', asciidoc_html,
+ '-o', '@OUTPUT@'] + '-d', 'manpage',
+ + asciidoc_extra + '-a', 'libtraceevent_version=' + meson.project_version(),
+ + ['@INPUT@'], + '-o', '@OUTPUT@']
+ install: true, + + asciidoc_extra
+ install_dir: htmldir) + + ['@INPUT@'])
+endforeach +endforeach
+ +
+# Install path workaround because: +# Install path workaround because:
@ -254,44 +293,50 @@ index 000000000000..07ac222201b8
+# causing the install step to fail (confusion where the generated files +# causing the install step to fail (confusion where the generated files
+# are stored) +# are stored)
+# +#
+# - The documentation build is not part of the 'build' target. The user
+# has explicitly to trigger the doc build. Hence the documentation is
+# not added to the 'install' target.
+#
+# Thus just use a plain old shell script to move the generated files to the +# Thus just use a plain old shell script to move the generated files to the
+# right location. +# right location.
+ +
+conf = configuration_data() +conf = configuration_data()
+conf.set('SRCDIR', meson.current_build_dir()) +conf.set('SRCDIR', meson.current_build_dir())
+conf.set('MANDIR', mandir) +conf.set('MANDIR', mandir)
+conf.set('HTMLDIR', htmldir)
+configure_file( +configure_file(
+ input: 'install-man.sh.in', + input: 'install-docs.sh.in',
+ output: 'install-man.sh', + output: 'install-docs.sh',
+ configuration: conf, + configuration: conf)
+)
+ +
+meson.add_install_script( +meson.add_install_script(
+ join_paths(meson.current_build_dir(), 'install-man.sh')) + join_paths(meson.current_build_dir(), 'install-docs.sh'))
diff --git a/include/meson.build b/include/meson.build diff --git a/include/meson.build b/include/meson.build
new file mode 100644 new file mode 100644
index 000000000000..1bbfe8afb280 index 000000000000..52db432c8275
--- /dev/null --- /dev/null
+++ b/include/meson.build +++ b/include/meson.build
@@ -0,0 +1,9 @@ @@ -0,0 +1,11 @@
+# SPDX-License-Identifier: LGPL-2.1 +# SPDX-License-Identifier: LGPL-2.1
+#
+# Copyright (c) 2023 Daniel Wagner, SUSE LLC
+ +
+headers = [ +headers = [
+ 'tracefs.h', + 'tracefs.h',
+] +]
+ +
+foreach h : headers +foreach h : headers
+ install_headers(h, subdir : 'libtracefs') + install_headers(h, subdir : 'libtracefs')
+endforeach +endforeach
diff --git a/meson.build b/meson.build diff --git a/meson.build b/meson.build
new file mode 100644 new file mode 100644
index 000000000000..1ef7969d655a index 000000000000..e793cfc16e14
--- /dev/null --- /dev/null
+++ b/meson.build +++ b/meson.build
@@ -0,0 +1,50 @@ @@ -0,0 +1,47 @@
+# SPDX-License-Identifier: LGPL-2.1 +# SPDX-License-Identifier: LGPL-2.1
+# +#
+# Copyright (c) 2022 Daniel Wagner, SUSE LLC +# Copyright (c) 2023 Daniel Wagner, SUSE LLC
+ +
+project( +project(
+ 'libtracefs', ['c'], + 'libtracefs', ['c'],
@ -299,12 +344,11 @@ index 000000000000..1ef7969d655a
+ license: 'LGPL-2.1', + license: 'LGPL-2.1',
+ version: '1.6.3', + version: '1.6.3',
+ default_options: [ + default_options: [
+ 'c_std=gnu99', + 'c_std=gnu99',
+ 'buildtype=debug', + 'buildtype=debug',
+ 'prefix=/usr/local', + 'default_library=both',
+ 'warning_level=1', + 'prefix=/usr/local',
+ ] + 'warning_level=1'])
+)
+ +
+library_version = meson.project_version() +library_version = meson.project_version()
+ +
@ -312,16 +356,15 @@ index 000000000000..1ef7969d655a
+cunit_dep = dependency('cunit', required : false) +cunit_dep = dependency('cunit', required : false)
+ +
+prefixdir = get_option('prefix') +prefixdir = get_option('prefix')
+bindir = join_paths(prefixdir, get_option('bindir')) +bindir = join_paths(prefixdir, get_option('bindir'))
+mandir = join_paths(prefixdir, get_option('mandir')) +mandir = join_paths(prefixdir, get_option('mandir'))
+htmldir = join_paths(prefixdir, get_option('htmldir')) +htmldir = join_paths(prefixdir, get_option('htmldir'))
+ +
+add_project_arguments( +add_project_arguments(
+ [ + [
+ '-D_GNU_SOURCE', + '-D_GNU_SOURCE',
+ ], + ],
+ language : 'c', + language : 'c')
+)
+ +
+incdir = include_directories(['include']) +incdir = include_directories(['include'])
+ +
@ -331,27 +374,24 @@ index 000000000000..1ef7969d655a
+ subdir('utest') + subdir('utest')
+endif +endif
+subdir('samples') +subdir('samples')
+if get_option('docs-build') +subdir('Documentation')
+ custom_target('check-doc', +
+ output: 'dummy', +custom_target(
+ command : ['check-manpages.sh', + 'docs',
+ meson.current_source_dir() + '/Documentation'], + output: 'docs',
+ build_by_default : true) + depends: [html, man],
+ subdir('Documentation') + command: ['echo'])
+endif
diff --git a/meson_options.txt b/meson_options.txt diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644 new file mode 100644
index 000000000000..9bcd66f49f06 index 000000000000..1d92c28d5935
--- /dev/null --- /dev/null
+++ b/meson_options.txt +++ b/meson_options.txt
@@ -0,0 +1,18 @@ @@ -0,0 +1,16 @@
+# SPDX-License-Identifier: LGPL-2.1 +# SPDX-License-Identifier: LGPL-2.1
+# +#
+# Copyright (c) 2022 Daniel Wagner, SUSE LLC +# Copyright (c) 2023 Daniel Wagner, SUSE LLC
+ +
+option('docs-build', type : 'boolean', value : false, +option('htmldir', type : 'string', value : 'share/doc/libtracefs-doc',
+ description : 'build documentation')
+option('htmldir', type : 'string', value : '',
+ description : 'directory for HTML documentation') + description : 'directory for HTML documentation')
+option('asciidoctor', type : 'boolean', value: false, +option('asciidoctor', type : 'boolean', value: false,
+ description : 'use asciidoctor instead of asciidoc') + description : 'use asciidoctor instead of asciidoc')
@ -374,13 +414,13 @@ index 000000000000..c5c0f702e7f0
+cat $1 | sed -ne '/^EXAMPLE/,/FILES/ { /EXAMPLE/,+2d ; /^FILES/d ; /^--/d ; p}' > $2 +cat $1 | sed -ne '/^EXAMPLE/,/FILES/ { /EXAMPLE/,+2d ; /^FILES/d ; /^--/d ; p}' > $2
diff --git a/samples/meson.build b/samples/meson.build diff --git a/samples/meson.build b/samples/meson.build
new file mode 100644 new file mode 100644
index 000000000000..0c36231ef29a index 000000000000..5e8ad270f812
--- /dev/null --- /dev/null
+++ b/samples/meson.build +++ b/samples/meson.build
@@ -0,0 +1,46 @@ @@ -0,0 +1,45 @@
+# SPDX-License-Identifier: LGPL-2.1 +# SPDX-License-Identifier: LGPL-2.1
+# +#
+# Copyright (c) 2022 Daniel Wagner, SUSE LLC +# Copyright (c) 2023 Daniel Wagner, SUSE LLC
+ +
+examples = [ +examples = [
+ 'dynevents', + 'dynevents',
@ -400,9 +440,10 @@ index 000000000000..0c36231ef29a
+] +]
+ +
+extract_examples = find_program('extract-example.sh') +extract_examples = find_program('extract-example.sh')
+gen = generator(extract_examples, +gen = generator(
+ output: '@BASENAME@.c', + extract_examples,
+ arguments: ['@INPUT@', '@OUTPUT@']) + output: '@BASENAME@.c',
+ arguments: ['@INPUT@', '@OUTPUT@'])
+ +
+foreach ex : examples +foreach ex : examples
+ src = gen.process(meson.current_source_dir() + '/../Documentation/libtracefs-@0@.txt'.format(ex)) + src = gen.process(meson.current_source_dir() + '/../Documentation/libtracefs-@0@.txt'.format(ex))
@ -410,8 +451,7 @@ index 000000000000..0c36231ef29a
+ ex.underscorify(), + ex.underscorify(),
+ src, + src,
+ dependencies: [libtracefs_dep, libtraceevent_dep], + dependencies: [libtracefs_dep, libtraceevent_dep],
+ include_directories: [incdir] + include_directories: [incdir])
+ )
+endforeach +endforeach
+ +
+# sqlhist is unique and stands on its own +# sqlhist is unique and stands on its own
@ -422,17 +462,16 @@ index 000000000000..0c36231ef29a
+ dependencies: [libtracefs_dep, libtraceevent_dep], + dependencies: [libtracefs_dep, libtraceevent_dep],
+ include_directories: [incdir], + include_directories: [incdir],
+ install: true, + install: true,
+ install_dir: bindir, + install_dir: bindir)
+)
diff --git a/src/meson.build b/src/meson.build diff --git a/src/meson.build b/src/meson.build
new file mode 100644 new file mode 100644
index 000000000000..43139b6de268 index 000000000000..56087e2301bf
--- /dev/null --- /dev/null
+++ b/src/meson.build +++ b/src/meson.build
@@ -0,0 +1,65 @@ @@ -0,0 +1,63 @@
+# SPDX-License-Identifier: LGPL-2.1 +# SPDX-License-Identifier: LGPL-2.1
+# +#
+# Copyright (c) 2022 Daniel Wagner, SUSE LLC +# Copyright (c) 2023 Daniel Wagner, SUSE LLC
+ +
+sources= [ +sources= [
+ 'tracefs-dynevents.c', + 'tracefs-dynevents.c',
@ -470,40 +509,38 @@ index 000000000000..43139b6de268
+ version: library_version, + version: library_version,
+ dependencies: [libtraceevent_dep], + dependencies: [libtraceevent_dep],
+ include_directories: [incdir], + include_directories: [incdir],
+ install: true, + install: true)
+)
+ +
+libtracefs_static = static_library( +libtracefs_static = static_library(
+ 'tracefs_static', + 'tracefs_static',
+ sources, lfiles, pfiles, + sources, lfiles, pfiles,
+ dependencies: [libtraceevent_dep], + dependencies: [libtraceevent_dep],
+ include_directories: [incdir], + include_directories: [incdir],
+ install: false, + install: false)
+)
+ +
+pkg = import('pkgconfig') +pkg = import('pkgconfig')
+pkg.generate(libtracefs, +pkg.generate(
+ libtracefs,
+ libraries: [libtraceevent_dep],
+ subdirs: 'libtracefs', + subdirs: 'libtracefs',
+ filebase: meson.project_name(), + filebase: meson.project_name(),
+ name: meson.project_name(), + name: meson.project_name(),
+ version: meson.project_version(), + version: meson.project_version(),
+ description: 'Manage trace fs', + description: 'Manage trace fs',
+ url: 'https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/', + url: 'https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/')
+)
+ +
+libtracefs_dep = declare_dependency( +libtracefs_dep = declare_dependency(
+ include_directories: ['.'], + include_directories: ['.'],
+ link_with: libtracefs, + link_with: libtracefs)
+)
diff --git a/utest/meson.build b/utest/meson.build diff --git a/utest/meson.build b/utest/meson.build
new file mode 100644 new file mode 100644
index 000000000000..8c8caf37803d index 000000000000..91a526fca2bf
--- /dev/null --- /dev/null
+++ b/utest/meson.build +++ b/utest/meson.build
@@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
+# SPDX-License-Identifier: LGPL-2.1 +# SPDX-License-Identifier: LGPL-2.1
+# +#
+# Copyright (c) 2022 Daniel Wagner, SUSE LLC +# Copyright (c) 2023 Daniel Wagner, SUSE LLC
+ +
+source = [ +source = [
+ 'trace-utest.c', + 'trace-utest.c',

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Feb 7 13:23:20 UTC 2023 - Daniel Wagner <daniel.wagner@suse.com>
- Sync meson build patch with latest upstream version
* Documentation is build via extra build target
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jan 18 09:39:05 UTC 2023 - Dirk Müller <dmueller@suse.com> Wed Jan 18 09:39:05 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@ -72,9 +72,10 @@ This subpackage contains the header files.
%build %build
%meson \ %meson \
-Ddocs-build=true \ --default-library=shared \
-Dhtmldir="%_docdir/%name" -Dhtmldir="%_docdir/%name"
%meson_build %meson_build
%meson_build docs
%install %install
%meson_install %meson_install