mirror of
https://review.coreboot.org/flashrom.git
synced 2025-10-26 02:50:40 +01:00
As of version 3.x, `sphinx-build` outputs man pages to "8" directory
instead of "man8" expected by Makefile and doc/meson.build. See:
https://github.com/sphinx-doc/sphinx/issues/7996
https://github.com/sphinx-doc/sphinx/issues/9217
Current solution is to rename "8" to "man8" after documentation build.
That enables successful build and installation, as well as dependency
tracking at build-system level, but not on `sphinx-build` own level
upon which `meson` build blindly relies.
Change-Id: I9cd280551a1ba4d17edb2e857d56f80431b61e1b
Signed-off-by: Anton Samsonov <devel@zxlab.ru>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/77778
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
38 lines
1.3 KiB
Meson
38 lines
1.3 KiB
Meson
|
|
sphinx = find_program('sphinx-build', native : true, required : get_option('man-pages').enabled() or get_option('documentation').enabled())
|
|
sphinx_wrapper = meson.current_source_dir() / 'sphinx-wrapper.sh'
|
|
|
|
man_pages = [
|
|
'flashrom.8'
|
|
]
|
|
|
|
if sphinx.found()
|
|
if get_option('man-pages').auto() or get_option('man-pages').enabled()
|
|
man_outputs = []
|
|
foreach page : man_pages
|
|
man_outputs += 'man' + page.substring(-1)
|
|
endforeach
|
|
|
|
custom_target(
|
|
'man-pages',
|
|
command : [sphinx_wrapper, '@OUTDIR@', ' '.join(man_outputs), sphinx, '-b', 'man', '-q', '-d', '@PRIVATE_DIR@', '-Drelease=' + flashrom_version, '@CURRENT_SOURCE_DIR@', '@OUTDIR@'],
|
|
build_always_stale : true, # sphinx handles rebuilds
|
|
output : man_outputs,
|
|
install : true,
|
|
install_dir : get_option('mandir'),
|
|
)
|
|
endif
|
|
|
|
if get_option('documentation').auto() or get_option('documentation').enabled()
|
|
custom_target(
|
|
'documentation',
|
|
command : [sphinx, '-b', 'html', '-q', '-d', '@PRIVATE_DIR@', '-Drelease=' + flashrom_version,'@CURRENT_SOURCE_DIR@', '@OUTDIR@/html'],
|
|
build_always_stale : true, # sphinx handles rebuilds
|
|
output : 'html',
|
|
install : true,
|
|
install_dir : get_option('datadir') + '/doc/flashrom'
|
|
)
|
|
endif
|
|
|
|
endif
|