mirror of
https://github.com/stefanberger/libtpms
synced 2026-08-12 14:22:06 +00:00
feat: Add man page generation to Meson build
This commit implements the man page portion of step 8 of the Meson migration plan. It adds the necessary 'meson.build' files to the 'man' and 'man/man3' directories to find 'pod2man' and generate the man pages from the '.pod' source files. The generated man pages are also installed. Signed-off-by: Gemini <gemini@google.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
4bfb164c8a
commit
6162498a0e
37
man/man3/meson.build
Normal file
37
man/man3/meson.build
Normal file
@ -0,0 +1,37 @@
|
||||
pod_files = [
|
||||
'TPM_IO_Hash_Start.pod',
|
||||
'TPM_IO_TpmEstablished_Get.pod',
|
||||
'TPM_Malloc.pod',
|
||||
'TPMLIB_CancelCommand.pod',
|
||||
'TPMLIB_ChooseTPMVersion.pod',
|
||||
'TPMLIB_DecodeBlob.pod',
|
||||
'TPMLIB_GetInfo.pod',
|
||||
'TPMLIB_GetTPMProperty.pod',
|
||||
'TPMLIB_GetVersion.pod',
|
||||
'TPMLIB_MainInit.pod',
|
||||
'TPMLIB_Process.pod',
|
||||
'TPMLIB_RegisterCallbacks.pod',
|
||||
'TPMLIB_SetBufferSize.pod',
|
||||
'TPMLIB_SetDebugFD.pod',
|
||||
'TPMLIB_SetProfile.pod',
|
||||
'TPMLIB_SetState.pod',
|
||||
'TPMLIB_ValidateState.pod',
|
||||
'TPMLIB_VolatileAll_Store.pod',
|
||||
'TPMLIB_WasManufactured.pod',
|
||||
]
|
||||
|
||||
pod2man = find_program('pod2man', required: true)
|
||||
|
||||
foreach pod : pod_files
|
||||
base_name = pod.split('.')[0]
|
||||
target_name = base_name + '.3'
|
||||
|
||||
custom_target(target_name,
|
||||
input: pod,
|
||||
output: target_name,
|
||||
command: [pod2man, '-r', 'libtpms', '-c', '""', '-n', base_name, '--section=3', '@INPUT@', '@OUTPUT@'],
|
||||
capture: false,
|
||||
install: true,
|
||||
install_dir: get_option('mandir') / 'man3'
|
||||
)
|
||||
endforeach
|
||||
1
man/meson.build
Normal file
1
man/meson.build
Normal file
@ -0,0 +1 @@
|
||||
subdir('man3')
|
||||
@ -67,6 +67,8 @@ configure_file(
|
||||
configuration: conf_data
|
||||
)
|
||||
|
||||
# Add subdirectories to the build
|
||||
# Add subdirectories to the build
|
||||
subdir('include')
|
||||
subdir('src')
|
||||
subdir('src')
|
||||
subdir('man')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user