Subject: Re: bug#25358: Cross Compiling fails because of help2man

From: Jim Meyering <[email-masked]>
Date: Mon, 9 Jan 2017 15:23:50 +0100

On Sun, Jan 8, 2017 at 5:23 AM, Assaf Gordon <[email-masked]> wrote:
> Hello,
>
>> On Jan 6, 2017, at 10:58, Jim Meyering <[email-masked]> wrote:
>>
>> On Fri, Jan 6, 2017 at 1:44 AM, Assaf Gordon <[email-masked]> wrote:
>>>
>>> We do already distribute 'doc/sed.1' in the tarball, and currently always rebuild it,
>>> I wonder if it's worth making an exception in this case?
>>
>> I don't feel strongly about this either way. You're welcome to make the call.
>>
>>>    AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
>>
>> Since that's all coreutils does, I presume it will work for us.
>>
>>> In that case, perhaps it's worth adding a test for perl and skipping if it doesn't exist ?
>>
>> This seems worthwhile.
>
> The attach suggested patch adds all three cases to 'configure.ac',
> and 'doc/sed.1' is build conditionally.
>
> It leaves one case un-handled: cross-compilation directly from git.
> If this is needed, then either 'sed' can be first built natively (and 'doc/sed.1' will be created),
> or we can add a special case and create a stub doc/sed.1 file.

Thank you. That looks great.

Not sure it's worth it, but adding an "else" block to that "if
BUILD_MAN_PAGE" (with a rule that fails with a diagnostic explaining
why we cannot build sed.1) may avoid some confusion. Otherwise, all
they'll get is a failed build (no rule to make...), and may think it's
a bug and report it.