build(meson): generate and install scdoc manpages
ci/woodpecker/pr/woodpecker Pipeline was successful
Details
ci/woodpecker/pr/woodpecker Pipeline was successful
Details
parent
5494e8a91a
commit
9c466c147d
|
@ -0,0 +1,22 @@
|
|||
manpages = {
|
||||
'pc': 5,
|
||||
'pkgconf': 1
|
||||
}
|
||||
|
||||
foreach page, section : manpages
|
||||
name = '@0@.@1@'.format(page, section)
|
||||
input = name + '.scd'
|
||||
tgt = custom_target(
|
||||
input,
|
||||
input: files(input),
|
||||
output: name,
|
||||
capture: true,
|
||||
feed: true,
|
||||
command: scdoc,
|
||||
install: true,
|
||||
install_dir: get_option('mandir') / 'man@0@'.format(section),
|
||||
)
|
||||
endforeach
|
||||
|
||||
install_man('pkg.m4.7')
|
||||
install_man('pkgconf-personality.5')
|
13
meson.build
13
meson.build
|
@ -1,7 +1,7 @@
|
|||
project('pkgconf', 'c',
|
||||
version : '1.9.3',
|
||||
license : 'ISC',
|
||||
meson_version : '>=0.49',
|
||||
meson_version : '>=0.59',
|
||||
default_options : ['c_std=c99'],
|
||||
)
|
||||
|
||||
|
@ -124,10 +124,13 @@ kyuafile = configure_file(input : 'Kyuafile.in', output : 'Kyuafile', configurat
|
|||
test('kyua', kyua_exe, args : ['--config=none', 'test', '--kyuafile', kyuafile, '--build-root', meson.current_build_dir()])
|
||||
subdir('tests')
|
||||
|
||||
install_man('man/pkgconf.1')
|
||||
install_man('man/pkg.m4.7')
|
||||
install_man('man/pc.5')
|
||||
install_man('man/pkgconf-personality.5')
|
||||
# https://github.com/mesonbuild/meson/issues/1550
|
||||
# https://github.com/mesonbuild/meson/pull/9342
|
||||
scdoc = find_program('scdoc', required: false)
|
||||
if scdoc.found()
|
||||
subdir('man')
|
||||
endif
|
||||
|
||||
install_data('pkg.m4', install_dir: 'share/aclocal')
|
||||
install_data('AUTHORS', install_dir: 'share/doc/pkgconf')
|
||||
install_data('README.md', install_dir: 'share/doc/pkgconf')
|
||||
|
|
Loading…
Reference in New Issue