Subject: bug#11034: Binutils, GDB, GCC and Automake's 'cygnus' option

From: Stefano Lattarini <[email-masked]>
Date: Wed, 04 Apr 2012 09:42:56 +0200

On 04/03/2012 10:39 PM, Tom Tromey wrote:
>>>>>> "Stefano" == Stefano Lattarini <[email-masked]> writes:
> 
> Stefano> On a second though, by double-checking the existing code, I
> Stefano> couldn't see how the 'cygnus' option could possibly influence
> Stefano> the location of the generated info files -- and it turned out
> Stefano> it didn't!  Despite what was documented in the manual, the
> Stefano> 'cygnus' option did *not* cause the generated '.info' files to
> Stefano> be placed in the builddir (see attached test case).
> 
> It certainly does for me:
>
Yes, but (at least for the binutils case) that's only because you already
have an hack *unrelated to the cygnus option* to make it work; i.e., in
'binutils/doc/Makefile.am', I read:

  # Automake 1.9 will only build info files in the objdir if they are
  # mentioned in DISTCLEANFILES.  It doesn't have to be unconditional,
  # though, so we use a bogus condition.
  if GENINSRC_NEVER
  DISTCLEANFILES = binutils.info
  endif

>     barimba. pwd
>     /home/tromey/gnu/baseline-gdb/build/binutils
>     barimba. grep '^srcdir = ' Makefile
>     srcdir = ../../src/binutils
>     barimba. find . -name 'binutils.info'
>     ./doc/binutils.info
>     barimba. find ../../src/binutils -name 'binutils.info'
>     barimba.
> 
> How did you test it?
>
With the testcase attached to my mail (warning: it requires the Automake
testsuite infrastructure to work).  I can transform it in an independent
test script if you are really interested.

> If you built from a distribution tar, then it is expected that the info
> file would be in srcdir.
>
I didn't use the binutils distribution to test my claim, but the minimal
test case I had created on purpose, and attached in the previous mail.

Regards,
  Stefano