public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Pedro Alves <pedro@palves.net>
Cc: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb/gdbserver: switch to AC_CONFIG_MACRO_DIRS
Date: Wed, 23 Jun 2021 18:26:55 -0400	[thread overview]
Message-ID: <YNO1L+uADd9tAYSX@vapier> (raw)
In-Reply-To: <4f273dab-3803-9143-7b16-4cb873834dd0@palves.net>

On 23 Jun 2021 10:38, Pedro Alves wrote:
> On 2021-06-18 5:38 a.m., Mike Frysinger via Gdb-patches wrote:
> > 
> > how about at the top of acinclude.m4:
> > dnl NB: When possible, try to avoid explicit includes of ../config/ files.
> > dnl They're normally found by aclocal automatically and recorded in aclocal.m4.
> > dnl However, some are kept here explicitly to silence harmless warnings from
> > dnl aclocal when it finds AM_xxx macros via local search paths instead of
> > dnl system search paths.
> > -mike
> 
> That seems good to me, but I think better would be to put all such include lines
> together and put the comment right on top of that section.  Like:
> 
> dnl NB: When possible, we try to avoid explicit includes of ../config/ files.
> dnl They're normally found by aclocal automatically and recorded in aclocal.m4.
> dnl However, the following are kept here explicitly to silence harmless warnings
> dnl from aclocal when it finds AM_xxx macros via local search paths instead of
> dnl system search paths.
> m4_include([../config/foo.m4])
> m4_include([../config/bar.m4])
> 
> 
> I've had my share of "comments at the top" that I've missed in the past...

how about:

--- a/gdb/acinclude.m4
+++ b/gdb/acinclude.m4
@@ -9,6 +9,18 @@ dnl They're normally found by aclocal automatically and recorded in aclocal.m4.
 dnl However, some are kept here explicitly to silence harmless warnings from
 dnl aclocal when it finds AM_xxx macros via local search paths instead of
 dnl system search paths.
+dnl
+dnl For AM_LC_MESSAGES
+m4_include([../config/lcmessage.m4])
+dnl For AM_LANGINFO_CODESET.
+m4_include([../config/codeset.m4])
+dnl We need to explicitly include these before iconv.m4 to avoid warnings.
+m4_include([../config/lib-ld.m4])
+m4_include([../config/lib-prefix.m4])
+m4_include([../config/lib-link.m4])
+m4_include([../config/iconv.m4])
+dnl For zlib itself.
+m4_include([../config/zlib.m4])
 
 m4_include(acx_configure_dir.m4)
 
@@ -27,20 +39,6 @@ m4_include(../gdbsupport/selftest.m4)
 dnl gdb/configure.in uses BFD_NEED_DECLARATION, so get its definition.
 m4_include(../bfd/bfd.m4)
 
-dnl For AM_LC_MESSAGES
-m4_include([../config/lcmessage.m4])
-
-dnl For AM_LANGINFO_CODESET.
-m4_include([../config/codeset.m4])
-
-dnl We need to explicitly include these before iconv.m4 to avoid warnings.
-m4_include([../config/lib-ld.m4])
-m4_include([../config/lib-prefix.m4])
-m4_include([../config/lib-link.m4])
-m4_include([../config/iconv.m4])
-
-m4_include([../config/zlib.m4])
-
 m4_include([../gdbsupport/common.m4])
 
 dnl For libiberty_INIT.
--- a/gdbserver/acinclude.m4
+++ b/gdbserver/acinclude.m4
@@ -3,6 +3,10 @@ dnl They're normally found by aclocal automatically and recorded in aclocal.m4.
 dnl However, some are kept here explicitly to silence harmless warnings from
 dnl aclocal when it finds AM_xxx macros via local search paths instead of
 dnl system search paths.
+dnl
+dnl codeset.m4 is needed for common.m4, but not for
+dnl anything else in gdbserver.
+m4_include(../config/codeset.m4)
 
 dnl gdb/gdbserver/configure.in uses BFD_HAVE_SYS_PROCFS_TYPE.
 m4_include(../bfd/bfd.m4)
@@ -10,9 +14,6 @@ m4_include(../bfd/bfd.m4)
 dnl This gets AM_GDB_WARNINGS.
 m4_include(../gdbsupport/warning.m4)
 
-dnl codeset.m4 is needed for common.m4, but not for
-dnl anything else in gdbserver.
-m4_include(../config/codeset.m4)
 m4_include(../gdbsupport/common.m4)
 
 dnl For libiberty_INIT.


  reply	other threads:[~2021-06-23 22:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-09  1:24 [PATCH] gdb: add ../config/pkg.m4 in acinclude.m4 Simon Marchi
2021-05-09 20:00 ` Mike Frysinger
2021-05-10  0:16   ` Simon Marchi
2021-05-10  1:14     ` Mike Frysinger
2021-05-10  1:32       ` Simon Marchi
2021-05-10 13:25         ` Tom Tromey
2021-05-10 22:36         ` Mike Frysinger
2021-06-15  5:44           ` [PATCH] gdb/gdbserver: switch to AC_CONFIG_MACRO_DIRS Mike Frysinger
2021-06-17  2:30             ` Simon Marchi
2021-06-17  4:21               ` Mike Frysinger
2021-06-17 14:43                 ` Simon Marchi
2021-06-18  4:38                   ` Mike Frysinger
2021-06-18 13:22                     ` Simon Marchi
2021-06-23  9:38                     ` Pedro Alves
2021-06-23 22:26                       ` Mike Frysinger [this message]
2021-06-24 18:45                         ` Pedro Alves
2021-06-18 14:03             ` [PATCH v2] " Mike Frysinger
2021-06-20  0:48               ` Simon Marchi
2021-06-20  2:10                 ` Mike Frysinger
2021-06-20  2:17                   ` Simon Marchi
2021-06-20  2:22               ` [PATCH v3] " Mike Frysinger
2021-06-20  2:46                 ` Simon Marchi

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=YNO1L+uADd9tAYSX@vapier \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    --cc=simon.marchi@polymtl.ca \
    /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).