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

From: Assaf Gordon <[email-masked]>
Date: Sat, 7 Jan 2017 23:23:22 -0500

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.

Comments welcomed,
  - assaf