Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libnvme/.readthedocs.yaml → .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ build:
post_install:
- pip3 install lxml
pre_build:
- meson setup .build -Ddocs=rst -Ddocs-build=true || cat .build/meson-logs/meson-log.txt
- meson setup .build -Ddocs=rst -Ddocs-build=true -Dnvme=disabled -Dlibnvme=disabled -Dpython=disabled || cat .build/meson-logs/meson-log.txt
- meson compile -C .build

sphinx:
configuration: .build/doc/conf.py
configuration: .build/libnvme/doc/conf.py
4 changes: 1 addition & 3 deletions Documentation/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,11 @@ adoc_includes = [
'cmds-main.txt',
]

want_docs = get_option('docs')
want_docs_build = get_option('docs-build')
if want_docs != 'false'
mandir = join_paths(get_option('mandir'), 'man1')
htmldir = join_paths(get_option('htmldir'), 'nvme')

asciidoctor = find_program('asciidoc', required: get_option('docs-build'))
asciidoctor = find_program('asciidoc', required: want_docs_build)
if want_docs_build and asciidoctor.found()
# Build documentation before installing
foreach file : adoc_includes
Expand Down
2 changes: 1 addition & 1 deletion libnvme/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# libnvme

![PyBuild](https://github.com/linux-nvme/nvme-cli/actions/workflows/release-python.yml/badge.svg)
![PyBuild](https://github.com/linux-nvme/nvme-cli/actions/workflows/libnvme-release-python.yml/badge.svg)
[![PyPI](https://img.shields.io/pypi/v/libnvme)](https://pypi.org/project/libnvme/)
[![PyPI - Wheel](https://img.shields.io/pypi/wheel/libnvme)](https://pypi.org/project/libnvme/)
[![codecov](https://codecov.io/gh/linux-nvme/nvme-cli/branch/master/graph/badge.svg)](https://codecov.io/gh/linux-nvme/nvme-cli)
Expand Down
2 changes: 0 additions & 2 deletions libnvme/doc/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ subdir('rst')

top_source_dir = meson.current_source_dir() + '/../'

want_docs = get_option('docs')
want_docs_build = get_option('docs-build')
kernel_doc = find_program(top_source_dir + 'scripts/kernel-doc')
kernel_doc_check = find_program(top_source_dir +'scripts/kernel-doc-check')

Expand Down
19 changes: 8 additions & 11 deletions libnvme/doc/rst/meson.build
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
top_source_dir = meson.current_source_dir() + '/../../'

want_docs = get_option('docs')

if want_docs != 'false'
want_docs_build = get_option('docs-build')
rstdir = get_option('rstdir')
if want_docs_build
kernel_doc = find_program(top_source_dir + 'scripts/kernel-doc')

rst_conf = configuration_data()
rst_conf.set('SYSCONFDIR', sysconfdir)

if want_docs == 'all' or want_docs == 'rst' or want_docs == 'html'
top_source_dir = meson.current_source_dir() + '/../../'
kernel_doc = find_program(top_source_dir + 'scripts/kernel-doc')
rst_conf = configuration_data(
{
'SYSCONFDIR' : sysconfdir,
}
)
rstdir = get_option('rstdir')
foreach apif : api_files
afile = files(top_source_dir + 'src/nvme/' + apif)
subst = configure_file(
Expand Down
2 changes: 1 addition & 1 deletion libnvme/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ if want_libnvme
if get_option('examples')
subdir('examples')
endif
subdir('doc')
else
# Fallback to using a pre-installed libnvme (if available)
if std_prefix
Expand All @@ -60,3 +59,4 @@ else
endif
endif

subdir('doc')
7 changes: 5 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ cxx_available = add_languages('cpp', required: false, native: false)
# dependencies are present. Also, -Dpython=enabled forces -Dlibnvme=enabled.
want_nvme = get_option('nvme').disabled() == false
want_libnvme = get_option('libnvme').disabled() == false
want_docs = get_option('docs')
want_docs_build = get_option('docs-build')

feature_python = get_option('python')
if feature_python.disabled()
Expand Down Expand Up @@ -561,10 +563,10 @@ if want_nvme
if get_option('nvme-tests')
subdir('tests')
endif

subdir('Documentation')
endif

subdir('Documentation')


################################################################################
install_data(
Expand Down Expand Up @@ -606,6 +608,7 @@ wanted_dict = {
'nvme': want_nvme,
'libnvme': want_libnvme,
'python bindings ': want_python,
'build docs': want_docs_build,
}
summary(wanted_dict, section: 'Features to build', bool_yn: true)

Expand Down