Skip to content

meson: fix manpage_targets undefined when help2man is missing#216

Open
mukeshojha-linux wants to merge 1 commit intolinux-msm:masterfrom
mukeshojha-linux:manpage-fix
Open

meson: fix manpage_targets undefined when help2man is missing#216
mukeshojha-linux wants to merge 1 commit intolinux-msm:masterfrom
mukeshojha-linux:manpage-fix

Conversation

@mukeshojha-linux
Copy link
Copy Markdown
Contributor

alias_target('manpages', manpage_targets) was called unconditionally but manpage_targets was only defined inside the help2man.found() block. When help2man is not installed (e.g. during cross-compilation) meson would abort with an "Unknown variable" error.

Fix by initialising manpage_targets to an empty list before the block and guarding alias_target with a length check.

alias_target('manpages', manpage_targets) was called unconditionally
but manpage_targets was only defined inside the help2man.found() block.
When help2man is not installed (e.g. during cross-compilation) meson
would abort with an "Unknown variable" error.

Fix by initialising manpage_targets to an empty list before the block
and guarding alias_target with a length check.

Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant