From: Simon Marchi <simark@simark.ca>
To: Christophe Lyon <christophe.lyon@linaro.org>
Cc: buildbot@sourceware.org
Subject: Re: [PATCH 4/6] autoregen.py: Use autoreconf in most GCC directories
Date: Tue, 16 Apr 2024 11:32:59 -0400 [thread overview]
Message-ID: <96fda049-f7a5-4527-bfb2-0ec5cdefca13@simark.ca> (raw)
In-Reply-To: <CAPS5khYDS3wp7kXm_78wU23mQfXOovAFZ4trPCDquza7EtxRDQ@mail.gmail.com>
On 2024-04-16 10:47, Christophe Lyon wrote:
>> If I call `aclocal` without args in gcc/gcc, it re-generates aclocal.m4
>> fine, because it got the include path info from configure.ac. If I
>> remove the `AC_CONFIG_MACRO_DIRS` line from gcc/gcc/configure.ac and run
>> aclocal.m4, then I am missing a bunch of m4 files in the resulting
>> aclocal.m4. If I remove the `ACLOCAL_AMFLAGS` variable from
>> gcc/gcc/Makefile.am, it has no effect on `aclocal`. That variable only
Sorry, I wrote Makefile.am here, it should be Makefile.in.
>> exists for the benefit of the Makefile rule that regenerates aclocal.m4,
>> lower in Makefile.am. But I would argue that it's unnecessary, since
>> that info is encoded in configure.ac, so the rule could call aclocal
>> without any -I args.
>
> Of course: aclocal does NOT read Makefile.am, but autoreconf does.
Ok, I wasn't aware of autoreconf getting flags for aclocal from
ACLOCAL_AMFLAGS in Makefile.am, now I see it in the docs. But it seems
to me like autoreconf will "just work" in most cases then:
- for directories with a Makefile.am, autoreconf will read the -I flags
specified in Makefile.am/ACLOCAL_AMFLAGS and pass them to aclocal.
- for directories without a Makefile.am (like GDB), autoreconf will
call aclocal without -I flags, but aclocal will use the include paths
specified in configure.ac/AC_CONFIG_MACRO_DIRS.
> So what I noticed for the 'gcc' subdir is that autoreconf will
> generate the same contents but also print a few warnings.
> This is because when calling aclocal with some -I flags, the contents
> of those included .m4 files is taken into account before scanning
> configure.ac, so macros like AM_PATH_PROG_WITH_TEST are defined before
> being used, while when using autoreconf (thus calling aclocal without
> any -I flag), those .m4 files are processed later, leading to warnings
> that AM_PATH_PROG_WITH_TEST is "not found in library". IIUC, there's
> an iterative process which means that things are re-assessed later.
>
> So.... it seems it's not a real problem to use autoreconf as you
> suggest, but we'll see such warnings in the buildbot logs (not causing
> errors IIUC).
I don't really know how this is supposed to work then, it seems
illogical to me. aclocal recommends using AC_CONFIG_MACRO_DIRS:
https://www.gnu.org/software/automake/manual/html_node/Local-Macros.html
So it seems to me like it should consider the macros found in these
directories when processing the rest of the files...
Simon
next prev parent reply other threads:[~2024-04-16 15:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 20:05 [PATCH 0/6] autoregen.py: Improve support for GCC Christophe Lyon
2024-04-12 20:05 ` [PATCH 1/6] auroregen.py: Check AC_CONFIG_MACRO_DIR instead of AC_CONFIG_MACRO_DIRS Christophe Lyon
2024-04-12 20:05 ` [PATCH 2/6] autoregen.py: Move comment Christophe Lyon
2024-04-12 20:05 ` [PATCH 3/6] autoregen.py: Flush all print commands Christophe Lyon
2024-04-15 2:09 ` Simon Marchi
2024-04-15 11:55 ` Christophe Lyon
2024-04-12 20:05 ` [PATCH 4/6] autoregen.py: Use autoreconf in most GCC directories Christophe Lyon
2024-04-15 3:07 ` Simon Marchi
2024-04-15 12:52 ` Christophe Lyon
2024-04-15 14:48 ` Simon Marchi
2024-04-16 14:47 ` Christophe Lyon
2024-04-16 15:32 ` Simon Marchi [this message]
2024-04-16 16:12 ` Christophe Lyon
2024-04-17 14:30 ` Christophe Lyon
2024-04-15 11:42 ` Mark Wielaard
2024-04-15 12:46 ` Mark Wielaard
2024-04-15 12:56 ` Christophe Lyon
2024-04-12 20:05 ` [PATCH 5/6] autoregen.py: Add support for autogen Christophe Lyon
2024-04-12 20:05 ` [PATCH 6/6] autoregen.py: Add binutils directories to AUTORECONF_DIRS Christophe Lyon
2024-04-14 22:33 ` [PATCH 0/6] autoregen.py: Improve support for GCC Mark Wielaard
2024-04-15 11:52 ` Christophe Lyon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=96fda049-f7a5-4527-bfb2-0ec5cdefca13@simark.ca \
--to=simark@simark.ca \
--cc=buildbot@sourceware.org \
--cc=christophe.lyon@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).