0001-libtracefs-add-option-to-disable-documentation.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From 881e23ed774360f93ca81f820d7897bd9bbd6d63 Mon Sep 17 00:00:00 2001
  2. From: Giulio Benetti <giulio.benetti@benettiengineering.com>
  3. Date: Sat, 30 Sep 2023 22:40:08 +0200
  4. Subject: [PATCH] libtracefs: add option to disable documentation
  5. On some Linux environment builder(i.e. Buildroot) host asciidoc is not
  6. provided since by default all man/docs are not installed to target but
  7. meson.build at the moment build ascii and html documentation and
  8. requires asciidoc making the building to fail. So let's add doc option
  9. set to true by default to let the user to override it and not produce
  10. the documentation.
  11. Upstream: https://patchwork.kernel.org/project/linux-trace-devel/patch/20230930204008.2528607-1-giulio.benetti@benettiengineering.com/
  12. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
  13. ---
  14. meson.build | 3 +++
  15. meson_options.txt | 2 ++
  16. 2 files changed, 5 insertions(+)
  17. diff --git a/meson.build b/meson.build
  18. index 9d42d78..f1e492e 100644
  19. --- a/meson.build
  20. +++ b/meson.build
  21. @@ -39,6 +39,8 @@ if cunit_dep.found()
  22. subdir('utest')
  23. endif
  24. subdir('samples')
  25. +
  26. +if get_option('doc')
  27. subdir('Documentation')
  28. custom_target(
  29. @@ -46,3 +48,4 @@ custom_target(
  30. output: 'docs',
  31. depends: [html, man],
  32. command: ['echo'])
  33. +endif
  34. diff --git a/meson_options.txt b/meson_options.txt
  35. index 1d92c28..5533a88 100644
  36. --- a/meson_options.txt
  37. +++ b/meson_options.txt
  38. @@ -14,3 +14,5 @@ option('man-bold-literal', type : 'boolean', value : false,
  39. description : 'enable bold literals')
  40. option('docbook-suppress-sp', type : 'boolean', value : false,
  41. description : 'docbook suppress sp')
  42. +option('doc', type : 'boolean', value: true,
  43. + description : 'produce documentation')
  44. --
  45. 2.34.1