Skip to content

meson: generate the man page when cross-building with an exe wrapper - #361

Draft
obbardc wants to merge 2 commits into
linux-msm:masterfrom
obbardc:wip/obbardc/meson-cross-man-page
Draft

obbardc wants to merge 2 commits into
linux-msm:masterfrom
obbardc:wip/obbardc/meson-cross-man-page

Conversation

@obbardc

@obbardc obbardc commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

The man page is generated by running the built qdl binary through
help2man, so it was skipped when cross building. Cross builds that
provide an exe_wrapper (for example Debian's debcrossgen, when
cross-exe-wrapper is installed) can run the binary, but still shipped
no qdl.1.

Use meson.can_run_host_binaries() instead of not is_cross_build(), so
generation is enabled natively or when an exe_wrapper is available.

help2man runs the program itself, so it cannot use the exe_wrapper.
Capture the --help and --version output in custom targets, which meson
does run through the exe_wrapper and have help2man read them back via
cat using --help-option and --version-option. help2man takes the
program name from the "qdl version X" line, so the native output is
unchanged.

Signed-off-by: Christopher Obbard chris.obbard@oss.qualcomm.com

The man page is generated by running the built qdl binary through
help2man, so it was skipped when cross building. Cross builds that
provide an exe_wrapper (for example Debian's debcrossgen, when
cross-exe-wrapper is installed) can run the binary, but still shipped
no qdl.1.

Use meson.can_run_host_binaries() instead of not is_cross_build(), so
generation is enabled natively or when an exe_wrapper is available.

help2man runs the program itself, so it cannot use the exe_wrapper.
Capture the --help and --version output in custom targets, which meson
does run through the exe_wrapper and have help2man read them back via
cat using --help-option and --version-option. help2man takes the
program name from the "qdl version X" line, so the native output is
unchanged.

Signed-off-by: Christopher Obbard <chris.obbard@oss.qualcomm.com>
fix on windows

Signed-off-by: Christopher Obbard <chris.obbard@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