Re: autoreconf doesn't follow includes.

Carlo Wood <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.bugs,gmane.comp.sysutils.automake.general
Message-ID <20190222132301.0c26429e@hikaru>
On Thu, 21 Feb 2019 13:51:30 -0600
Eric Blake <[email protected]> wrote:

> Adding the automake list, since that is the impacted project:
> 
> On 2/21/19 1:05 PM, Carlo Wood wrote:
> > Hi,
> > 
> > I'm using a Makefile.am that has an include, like so:
> > 
> > ---begin of Makefile.am---
> > include $(srcdir)/cwm4/root_makefile_top.am
> >  
> > SUBDIRS = googletest @CW_SUBDIRS@ src 
> > 
> > include $(srcdir)/cwm4/root_makefile_bottom.am ---end of Makefile.am
> > ---end of Makefile.am
> > 
> > I do this because every project that I have is the same, except for
> > SUBDIRS :p.
> > 
> > This works fine with all autotools except autoreconf;
> > for example
> > 
> > sean:~/projects/aicxx/ai-evio-testsuite/ai-evio-testsuite>autoreconf
> > -v -i -s --no-recursive autoreconf: Entering directory `.'
> > autoreconf: configure.ac: not using Gettext
> > autoreconf: running: aclocal 
> > 
> > which is wrong because autoreconf ignores the line
> > 
> > ACLOCAL_AMFLAGS = -I cwm4/aclocal -I m4/aclocal
> > 
> > in $(srcdir)/cwm4/root_makefile_top.am
> > 
> > See
> > https://www.gnu.org/software/automake/manual/html_node/Include.html
> > why this is legal usage of automake.
> 
> Makefile fragments are valid, but it is not immediately obvious if
> makefile fragments are allowed to have ACLOCAL_AMFLAGS that affect the
> overall file, or if it is better to put ACLOCAL_AMFLAGS directly in
> the primary file rather than hidden in an include file.  At any rate,
> if automake is happy finding that definition after chasing through
> includes, I'm happy to accept a patch to autoreconf to do similar
> chasing when building the command line to pass to automake, but I'm
> not sure how easy it would be for me to write the patch myself.

I'm afraid I can't help with that either since I do not know perl.
Also, it still wouldn't help me entirely since I also use m4_include's
in configure.ac, and those are also not followed by autoreconf :/.
It's probably easier for me to just redo autoreconf in bash.

-- 
Carlo Wood <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.