Thank you for the thoughtful response, Stefano.

At Mon, 19 Nov 2012 22:53:07 +0100, Stefano Lattarini wrote:
> On 11/19/2012 08:55 PM, Neil T. Dantam wrote:
> >
> > * Don't distribute prebuilt manpages
> >
> That's the route that GNU coreutils has taken recently; in the unlikely
> case perl is absent on the the build system, dummy man-pages are
> generated.

This would also not work when cross-compiling, I think, since manpages
would always be regenerated when the binaries are built and the
cross-compiled binaries would not run on the build machine.

> Assuming GNU make, a good solution would be to use order-only
> dependencies:
>
>    foo.1: foo.c | foo$(EXEEXT)
>            help2man ...
>
> The above ensures that foo$(EXEEXT) is built before foo.1, but doesn't
> cause foo.1 to be rebuilt just because foo$(EXEEXT) has changed.  Which
> is exactly what we want.

Thanks for the tip. That seems like exactly the right behavior and
should even work with cross-compiles.  Would be nice if it could be
done more compatibly, but in my case, there are probably bigger
OS-portability issues than a GNU make build dependency.

Thanks,
-ntd



Reply via email to