This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 1/6] introduce common.m4


On 11/05/2013 07:52 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
> 
> Pedro> HAVE_LANGINFO_CODESET is used by common/gdb_locale.h,
> Pedro> and GDB_AC_COMMON uses AM_LANGINFO_CODESET.  Shouldn't
> Pedro> codeset.m4 then be included by common.m4 instead?
> 
> It's also needed by gdb/charset.c, so technically it should be included
> in both places.  However it seems strange to include the file twice, and
> reasonably harmless the way it is.

Hmm, but then this goes against the "each module includes what
it needs" philosophy.  Does including the file twice actually result
in expanding the file twice, or does m4 make sure it's included
only once?

If we do go with gdbserver including this directly, then I think
it'd be good to add a comment about the dependency here:

> +++ b/gdb/gdbserver/acinclude.m4
> @@ -12,8 +12,10 @@ sinclude(../../config/override.m4)
>  dnl For ACX_PKGVERSION and ACX_BUGURL.
>  sinclude(../../config/acx.m4)
>
> +m4_include(../../config/codeset.m4)
>  m4_include(../../config/depstand.m4)
>  m4_include(../../config/lead-dot.m4)
> +m4_include(../common/common.m4)

Thanks,
-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]