[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cross-Compiling fails due to man-page generation

From: Assaf Gordon
Subject: Re: Cross-Compiling fails due to man-page generation
Date: Wed, 23 Jul 2014 21:43:27 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0


Attached is my attempt at such patch, based on your suggestion.

On 07/19/2014 02:27 PM, Sami Kerola wrote:
On 17 July 2014 06:58, Assaf Gordon <address@hidden> wrote:

I've encountered a problem where GNU Hello build fails with a cross
compiler, after the switch to non-recursive make
(of course there's no reason to need GNU hello cross-compiled, but my
project is based on GNU hello's build system).


I suspect this rule needs to be a bit more complicated, to accommodate few
1. Native compiling from GIT repository, where "hello.1" doesn't exist (yet)
and "hello" can be executed - then "hello.1" can be generated.

This seems right.

2. Native compiling from tarball, where "hello.1" already exists (due to
'make dist') and "hello" can be executed - then either re-generate "hello.1"
or not ?

Output at this point the content of the manual is fixed, so I am voting
for not re-generating.

3. Cross-compiling from GIT repository, "hello.1" doesn't exist but "hello"
*can not* be executed - ignore and use empty "hello.1" ?

Distributing empty manuals sounds wrong.  When cross-compiling from git
the segment requiring manuals needs to be suppressed from Makefile.am.

4. Cross-compiling from tarball, where "hello.1" exists but "hello" *can
not* be executed - use existing "hello.1" (despite it being older than
"hello", which might confuse the make target?) .

This makes sense.


The change looks good.  Only one AM_CONDITIONAL is needed to make 3.
exclude the manuals when creating one is impossible or the least quite

I haven't tested the following, but it might work.


Few differences from your suggestion:
1. If building from tarball (as opposed to from .git), I've changed the build to never 
generate, and never clean the "hello.1" manpage. The downside is that if a 
developer works from a tarball and changes the help screen, the manpage will be stale.
This is the "BUILD_FROM_GIT" in Makefile.am .
I think that's reasonable, but I could be wrong.

2. If building from GIT and cross-compiling, don't add a rule to the makefile to generate 
the man-page (this is the "!GIT_CROSS_COMPILING" in Makefile.am).

3. I've read somewhere (can't find the link now) that AM_CONDITIONAL should not be nested 
- so it is outside the "AS_IF".

4. To detect the ".git" directory, I've used "$srcdir/.git" (not just ".git") - 
as this could be problematic in out of tree builds?

I've tested it on several systems (including cross-compiling), but more testing 
is always good.

Comments are welcomed,

Attachment: hello_manpage_cross.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]