/
githubmirror
/
nvme-cli
Обзор
Документация
Войти
/
githubmirror
/
nvme-cli
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Documentation/meson.build
436 строк
13 KB
Daniel Wagner
doc: do not install discoverd man page when disabled
05 авг 2026, 17:12
05 авг 2026, 17:12
42d933c
Код
Авторство
О чём код?
# SPDX-License-Identifier: GPL-2.0-or-later # # This file is part of nvme-cli. # Copyright (c) 2026 SUSE Software Solutions # # Authors: Daniel Wagner <dwagner@suse.de> adoc_sources_man1 = [ 'nvme', 'nvme-admin-passthru', 'nvme-ana-log', 'nvme-attach-ns', 'nvme-boot-part-log', 'nvme-capacity-mgmt', 'nvme-changed-ns-list-log', 'nvme-cmdset-ind-id-ns', 'nvme-compare', 'nvme-config-convert', 'nvme-config-create', 'nvme-config-show', 'nvme-config-validate', 'nvme-connect', 'nvme-connect-all', 'nvme-copy', 'nvme-create-ns', 'nvme-dapustor-smart-log-add', 'nvme-delete-ns', 'nvme-dera-stat', 'nvme-detach-ns', 'nvme-device-self-test', 'nvme-dim', 'nvme-dir-receive', 'nvme-dir-send', 'nvme-disconnect', 'nvme-disconnect-all', 'nvme-discover', 'nvme-dsm', 'nvme-effects-log', 'nvme-endurance-event-agg-log', 'nvme-endurance-log', 'nvme-error-log', 'nvme-exclusion-add', 'nvme-exclusion-create', 'nvme-exclusion-delete', 'nvme-exclusion-edit', 'nvme-exclusion-list', 'nvme-exclusion-remove', 'nvme-fdp-configs', 'nvme-fdp-events', 'nvme-fdp-feature', 'nvme-fdp-set-events', 'nvme-fdp-stats', 'nvme-fdp-status', 'nvme-fdp-update', 'nvme-fdp-usage', 'nvme-fid-support-effects-log', 'nvme-flush', 'nvme-format', 'nvme-fw-commit', 'nvme-fw-download', 'nvme-fw-log', 'nvme-gen-hostnqn', 'nvme-get-feature', 'nvme-get-lba-status', 'nvme-get-log', 'nvme-get-ns-id', 'nvme-get-property', 'nvme-help', 'nvme-huawei-id-ctrl', 'nvme-huawei-list', 'nvme-id-ctrl', 'nvme-id-domain', 'nvme-id-iocs', 'nvme-id-ns', 'nvme-id-nvmset', 'nvme-inspur-nvme-vendor-log', 'nvme-intel-id-ctrl', 'nvme-intel-internal-log', 'nvme-intel-lat-stats', 'nvme-intel-market-name', 'nvme-intel-smart-log-add', 'nvme-intel-temp-stats', 'nvme-io-mgmt-recv', 'nvme-io-mgmt-send', 'nvme-io-passthru', 'nvme-keys-check-kxchap', 'nvme-keys-check-tls', 'nvme-keys-export', 'nvme-keys-gen-kxchap', 'nvme-keys-gen-tls', 'nvme-keys-import', 'nvme-keys-insert-tls', 'nvme-keys-revoke', 'nvme-lba-status-log', 'nvme-list', 'nvme-list-ctrl', 'nvme-list-endgrp', 'nvme-list-ns', 'nvme-list-subsys', 'nvme-lockdown', 'nvme-mi-cmd-support-effects-log', 'nvme-micron-clear-pcie-errors', 'nvme-micron-id-ctrl', 'nvme-micron-internal-log', 'nvme-micron-nand-stats', 'nvme-micron-pcie-stats', 'nvme-micron-selective-download', 'nvme-micron-smart-add-log', 'nvme-micron-smart-log', 'nvme-micron-temperature-stats', 'nvme-netapp-ontapdevices', 'nvme-netapp-smdevices', 'nvme-ns-descs', 'nvme-ns-rescan', 'nvme-nvm-id-ctrl', 'nvme-nvme-mi-recv', 'nvme-nvme-mi-send', 'nvme-ocp-clear-fw-activate-history', 'nvme-ocp-clear-pcie-correctable-error-counters', 'nvme-ocp-device-capability-log', 'nvme-ocp-eol-plp-failure-mode', 'nvme-ocp-error-recovery-log', 'nvme-ocp-get-dssd-async-event-config', 'nvme-ocp-get-dssd-power-state-feature', 'nvme-ocp-get-plp-health-check-interval', 'nvme-ocp-latency-monitor-log', 'nvme-ocp-set-dssd-async-event-config', 'nvme-ocp-set-dssd-power-state-feature', 'nvme-ocp-set-plp-health-check-interval', 'nvme-ocp-set-telemetry-profile', 'nvme-ocp-smart-add-log', 'nvme-ocp-telemetry-string-log', 'nvme-ocp-unsupported-reqs-log', 'nvme-ocp-internal-log', 'nvme-persistent-event-log', 'nvme-pred-lat-event-agg-log', 'nvme-predictable-lat-log', 'nvme-primary-ctrl-caps', 'nvme-read', 'nvme-registry-delete', 'nvme-registry-list', 'nvme-registry-retrieve', 'nvme-registry-update', 'nvme-reset', 'nvme-resv-acquire', 'nvme-resv-notif-log', 'nvme-resv-register', 'nvme-resv-release', 'nvme-resv-report', 'nvme-rpmb', 'nvme-sanitize', 'nvme-sanitize-log', 'nvme-seagate-clear-fw-activate-history', 'nvme-seagate-clear-pcie-correctable-errors', 'nvme-seagate-cloud-SSD-plugin-version', 'nvme-seagate-get-ctrl-tele', 'nvme-seagate-get-host-tele', 'nvme-seagate-help', 'nvme-seagate-plugin-version', 'nvme-seagate-version', 'nvme-seagate-vs-fw-activate-history', 'nvme-seagate-vs-internal-log', 'nvme-seagate-vs-log-page-sup', 'nvme-seagate-vs-pcie-stats', 'nvme-seagate-vs-smart-add-log', 'nvme-seagate-vs-temperature-stats', 'nvme-security-recv', 'nvme-security-send', 'nvme-self-test-log', 'nvme-set-feature', 'nvme-set-property', 'nvme-show-hostnqn', 'nvme-show-regs', 'nvme-show-topology', 'nvme-smart-log', 'nvme-sndk-capabilities', 'nvme-sndk-clear-assert-dump', 'nvme-sndk-clear-fw-activate-history', 'nvme-sndk-clear-pcie-correctable-errors', 'nvme-sndk-cloud-SSD-plugin-version', 'nvme-sndk-cloud-boot-SSD-version', 'nvme-sndk-cu-smart-log', 'nvme-sndk-drive-resize', 'nvme-sndk-get-drive-status', 'nvme-sndk-get-dev-capabilities-log', 'nvme-sndk-get-error-recovery-log', 'nvme-sndk-get-latency-monitor-log', 'nvme-sndk-get-unsupported-reqs-log', 'nvme-sndk-log-page-directory', 'nvme-sndk-namespace-resize', 'nvme-sndk-set-latency-monitor-feature', 'nvme-sndk-vs-cloud-log', 'nvme-sndk-vs-device-waf', 'nvme-sndk-vs-drive-info', 'nvme-sndk-vs-error-reason-identifier', 'nvme-sndk-vs-fw-activate-history', 'nvme-sndk-vs-hw-rev-log', 'nvme-sndk-vs-internal-log', 'nvme-sndk-vs-nand-stats', 'nvme-sndk-vs-pcie-stats', 'nvme-sndk-vs-smart-add-log', 'nvme-sndk-vs-telemetry-controller-option', 'nvme-sndk-vs-temperature-stats', 'nvme-solidigm-clear-fw-activate-history', 'nvme-solidigm-clear-pcie-correctable-errors', 'nvme-solidigm-cloud-SSDplugin-version', 'nvme-solidigm-garbage-collect-log', 'nvme-solidigm-id-ctrl', 'nvme-solidigm-latency-tracking-log', 'nvme-solidigm-log-page-directory', 'nvme-solidigm-market-log', 'nvme-solidigm-parse-telemetry-log', 'nvme-solidigm-smart-log-add', 'nvme-solidigm-temp-stats', 'nvme-solidigm-vs-drive-info', 'nvme-solidigm-vs-fw-activate-history', 'nvme-solidigm-vs-internal-log', 'nvme-solidigm-vs-smart-add-log', 'nvme-solidigm-workload-tracker', 'nvme-subsystem-reset', 'nvme-supported-log-pages', 'nvme-telemetry-log', 'nvme-toshiba-clear-pcie-correctable-errors', 'nvme-toshiba-vs-internal-log', 'nvme-toshiba-vs-smart-add-log', 'nvme-transcend-badblock', 'nvme-transcend-healthvalue', 'nvme-verify', 'nvme-virtium-save-smart-to-vtview-log', 'nvme-virtium-show-identify', 'nvme-wdc-cap-diag', 'nvme-wdc-capabilities', 'nvme-wdc-clear-assert-dump', 'nvme-wdc-clear-fw-activate-history', 'nvme-wdc-clear-pcie-correctable-errors', 'nvme-wdc-cloud-SSD-plugin-version', 'nvme-wdc-cloud-boot-SSD-version', 'nvme-wdc-cu-smart-log', 'nvme-wdc-drive-essentials', 'nvme-wdc-drive-log', 'nvme-wdc-drive-resize', 'nvme-wdc-enc-get-log', 'nvme-wdc-get-crash-dump', 'nvme-wdc-get-dev-capabilities-log', 'nvme-wdc-get-drive-status', 'nvme-wdc-get-error-recovery-log', 'nvme-wdc-get-latency-monitor-log', 'nvme-wdc-get-pfail-dump', 'nvme-wdc-get-unsupported-reqs-log', 'nvme-wdc-id-ctrl', 'nvme-wdc-log-page-directory', 'nvme-wdc-namespace-resize', 'nvme-wdc-purge', 'nvme-wdc-purge-monitor', 'nvme-wdc-vs-cloud-log', 'nvme-wdc-vs-device-waf', 'nvme-wdc-vs-drive-info', 'nvme-wdc-vs-error-reason-identifier', 'nvme-wdc-vs-fw-activate-history', 'nvme-wdc-vs-hw-rev-log', 'nvme-wdc-vs-internal-log', 'nvme-wdc-vs-nand-stats', 'nvme-wdc-vs-smart-add-log', 'nvme-wdc-vs-telemetry-controller-option', 'nvme-wdc-vs-temperature-stats', 'nvme-write', 'nvme-write-uncor', 'nvme-write-zeroes', 'nvme-zns-changed-zone-list', 'nvme-zns-close-zone', 'nvme-zns-finish-zone', 'nvme-zns-id-ctrl', 'nvme-zns-id-ns', 'nvme-zns-offline-zone', 'nvme-zns-open-zone', 'nvme-zns-report-zones', 'nvme-zns-reset-zone', 'nvme-zns-set-zone-desc', 'nvme-zns-zone-append', 'nvme-zns-zone-mgmt-recv', 'nvme-zns-zone-mgmt-send', 'nvme-sed-discover', 'nvme-sed-initialize', 'nvme-sed-lock', 'nvme-sed-password', 'nvme-sed-revert', 'nvme-sed-unlock', 'nvme-mangoboost-id-ctrl', ] if want_deprecated_cmds adoc_sources_man1 += [ 'nvme-check-dhchap-key', 'nvme-check-tls-key', 'nvme-gen-dhchap-key', 'nvme-gen-tls-key', 'nvme-tls-key', ] endif adoc_sources_man5 = [ 'nvme-cli.conf', 'nvme-fabrics.conf', ] adoc_sources_man8 = [ ] if want_discoverd adoc_sources_man8 += [ 'nvme-discoverd', ] endif adoc_includes = [ 'cmd-plugins.txt', 'cmds-main.txt', 'global-options.txt', 'fabrics-options.txt', ] if want_docs != 'false' man1dir = join_paths(prefixdir, get_option('mandir'), 'man1') man5dir = join_paths(prefixdir, get_option('mandir'), 'man5') man8dir = join_paths(prefixdir, get_option('mandir'), 'man8') htmldir = join_paths(prefixdir, get_option('htmldir'), 'nvme') man_sets = [ {'sources': adoc_sources_man1, 'section': '1', 'dir': man1dir}, {'sources': adoc_sources_man5, 'section': '5', 'dir': man5dir}, {'sources': adoc_sources_man8, 'section': '8', 'dir': man8dir}, ] asciidoctor = find_program('asciidoc', required: want_docs_build) if want_docs_build and asciidoctor.found() # Build documentation before installing foreach file : adoc_includes configure_file(input: file, output: file, copy: true) endforeach # man pages if want_docs == 'all' or want_docs == 'man' xmlto = find_program('xmlto', required: false) if xmlto.found() foreach man_set : man_sets section = man_set['section'] foreach adoc : man_set['sources'] input = adoc + '.txt' subst = configure_file( input: adoc + '.txt', output: adoc + '.m' + section + 'subst', configuration: substs ) xml = custom_target( adoc.underscorify() + '_xml' + section, input: subst, output: '@BASENAME@.xml', command: [ asciidoctor, '-f', files('asciidoc.conf'), '-b', 'docbook', '-d', 'manpage', '-o', '@OUTPUT@', '@INPUT@', ], ) doc_tgts += custom_target( adoc.underscorify() + '_man' + section, input: xml, output: '@BASENAME@.' + section, command: [ xmlto, '-m', files('manpage-normal.xsl'), '-o', '@OUTDIR@', '--skip-validation', 'man', '@INPUT@', ], install: true, install_dir: man_set['dir'], ) endforeach endforeach endif endif # html if want_docs == 'all' or want_docs == 'html' foreach adoc : ( adoc_sources_man1 + adoc_sources_man5 + adoc_sources_man8 ) input = adoc + '.txt' subst = configure_file( input: adoc + '.txt', output: adoc + '.hsubst', configuration: substs, ) doc_tgts += custom_target( adoc.underscorify() + '_html', input: subst, output: '@BASENAME@.html', command: [ asciidoctor, '-f', files('asciidoc.conf'), '-b', 'xhtml11', '-d', 'manpage', '-o', '@OUTPUT@', '@INPUT@'], install: true, install_dir: htmldir, ) endforeach endif else # asciidoctor not found, install pre compiled documetationx foreach man_set : man_sets section = man_set['section'] foreach adoc : man_set['sources'] if want_docs == 'all' or want_docs == 'man' man = files(adoc + '.' + section) install_data(man, install_dir: man_set['dir']) endif if want_docs == 'all' or want_docs == 'html' html = files(adoc + '.html') install_data(html, install_dir: htmldir) endif endforeach endforeach endif endif