Closed umlaeute closed 1 year ago
random (and totally untested) ideas for detecting whether we are cross-compiling:
add this to configure.ac
:
AM_CONDITIONAL(cross_compiling, [test "x${cross_compiling}" = "xyes"])
and then use something like this in the Makefile.am
:
man_MANS =
if cross_compiling
man_MANS += gmerlin-transcoder.1
endif
use something like this in the Makefile
:
gmerlin-transcoder.1: gmerlin-transcoder
ifeq ($(host), $(build))
$(builddir)/gmerlin-transcoder -help-man > $(builddir)/gmerlin-transcoder.1
else
touch $(builddir)/gmerlin-transcoder.1
endif
detecting at configure time seems to be preferable, as it doesn't build empty dummy manpages.
I agree, disabling manpages for cross-compiling would be a good idea. Go ahead if you have a good idea.
The build-system builds manpages on the fly by calling binaries with the
-help-man
flag.https://github.com/bplaum/gmerlin/blob/68cddb0791c90bd32bcdd7155cb67e3e59bf185e/apps/transcoder/Makefile.am#L29-L30
This only works if the generated binaries can be executed by the current CPU...an assumption that does not hold true when cross-compiling.
Personally I would say that manpages are "minor artifacts", so if they should be omitted if cross-compiling.