Gavin Smith wrote:
> > > The problem seems to have been that the config.h.in file was not updated
> > > when the gnulib module was imported.
> > > 
> > > In tta/config.log, there were these lines:
> > > 
> > > configure:31570: checking whether program_invocation_name is declared
> > > configure:31570: result: yes
> > > configure:31585: checking whether program_invocation_short_name is 
> > > declared
> > > configure:31585: x86_64-linux-gnu-gcc -c  -D_REENTRANT -D_GNU_SOURCE 
> > > -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include 
> > > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64   conftest.c >&5
> > > configure:31585: $? = 0
> > > configure:31585: result: yes
> > > 
> > > tta/C/config.h did not have either definition in it.
> > > 
> > > So I suspected that config.h.in was out of date (even though it had a 
> > > time stamp
> > > from today).
> > 
> > I've never seen such a behaviour (configure updated but config.h.in not 
> > updated)
> > in the GNU Build System.
> 
> Could it be because config.h.in is in a subdirectory?  In tta/configure.ac 
> there
> is:
> 
> AC_CONFIG_HEADERS([C/config.h])
> 
> I thought it was a bit strange for the code in tta/gnulib to be using
> tta/C/config.h as an include file (-I../../C appears on the compiler
> command line so it is found).  The rules to rebuild "C/config.h" appear
> in tta/C/Makefile:
> 
> $(srcdir)/config.h.in:  $(am__configure_deps) 
>       $(AM_V_GEN)($(am__cd) $(top_srcdir) && $(AUTOHEADER))
>       $(AM_V_at)rm -f stamp-h1
>       $(AM_V_at)touch $@
> 
> It seems that this may easily not run if make does not run in that
> subdirectory early enough.

Indeed, the explanation seems to be a combination of four factors:

  1) You did not run "make distclean" before and "./configure" after
     changing the set of Gnulib modules.

  2) tta/configure.ac defines config.h to be in the C/ subdirectory.

  3) The tta directory uses a "recursive" Makefile structure (i.e.
     the subdirectory C/ has its own Makefile.am).

  4) In tta/Makefile.am you define
       SUBDIRS = gnulib/lib C . perl tests
     Cf. [1]

So, the fix is to
  - either adopt the habit of doing "make distclean" when changing the
    configuration,
  - or define
      SUBDIRS = C gnulib/lib . perl tests
  - or put config.h in a different directory and adjust SUBDIRS similarly,
  - or use a non-recursive Makefile.am (i.e. tta/Makefile.am does
    'include C/local.mk').

Bruno

[1] https://www.gnu.org/software/automake/manual/html_node/Subdirectories.html




    • ... Patrice Dumas
      • ... Gavin Smith
        • ... Gavin Smith
          • ... Eli Zaretskii
          • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
            • ... Gavin Smith
              • ... Patrice Dumas
              • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
              • ... Gavin Smith
              • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
              • ... Gavin Smith
              • ... Bruno Haible via Bug reports for the GNU Texinfo documentation system
              • ... Gavin Smith
              • ... Patrice Dumas
              • ... Gavin Smith
              • ... Patrice Dumas
              • ... Gavin Smith
          • ... Patrice Dumas
            • ... Raymond Toy
  • info... G. Branden Robinson

Reply via email to