libgm2: Adjust 'autogen.sh' to 'ACLOCAL_AMFLAGS', and simplify (was: [PATCH v3 8/19] modula2 front end: libgm2 contents)

Message ID 87cz4aqj2k.fsf@dirichlet.schwinge.homeip.net
State Accepted
Headers
Series libgm2: Adjust 'autogen.sh' to 'ACLOCAL_AMFLAGS', and simplify (was: [PATCH v3 8/19] modula2 front end: libgm2 contents) |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Thomas Schwinge April 11, 2023, 8:07 p.m. UTC
  Hi!

On 2022-12-06T14:47:26+0000, Gaius Mulley via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
> This patch set consists of the libgm2 makefile, autoconf sources
> necessary to build the libm2pim, libm2iso, libm2min, libm2cor
> and libm2log.

Notice:

> --- /dev/null 2022-08-24 16:22:16.888000070 +0100
> +++ gcc-git-devel-modula2/libgm2/Makefile.am  2022-12-06 02:56:51.428775868 +0000

> +ACLOCAL_AMFLAGS = -I . -I .. -I ../config

... this vs.:

> --- /dev/null 2022-08-24 16:22:16.888000070 +0100
> +++ gcc-git-devel-modula2/libgm2/autogen.sh   2022-12-06 02:56:51.432775922 +0000

> +aclocal -I . -I ../config
> +autoreconf -I . -I ../config

... this: for the latter, no explicit '-I ..' before '-I ../config'.
This means that 'autogen.sh' vs. plain 'autoreconf' don't produce
identical results: different order of files found via search paths.
OK to align (and simplify) that as per the attached
"libgm2: Adjust 'autogen.sh' to 'ACLOCAL_AMFLAGS', and simplify"?


Separately, given that plain 'autoreconf' works, why have 'autogen.sh' at
all?


Grüße
 Thomas


-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
  

Comments

Gaius Mulley April 14, 2023, 12:49 p.m. UTC | #1
Thomas Schwinge <thomas@codesourcery.com> writes:

> Hi!
>
> On 2022-12-06T14:47:26+0000, Gaius Mulley via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
>> This patch set consists of the libgm2 makefile, autoconf sources
>> necessary to build the libm2pim, libm2iso, libm2min, libm2cor
>> and libm2log.
>
> Notice:
>
>> --- /dev/null 2022-08-24 16:22:16.888000070 +0100
>> +++ gcc-git-devel-modula2/libgm2/Makefile.am  2022-12-06 02:56:51.428775868 +0000
>
>> +ACLOCAL_AMFLAGS = -I . -I .. -I ../config
>
> ... this vs.:
>
>> --- /dev/null 2022-08-24 16:22:16.888000070 +0100
>> +++ gcc-git-devel-modula2/libgm2/autogen.sh   2022-12-06 02:56:51.432775922 +0000
>
>> +aclocal -I . -I ../config
>> +autoreconf -I . -I ../config
>
> ... this: for the latter, no explicit '-I ..' before '-I ../config'.
> This means that 'autogen.sh' vs. plain 'autoreconf' don't produce
> identical results: different order of files found via search paths.
> OK to align (and simplify) that as per the attached
> "libgm2: Adjust 'autogen.sh' to 'ACLOCAL_AMFLAGS', and simplify"?

Hi Thomas,

thanks for detecting the bug and the patch - yes looks good to me - feel
free to apply.

> Separately, given that plain 'autoreconf' works, why have 'autogen.sh' at
> all?

If autoreconf does the same as autogen.sh then yes this can be removed
(or its contents replaced with a call to autoreconf perhaps?),

regards,
Gaius

>
>
> Grüße
>  Thomas
>
>
> -----------------
> Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße
> 201, 80634 München; Gesellschaft mit beschränkter Haftung;
> Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft:
> München; Registergericht München, HRB 106955
>
>>From 8fd7ff138c83200ab83df7f08f773e33961550b4 Mon Sep 17 00:00:00 2001
> From: Thomas Schwinge <thomas@codesourcery.com>
> Date: Tue, 11 Apr 2023 21:40:14 +0200
> Subject: [PATCH] libgm2: Adjust 'autogen.sh' to 'ACLOCAL_AMFLAGS', and
>  simplify
>
> Specifying explicit '-I ..' before '-I ../config' is what (most) other GCC
> components do.  Specifying '-I .' is not necessary.
>
> With the order of '-I's aligned, 'autogen.sh' and plain 'autoreconf' then
> produce identical results.
>
> 	libgm2/
> 	* autogen.sh: For 'aclocal', 'autoreconf', remove '-I .',
> 	add '-I ..'.
> 	* Makefile.am (ACLOCAL_AMFLAGS): Remove '-I .'.
> 	* libm2cor/Makefile.am (ACLOCAL_AMFLAGS): Likewise.
> 	* libm2iso/Makefile.am (ACLOCAL_AMFLAGS): Likewise.
> 	* libm2log/Makefile.am (ACLOCAL_AMFLAGS): Likewise.
> 	* libm2min/Makefile.am (ACLOCAL_AMFLAGS): Likewise.
> 	* libm2pim/Makefile.am (ACLOCAL_AMFLAGS): Likewise.
> 	* aclocal.m4: Regenerate.
> 	* Makefile.in: Likewise.
> 	* libm2cor/Makefile.in: Likewise.
> 	* libm2iso/Makefile.in: Likewise.
> 	* libm2log/Makefile.in: Likewise.
> 	* libm2min/Makefile.in: Likewise.
> 	* libm2pim/Makefile.in: Likewise.
> ---
>  libgm2/Makefile.am          |  2 +-
>  libgm2/Makefile.in          | 12 ++++++------
>  libgm2/aclocal.m4           | 10 +++++-----
>  libgm2/autogen.sh           |  5 ++---
>  libgm2/libm2cor/Makefile.am |  2 +-
>  libgm2/libm2cor/Makefile.in | 12 ++++++------
>  libgm2/libm2iso/Makefile.am |  2 +-
>  libgm2/libm2iso/Makefile.in | 12 ++++++------
>  libgm2/libm2log/Makefile.am |  2 +-
>  libgm2/libm2log/Makefile.in | 12 ++++++------
>  libgm2/libm2min/Makefile.am |  2 +-
>  libgm2/libm2min/Makefile.in | 12 ++++++------
>  libgm2/libm2pim/Makefile.am |  2 +-
>  libgm2/libm2pim/Makefile.in | 12 ++++++------
>  14 files changed, 49 insertions(+), 50 deletions(-)
>
> diff --git a/libgm2/Makefile.am b/libgm2/Makefile.am
> index 0b593f6ff216..95df3ed7a301 100644
> --- a/libgm2/Makefile.am
> +++ b/libgm2/Makefile.am
> @@ -25,7 +25,7 @@ AUTOMAKE_OPTIONS = 1.8 foreign
>  
>  SUFFIXES = .c .mod .def .o .obj .lo .a
>  
> -ACLOCAL_AMFLAGS = -I . -I .. -I ../config
> +ACLOCAL_AMFLAGS = -I .. -I ../config
>  
>  # Multilib support.
>  MAKEOVERRIDES=
> diff --git a/libgm2/Makefile.in b/libgm2/Makefile.in
> index da2ec7c2a098..d9950065de19 100644
> --- a/libgm2/Makefile.in
> +++ b/libgm2/Makefile.in
> @@ -90,15 +90,15 @@ host_triplet = @host@
>  target_triplet = @target@
>  subdir = .
>  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
> -am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
> -	$(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
> -	$(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
> -	$(top_srcdir)/../config/acx.m4 \
> +am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
>  	$(top_srcdir)/../config/depstand.m4 \
>  	$(top_srcdir)/../config/lead-dot.m4 \
>  	$(top_srcdir)/../config/multi.m4 \
>  	$(top_srcdir)/../config/no-executables.m4 \
> -	$(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
> +	$(top_srcdir)/../config/override.m4 \
> +	$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
> +	$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
> +	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
>  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
>  	$(ACLOCAL_M4)
>  DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
> @@ -332,7 +332,7 @@ top_srcdir = @top_srcdir@
>  # Modula-2 support.
>  AUTOMAKE_OPTIONS = 1.8 foreign
>  SUFFIXES = .c .mod .def .o .obj .lo .a
> -ACLOCAL_AMFLAGS = -I . -I .. -I ../config
> +ACLOCAL_AMFLAGS = -I .. -I ../config
>  
>  # Multilib support.
>  MAKEOVERRIDES = 
> diff --git a/libgm2/aclocal.m4 b/libgm2/aclocal.m4
> index c352303012d2..832065fbb9be 100644
> --- a/libgm2/aclocal.m4
> +++ b/libgm2/aclocal.m4
> @@ -1187,14 +1187,14 @@ AC_SUBST([am__tar])
>  AC_SUBST([am__untar])
>  ]) # _AM_PROG_TAR
>  
> -m4_include([../libtool.m4])
> -m4_include([../ltoptions.m4])
> -m4_include([../ltsugar.m4])
> -m4_include([../ltversion.m4])
> -m4_include([../lt~obsolete.m4])
>  m4_include([../config/acx.m4])
>  m4_include([../config/depstand.m4])
>  m4_include([../config/lead-dot.m4])
>  m4_include([../config/multi.m4])
>  m4_include([../config/no-executables.m4])
>  m4_include([../config/override.m4])
> +m4_include([../libtool.m4])
> +m4_include([../ltoptions.m4])
> +m4_include([../ltsugar.m4])
> +m4_include([../ltversion.m4])
> +m4_include([../lt~obsolete.m4])
> diff --git a/libgm2/autogen.sh b/libgm2/autogen.sh
> index ea0ef7660984..1b144970a570 100755
> --- a/libgm2/autogen.sh
> +++ b/libgm2/autogen.sh
> @@ -21,9 +21,8 @@ rm -rf autom4te.cache
>  
>  # libtoolize
>  rm -f aclocal.m4
> -# aclocal -I . -I config -I ../config
> -aclocal -I . -I ../config
> -autoreconf -I . -I ../config
> +aclocal -I .. -I ../config
> +autoreconf -I .. -I ../config
>  automake --include-deps
>  
>  rm -rf autom4te.cache
> diff --git a/libgm2/libm2cor/Makefile.am b/libgm2/libm2cor/Makefile.am
> index 8e68272aaecf..48de40c22dd1 100644
> --- a/libgm2/libm2cor/Makefile.am
> +++ b/libgm2/libm2cor/Makefile.am
> @@ -17,7 +17,7 @@
>  
>  SUFFIXES = .c .cc .mod .def .o .obj .lo .a .la
>  
> -ACLOCAL_AMFLAGS = -I . -I .. -I ../config
> +ACLOCAL_AMFLAGS = -I .. -I ../config
>  
>  VPATH = . @srcdir@ @srcdir@/../../gcc/m2/gm2-libs-coroutines
>  
> diff --git a/libgm2/libm2cor/Makefile.in b/libgm2/libm2cor/Makefile.in
> index f92dd941eb0f..9d643d5f8f66 100644
> --- a/libgm2/libm2cor/Makefile.in
> +++ b/libgm2/libm2cor/Makefile.in
> @@ -107,15 +107,15 @@ host_triplet = @host@
>  target_triplet = @target@
>  subdir = libm2cor
>  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
> -am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
> -	$(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
> -	$(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
> -	$(top_srcdir)/../config/acx.m4 \
> +am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
>  	$(top_srcdir)/../config/depstand.m4 \
>  	$(top_srcdir)/../config/lead-dot.m4 \
>  	$(top_srcdir)/../config/multi.m4 \
>  	$(top_srcdir)/../config/no-executables.m4 \
> -	$(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
> +	$(top_srcdir)/../config/override.m4 \
> +	$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
> +	$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
> +	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
>  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
>  	$(ACLOCAL_M4)
>  DIST_COMMON = $(srcdir)/Makefile.am
> @@ -384,7 +384,7 @@ top_build_prefix = @top_build_prefix@
>  top_builddir = @top_builddir@
>  top_srcdir = @top_srcdir@
>  SUFFIXES = .c .cc .mod .def .o .obj .lo .a .la
> -ACLOCAL_AMFLAGS = -I . -I .. -I ../config
> +ACLOCAL_AMFLAGS = -I .. -I ../config
>  
>  # Multilib support.
>  MAKEOVERRIDES = 
> diff --git a/libgm2/libm2iso/Makefile.am b/libgm2/libm2iso/Makefile.am
> index dddced4b8af1..d48ef0692ab4 100644
> --- a/libgm2/libm2iso/Makefile.am
> +++ b/libgm2/libm2iso/Makefile.am
> @@ -17,7 +17,7 @@
>  
>  SUFFIXES = .c .cc .mod .def .o .obj .lo .a .la
>  
> -ACLOCAL_AMFLAGS = -I . -I .. -I ../config
> +ACLOCAL_AMFLAGS = -I .. -I ../config
>  
>  VPATH = . @srcdir@ @srcdir@/../../gcc/m2/gm2-libs-iso
>  
> diff --git a/libgm2/libm2iso/Makefile.in b/libgm2/libm2iso/Makefile.in
> index e28e9dd29787..b8936e745fef 100644
> --- a/libgm2/libm2iso/Makefile.in
> +++ b/libgm2/libm2iso/Makefile.in
> @@ -107,15 +107,15 @@ host_triplet = @host@
>  target_triplet = @target@
>  subdir = libm2iso
>  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
> -am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
> -	$(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
> -	$(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
> -	$(top_srcdir)/../config/acx.m4 \
> +am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
>  	$(top_srcdir)/../config/depstand.m4 \
>  	$(top_srcdir)/../config/lead-dot.m4 \
>  	$(top_srcdir)/../config/multi.m4 \
>  	$(top_srcdir)/../config/no-executables.m4 \
> -	$(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
> +	$(top_srcdir)/../config/override.m4 \
> +	$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
> +	$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
> +	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
>  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
>  	$(ACLOCAL_M4)
>  DIST_COMMON = $(srcdir)/Makefile.am
> @@ -409,7 +409,7 @@ top_build_prefix = @top_build_prefix@
>  top_builddir = @top_builddir@
>  top_srcdir = @top_srcdir@
>  SUFFIXES = .c .cc .mod .def .o .obj .lo .a .la
> -ACLOCAL_AMFLAGS = -I . -I .. -I ../config
> +ACLOCAL_AMFLAGS = -I .. -I ../config
>  
>  # Multilib support.
>  MAKEOVERRIDES = 
> diff --git a/libgm2/libm2log/Makefile.am b/libgm2/libm2log/Makefile.am
> index c38ec3cda56f..a15747fd2453 100644
> --- a/libgm2/libm2log/Makefile.am
> +++ b/libgm2/libm2log/Makefile.am
> @@ -17,7 +17,7 @@
>  
>  SUFFIXES = .c .mod .def .o .obj .lo .a .la
>  
> -ACLOCAL_AMFLAGS = -I . -I .. -I ../config
> +ACLOCAL_AMFLAGS = -I .. -I ../config
>  
>  VPATH = . @srcdir@ @srcdir@/../../gcc/m2/gm2-libs-log
>  
> diff --git a/libgm2/libm2log/Makefile.in b/libgm2/libm2log/Makefile.in
> index ef43b0dc49f1..fa98b1d8ff1d 100644
> --- a/libgm2/libm2log/Makefile.in
> +++ b/libgm2/libm2log/Makefile.in
> @@ -107,15 +107,15 @@ host_triplet = @host@
>  target_triplet = @target@
>  subdir = libm2log
>  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
> -am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
> -	$(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
> -	$(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
> -	$(top_srcdir)/../config/acx.m4 \
> +am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
>  	$(top_srcdir)/../config/depstand.m4 \
>  	$(top_srcdir)/../config/lead-dot.m4 \
>  	$(top_srcdir)/../config/multi.m4 \
>  	$(top_srcdir)/../config/no-executables.m4 \
> -	$(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
> +	$(top_srcdir)/../config/override.m4 \
> +	$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
> +	$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
> +	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
>  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
>  	$(ACLOCAL_M4)
>  DIST_COMMON = $(srcdir)/Makefile.am
> @@ -373,7 +373,7 @@ top_build_prefix = @top_build_prefix@
>  top_builddir = @top_builddir@
>  top_srcdir = @top_srcdir@
>  SUFFIXES = .c .mod .def .o .obj .lo .a .la
> -ACLOCAL_AMFLAGS = -I . -I .. -I ../config
> +ACLOCAL_AMFLAGS = -I .. -I ../config
>  
>  # Multilib support.
>  MAKEOVERRIDES = 
> diff --git a/libgm2/libm2min/Makefile.am b/libgm2/libm2min/Makefile.am
> index 4d6203a69e32..1ff160028f64 100644
> --- a/libgm2/libm2min/Makefile.am
> +++ b/libgm2/libm2min/Makefile.am
> @@ -17,7 +17,7 @@
>  
>  SUFFIXES = .c .mod .def .o .obj .lo .a .la
>  
> -ACLOCAL_AMFLAGS = -I . -I .. -I ../config
> +ACLOCAL_AMFLAGS = -I .. -I ../config
>  
>  VPATH = . @srcdir@/../../gcc/m2/gm2-libs-min
>  
> diff --git a/libgm2/libm2min/Makefile.in b/libgm2/libm2min/Makefile.in
> index 673d6d59d942..1c0bebdc3044 100644
> --- a/libgm2/libm2min/Makefile.in
> +++ b/libgm2/libm2min/Makefile.in
> @@ -107,15 +107,15 @@ host_triplet = @host@
>  target_triplet = @target@
>  subdir = libm2min
>  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
> -am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
> -	$(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
> -	$(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
> -	$(top_srcdir)/../config/acx.m4 \
> +am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
>  	$(top_srcdir)/../config/depstand.m4 \
>  	$(top_srcdir)/../config/lead-dot.m4 \
>  	$(top_srcdir)/../config/multi.m4 \
>  	$(top_srcdir)/../config/no-executables.m4 \
> -	$(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
> +	$(top_srcdir)/../config/override.m4 \
> +	$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
> +	$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
> +	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
>  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
>  	$(ACLOCAL_M4)
>  DIST_COMMON = $(srcdir)/Makefile.am
> @@ -363,7 +363,7 @@ top_build_prefix = @top_build_prefix@
>  top_builddir = @top_builddir@
>  top_srcdir = @top_srcdir@
>  SUFFIXES = .c .mod .def .o .obj .lo .a .la
> -ACLOCAL_AMFLAGS = -I . -I .. -I ../config
> +ACLOCAL_AMFLAGS = -I .. -I ../config
>  
>  # Multilib support.
>  MAKEOVERRIDES = 
> diff --git a/libgm2/libm2pim/Makefile.am b/libgm2/libm2pim/Makefile.am
> index 53042681a74c..ebfeba1ac1df 100644
> --- a/libgm2/libm2pim/Makefile.am
> +++ b/libgm2/libm2pim/Makefile.am
> @@ -17,7 +17,7 @@
>  
>  SUFFIXES = .c .mod .def .o .obj .lo .a .la
>  
> -ACLOCAL_AMFLAGS = -I . -I .. -I ../config
> +ACLOCAL_AMFLAGS = -I .. -I ../config
>  
>  VPATH = . @srcdir@ @srcdir@/../../gcc/m2/gm2-libs
>  
> diff --git a/libgm2/libm2pim/Makefile.in b/libgm2/libm2pim/Makefile.in
> index b77a628715c9..e5a97976d932 100644
> --- a/libgm2/libm2pim/Makefile.in
> +++ b/libgm2/libm2pim/Makefile.in
> @@ -107,15 +107,15 @@ host_triplet = @host@
>  target_triplet = @target@
>  subdir = libm2pim
>  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
> -am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
> -	$(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
> -	$(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
> -	$(top_srcdir)/../config/acx.m4 \
> +am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
>  	$(top_srcdir)/../config/depstand.m4 \
>  	$(top_srcdir)/../config/lead-dot.m4 \
>  	$(top_srcdir)/../config/multi.m4 \
>  	$(top_srcdir)/../config/no-executables.m4 \
> -	$(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
> +	$(top_srcdir)/../config/override.m4 \
> +	$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
> +	$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
> +	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
>  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
>  	$(ACLOCAL_M4)
>  DIST_COMMON = $(srcdir)/Makefile.am
> @@ -398,7 +398,7 @@ top_build_prefix = @top_build_prefix@
>  top_builddir = @top_builddir@
>  top_srcdir = @top_srcdir@
>  SUFFIXES = .c .mod .def .o .obj .lo .a .la
> -ACLOCAL_AMFLAGS = -I . -I .. -I ../config
> +ACLOCAL_AMFLAGS = -I .. -I ../config
>  
>  # Multilib support.
>  MAKEOVERRIDES =
  

Patch

From 8fd7ff138c83200ab83df7f08f773e33961550b4 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Tue, 11 Apr 2023 21:40:14 +0200
Subject: [PATCH] libgm2: Adjust 'autogen.sh' to 'ACLOCAL_AMFLAGS', and
 simplify

Specifying explicit '-I ..' before '-I ../config' is what (most) other GCC
components do.  Specifying '-I .' is not necessary.

With the order of '-I's aligned, 'autogen.sh' and plain 'autoreconf' then
produce identical results.

	libgm2/
	* autogen.sh: For 'aclocal', 'autoreconf', remove '-I .',
	add '-I ..'.
	* Makefile.am (ACLOCAL_AMFLAGS): Remove '-I .'.
	* libm2cor/Makefile.am (ACLOCAL_AMFLAGS): Likewise.
	* libm2iso/Makefile.am (ACLOCAL_AMFLAGS): Likewise.
	* libm2log/Makefile.am (ACLOCAL_AMFLAGS): Likewise.
	* libm2min/Makefile.am (ACLOCAL_AMFLAGS): Likewise.
	* libm2pim/Makefile.am (ACLOCAL_AMFLAGS): Likewise.
	* aclocal.m4: Regenerate.
	* Makefile.in: Likewise.
	* libm2cor/Makefile.in: Likewise.
	* libm2iso/Makefile.in: Likewise.
	* libm2log/Makefile.in: Likewise.
	* libm2min/Makefile.in: Likewise.
	* libm2pim/Makefile.in: Likewise.
---
 libgm2/Makefile.am          |  2 +-
 libgm2/Makefile.in          | 12 ++++++------
 libgm2/aclocal.m4           | 10 +++++-----
 libgm2/autogen.sh           |  5 ++---
 libgm2/libm2cor/Makefile.am |  2 +-
 libgm2/libm2cor/Makefile.in | 12 ++++++------
 libgm2/libm2iso/Makefile.am |  2 +-
 libgm2/libm2iso/Makefile.in | 12 ++++++------
 libgm2/libm2log/Makefile.am |  2 +-
 libgm2/libm2log/Makefile.in | 12 ++++++------
 libgm2/libm2min/Makefile.am |  2 +-
 libgm2/libm2min/Makefile.in | 12 ++++++------
 libgm2/libm2pim/Makefile.am |  2 +-
 libgm2/libm2pim/Makefile.in | 12 ++++++------
 14 files changed, 49 insertions(+), 50 deletions(-)

diff --git a/libgm2/Makefile.am b/libgm2/Makefile.am
index 0b593f6ff216..95df3ed7a301 100644
--- a/libgm2/Makefile.am
+++ b/libgm2/Makefile.am
@@ -25,7 +25,7 @@  AUTOMAKE_OPTIONS = 1.8 foreign
 
 SUFFIXES = .c .mod .def .o .obj .lo .a
 
-ACLOCAL_AMFLAGS = -I . -I .. -I ../config
+ACLOCAL_AMFLAGS = -I .. -I ../config
 
 # Multilib support.
 MAKEOVERRIDES=
diff --git a/libgm2/Makefile.in b/libgm2/Makefile.in
index da2ec7c2a098..d9950065de19 100644
--- a/libgm2/Makefile.in
+++ b/libgm2/Makefile.in
@@ -90,15 +90,15 @@  host_triplet = @host@
 target_triplet = @target@
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
-	$(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
-	$(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
-	$(top_srcdir)/../config/acx.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../config/depstand.m4 \
 	$(top_srcdir)/../config/lead-dot.m4 \
 	$(top_srcdir)/../config/multi.m4 \
 	$(top_srcdir)/../config/no-executables.m4 \
-	$(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/override.m4 \
+	$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+	$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
@@ -332,7 +332,7 @@  top_srcdir = @top_srcdir@
 # Modula-2 support.
 AUTOMAKE_OPTIONS = 1.8 foreign
 SUFFIXES = .c .mod .def .o .obj .lo .a
-ACLOCAL_AMFLAGS = -I . -I .. -I ../config
+ACLOCAL_AMFLAGS = -I .. -I ../config
 
 # Multilib support.
 MAKEOVERRIDES = 
diff --git a/libgm2/aclocal.m4 b/libgm2/aclocal.m4
index c352303012d2..832065fbb9be 100644
--- a/libgm2/aclocal.m4
+++ b/libgm2/aclocal.m4
@@ -1187,14 +1187,14 @@  AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
-m4_include([../libtool.m4])
-m4_include([../ltoptions.m4])
-m4_include([../ltsugar.m4])
-m4_include([../ltversion.m4])
-m4_include([../lt~obsolete.m4])
 m4_include([../config/acx.m4])
 m4_include([../config/depstand.m4])
 m4_include([../config/lead-dot.m4])
 m4_include([../config/multi.m4])
 m4_include([../config/no-executables.m4])
 m4_include([../config/override.m4])
+m4_include([../libtool.m4])
+m4_include([../ltoptions.m4])
+m4_include([../ltsugar.m4])
+m4_include([../ltversion.m4])
+m4_include([../lt~obsolete.m4])
diff --git a/libgm2/autogen.sh b/libgm2/autogen.sh
index ea0ef7660984..1b144970a570 100755
--- a/libgm2/autogen.sh
+++ b/libgm2/autogen.sh
@@ -21,9 +21,8 @@  rm -rf autom4te.cache
 
 # libtoolize
 rm -f aclocal.m4
-# aclocal -I . -I config -I ../config
-aclocal -I . -I ../config
-autoreconf -I . -I ../config
+aclocal -I .. -I ../config
+autoreconf -I .. -I ../config
 automake --include-deps
 
 rm -rf autom4te.cache
diff --git a/libgm2/libm2cor/Makefile.am b/libgm2/libm2cor/Makefile.am
index 8e68272aaecf..48de40c22dd1 100644
--- a/libgm2/libm2cor/Makefile.am
+++ b/libgm2/libm2cor/Makefile.am
@@ -17,7 +17,7 @@ 
 
 SUFFIXES = .c .cc .mod .def .o .obj .lo .a .la
 
-ACLOCAL_AMFLAGS = -I . -I .. -I ../config
+ACLOCAL_AMFLAGS = -I .. -I ../config
 
 VPATH = . @srcdir@ @srcdir@/../../gcc/m2/gm2-libs-coroutines
 
diff --git a/libgm2/libm2cor/Makefile.in b/libgm2/libm2cor/Makefile.in
index f92dd941eb0f..9d643d5f8f66 100644
--- a/libgm2/libm2cor/Makefile.in
+++ b/libgm2/libm2cor/Makefile.in
@@ -107,15 +107,15 @@  host_triplet = @host@
 target_triplet = @target@
 subdir = libm2cor
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
-	$(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
-	$(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
-	$(top_srcdir)/../config/acx.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../config/depstand.m4 \
 	$(top_srcdir)/../config/lead-dot.m4 \
 	$(top_srcdir)/../config/multi.m4 \
 	$(top_srcdir)/../config/no-executables.m4 \
-	$(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/override.m4 \
+	$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+	$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am
@@ -384,7 +384,7 @@  top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 SUFFIXES = .c .cc .mod .def .o .obj .lo .a .la
-ACLOCAL_AMFLAGS = -I . -I .. -I ../config
+ACLOCAL_AMFLAGS = -I .. -I ../config
 
 # Multilib support.
 MAKEOVERRIDES = 
diff --git a/libgm2/libm2iso/Makefile.am b/libgm2/libm2iso/Makefile.am
index dddced4b8af1..d48ef0692ab4 100644
--- a/libgm2/libm2iso/Makefile.am
+++ b/libgm2/libm2iso/Makefile.am
@@ -17,7 +17,7 @@ 
 
 SUFFIXES = .c .cc .mod .def .o .obj .lo .a .la
 
-ACLOCAL_AMFLAGS = -I . -I .. -I ../config
+ACLOCAL_AMFLAGS = -I .. -I ../config
 
 VPATH = . @srcdir@ @srcdir@/../../gcc/m2/gm2-libs-iso
 
diff --git a/libgm2/libm2iso/Makefile.in b/libgm2/libm2iso/Makefile.in
index e28e9dd29787..b8936e745fef 100644
--- a/libgm2/libm2iso/Makefile.in
+++ b/libgm2/libm2iso/Makefile.in
@@ -107,15 +107,15 @@  host_triplet = @host@
 target_triplet = @target@
 subdir = libm2iso
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
-	$(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
-	$(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
-	$(top_srcdir)/../config/acx.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../config/depstand.m4 \
 	$(top_srcdir)/../config/lead-dot.m4 \
 	$(top_srcdir)/../config/multi.m4 \
 	$(top_srcdir)/../config/no-executables.m4 \
-	$(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/override.m4 \
+	$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+	$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am
@@ -409,7 +409,7 @@  top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 SUFFIXES = .c .cc .mod .def .o .obj .lo .a .la
-ACLOCAL_AMFLAGS = -I . -I .. -I ../config
+ACLOCAL_AMFLAGS = -I .. -I ../config
 
 # Multilib support.
 MAKEOVERRIDES = 
diff --git a/libgm2/libm2log/Makefile.am b/libgm2/libm2log/Makefile.am
index c38ec3cda56f..a15747fd2453 100644
--- a/libgm2/libm2log/Makefile.am
+++ b/libgm2/libm2log/Makefile.am
@@ -17,7 +17,7 @@ 
 
 SUFFIXES = .c .mod .def .o .obj .lo .a .la
 
-ACLOCAL_AMFLAGS = -I . -I .. -I ../config
+ACLOCAL_AMFLAGS = -I .. -I ../config
 
 VPATH = . @srcdir@ @srcdir@/../../gcc/m2/gm2-libs-log
 
diff --git a/libgm2/libm2log/Makefile.in b/libgm2/libm2log/Makefile.in
index ef43b0dc49f1..fa98b1d8ff1d 100644
--- a/libgm2/libm2log/Makefile.in
+++ b/libgm2/libm2log/Makefile.in
@@ -107,15 +107,15 @@  host_triplet = @host@
 target_triplet = @target@
 subdir = libm2log
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
-	$(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
-	$(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
-	$(top_srcdir)/../config/acx.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../config/depstand.m4 \
 	$(top_srcdir)/../config/lead-dot.m4 \
 	$(top_srcdir)/../config/multi.m4 \
 	$(top_srcdir)/../config/no-executables.m4 \
-	$(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/override.m4 \
+	$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+	$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am
@@ -373,7 +373,7 @@  top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 SUFFIXES = .c .mod .def .o .obj .lo .a .la
-ACLOCAL_AMFLAGS = -I . -I .. -I ../config
+ACLOCAL_AMFLAGS = -I .. -I ../config
 
 # Multilib support.
 MAKEOVERRIDES = 
diff --git a/libgm2/libm2min/Makefile.am b/libgm2/libm2min/Makefile.am
index 4d6203a69e32..1ff160028f64 100644
--- a/libgm2/libm2min/Makefile.am
+++ b/libgm2/libm2min/Makefile.am
@@ -17,7 +17,7 @@ 
 
 SUFFIXES = .c .mod .def .o .obj .lo .a .la
 
-ACLOCAL_AMFLAGS = -I . -I .. -I ../config
+ACLOCAL_AMFLAGS = -I .. -I ../config
 
 VPATH = . @srcdir@/../../gcc/m2/gm2-libs-min
 
diff --git a/libgm2/libm2min/Makefile.in b/libgm2/libm2min/Makefile.in
index 673d6d59d942..1c0bebdc3044 100644
--- a/libgm2/libm2min/Makefile.in
+++ b/libgm2/libm2min/Makefile.in
@@ -107,15 +107,15 @@  host_triplet = @host@
 target_triplet = @target@
 subdir = libm2min
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
-	$(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
-	$(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
-	$(top_srcdir)/../config/acx.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../config/depstand.m4 \
 	$(top_srcdir)/../config/lead-dot.m4 \
 	$(top_srcdir)/../config/multi.m4 \
 	$(top_srcdir)/../config/no-executables.m4 \
-	$(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/override.m4 \
+	$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+	$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am
@@ -363,7 +363,7 @@  top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 SUFFIXES = .c .mod .def .o .obj .lo .a .la
-ACLOCAL_AMFLAGS = -I . -I .. -I ../config
+ACLOCAL_AMFLAGS = -I .. -I ../config
 
 # Multilib support.
 MAKEOVERRIDES = 
diff --git a/libgm2/libm2pim/Makefile.am b/libgm2/libm2pim/Makefile.am
index 53042681a74c..ebfeba1ac1df 100644
--- a/libgm2/libm2pim/Makefile.am
+++ b/libgm2/libm2pim/Makefile.am
@@ -17,7 +17,7 @@ 
 
 SUFFIXES = .c .mod .def .o .obj .lo .a .la
 
-ACLOCAL_AMFLAGS = -I . -I .. -I ../config
+ACLOCAL_AMFLAGS = -I .. -I ../config
 
 VPATH = . @srcdir@ @srcdir@/../../gcc/m2/gm2-libs
 
diff --git a/libgm2/libm2pim/Makefile.in b/libgm2/libm2pim/Makefile.in
index b77a628715c9..e5a97976d932 100644
--- a/libgm2/libm2pim/Makefile.in
+++ b/libgm2/libm2pim/Makefile.in
@@ -107,15 +107,15 @@  host_triplet = @host@
 target_triplet = @target@
 subdir = libm2pim
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \
-	$(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
-	$(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
-	$(top_srcdir)/../config/acx.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../config/depstand.m4 \
 	$(top_srcdir)/../config/lead-dot.m4 \
 	$(top_srcdir)/../config/multi.m4 \
 	$(top_srcdir)/../config/no-executables.m4 \
-	$(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
+	$(top_srcdir)/../config/override.m4 \
+	$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+	$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+	$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 DIST_COMMON = $(srcdir)/Makefile.am
@@ -398,7 +398,7 @@  top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 SUFFIXES = .c .mod .def .o .obj .lo .a .la
-ACLOCAL_AMFLAGS = -I . -I .. -I ../config
+ACLOCAL_AMFLAGS = -I .. -I ../config
 
 # Multilib support.
 MAKEOVERRIDES = 
-- 
2.39.2