Update gnulib/Makefile.in:aclocal_m4_deps

Message ID 20180830155724.20000-1-sergiodj@redhat.com
State New, archived
Headers

Commit Message

Sergio Durigan Junior Aug. 30, 2018, 3:57 p.m. UTC
  It was pointed by Pedro that gnulib/Makefile.in should be updated
accordingly after our local gnulib is also updated.  The specific part
that needs to be refreshed is the "aclocal_m4_deps" variable, which
lists the .m4 files present under the "gnulib/import/m4/" directory.
This patch does that.

No regressions introduced.

gdb/ChangeLog:
2018-08-30  Sergio Durigan Junior  <sergiodj@redhat.com>

	* gnulib/Makefile.in (aclocal_m4_deps): Update according to
	the files present in "gnulib/import/m4/".
---
 gdb/ChangeLog          |   5 ++
 gdb/gnulib/Makefile.in | 155 ++++++++++++++++++++++++++++++++---------
 2 files changed, 128 insertions(+), 32 deletions(-)
  

Comments

Simon Marchi Aug. 30, 2018, 5:04 p.m. UTC | #1
On 2018-08-30 11:57, Sergio Durigan Junior wrote:
> It was pointed by Pedro that gnulib/Makefile.in should be updated
> accordingly after our local gnulib is also updated.  The specific part
> that needs to be refreshed is the "aclocal_m4_deps" variable, which
> lists the .m4 files present under the "gnulib/import/m4/" directory.
> This patch does that.
> 
> No regressions introduced.
> 
> gdb/ChangeLog:
> 2018-08-30  Sergio Durigan Junior  <sergiodj@redhat.com>
> 
> 	* gnulib/Makefile.in (aclocal_m4_deps): Update according to
> 	the files present in "gnulib/import/m4/".
> ---
>  gdb/ChangeLog          |   5 ++
>  gdb/gnulib/Makefile.in | 155 ++++++++++++++++++++++++++++++++---------
>  2 files changed, 128 insertions(+), 32 deletions(-)
> 
> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
> index 0d55fd45f5..2ecc4173e8 100644
> --- a/gdb/ChangeLog
> +++ b/gdb/ChangeLog
> @@ -1,3 +1,8 @@
> +2018-08-30  Sergio Durigan Junior  <sergiodj@redhat.com>
> +
> +	* gnulib/Makefile.in (aclocal_m4_deps): Update according to
> +	the files present in "gnulib/import/m4/".
> +
>  2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
> 
>  	* riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
> diff --git a/gdb/gnulib/Makefile.in b/gdb/gnulib/Makefile.in
> index 191ecbda02..1602da54b6 100644
> --- a/gdb/gnulib/Makefile.in
> +++ b/gdb/gnulib/Makefile.in
> @@ -207,49 +207,140 @@ ACLOCAL = aclocal
>  ACLOCAL_AMFLAGS = -I import/m4 -I ../../config
>  aclocal_m4_deps = \
>  	configure.ac \
> -	import/m4/00gnulib.m4 \
> -	import/m4/alloca.m4 \
> -	import/m4/codeset.m4 \
> -	import/m4/configmake.m4 \
> -	import/m4/extensions.m4 \
> -	import/m4/fcntl-o.m4 \
> -	import/m4/fnmatch.m4 \
> -	import/m4/glibc21.m4 \
> -	import/m4/gnulib-cache.m4 \
> +	import/m4/flexmember.m4 \
> +	import/m4/eealloc.m4 \
> +	import/m4/mkdir.m4 \
> +	import/m4/close.m4 \
> +	import/m4/unistd-safer.m4 \
> +	import/m4/inttypes-pri.m4 \
> +	import/m4/chdir-long.m4 \
>  	import/m4/gnulib-common.m4 \
> -	import/m4/gnulib-comp.m4 \
> +	import/m4/readdir.m4 \
> +	import/m4/stdlib_h.m4 \
> +	import/m4/getlogin_r.m4 \
> +	import/m4/warn-on-use.m4 \
> +	import/m4/getdtablesize.m4 \
> +	import/m4/rewinddir.m4 \
> +	import/m4/string_h.m4 \
> +	import/m4/closedir.m4 \
> +	import/m4/canonicalize.m4 \
> +	import/m4/stdio_h.m4 \
> +	import/m4/fdopendir.m4 \
> +	import/m4/getcwd-abort-bug.m4 \
> +	import/m4/alloca.m4 \
> +	import/m4/strstr.m4 \
> +	import/m4/stat-time.m4 \
> +	import/m4/builtin-expect.m4 \
> +	import/m4/rawmemchr.m4 \
> +	import/m4/msvc-nothrow.m4 \
> +	import/m4/absolute-header.m4 \
> +	import/m4/isnanl.m4 \
> +	import/m4/stddef_h.m4 \
>  	import/m4/gnulib-tool.m4 \
> -	import/m4/include_next.m4 \
> -	import/m4/inttypes-pri.m4 \
> -	import/m4/inttypes.m4 \
> -	import/m4/localcharset.m4 \
> -	import/m4/locale-fr.m4 \
> +	import/m4/realloc.m4 \
> +	import/m4/d-type.m4 \
> +	import/m4/frexp.m4 \
> +	import/m4/getcwd-path-max.m4 \
> +	import/m4/dup2.m4 \
> +	import/m4/strtok_r.m4 \
> +	import/m4/exponentd.m4 \
> +	import/m4/std-gnu11.m4 \
>  	import/m4/locale-ja.m4 \
> +	import/m4/gettimeofday.m4 \
> +	import/m4/time_h.m4 \
> +	import/m4/malloc.m4 \
> +	import/m4/fnmatch_h.m4 \
> +	import/m4/codeset.m4 \
> +	import/m4/getcwd.m4 \
> +	import/m4/readlink.m4 \
>  	import/m4/locale-zh.m4 \
> -	import/m4/longlong.m4 \
> +	import/m4/stdint.m4 \
> +	import/m4/memrchr.m4 \
> +	import/m4/onceonly.m4 \
> +	import/m4/pathmax.m4 \
> +	import/m4/rename.m4 \
> +	import/m4/rmdir.m4 \
> +	import/m4/dup.m4 \
> +	import/m4/errno_h.m4 \
>  	import/m4/mbrtowc.m4 \
> -	import/m4/mbsinit.m4 \
> +	import/m4/environ.m4 \
> +	import/m4/wchar_h.m4 \
> +	import/m4/strchrnul.m4 \
> +	import/m4/fcntl_h.m4 \
> +	import/m4/getpagesize.m4 \
> +	import/m4/largefile.m4 \
> +	import/m4/openat.m4 \
> +	import/m4/save-cwd.m4 \
> +	import/m4/stat.m4 \
> +	import/m4/include_next.m4 \
> +	import/m4/mmap-anon.m4 \
> +	import/m4/mode_t.m4 \
> +	import/m4/exponentl.m4 \
> +	import/m4/sys_types_h.m4 \
> +	import/m4/fcntl-o.m4 \
> +	import/m4/stdbool.m4 \
> +	import/m4/float_h.m4 \
> +	import/m4/msvc-inval.m4 \
> +	import/m4/wctype_h.m4 \
> +	import/m4/gnulib-cache.m4 \
>  	import/m4/mbsrtowcs.m4 \
> -	import/m4/mbstate_t.m4 \
> +	import/m4/limits-h.m4 \
> +	import/m4/locale-fr.m4 \
> +	import/m4/fstatat.m4 \
> +	import/m4/inttypes.m4 \
>  	import/m4/memchr.m4 \
> -	import/m4/memmem.m4 \
> -	import/m4/mmap-anon.m4 \
> -	import/m4/multiarch.m4 \
> +	import/m4/glob.m4 \
> +	import/m4/fstat.m4 \
> +	import/m4/sys_stat_h.m4 \
>  	import/m4/off_t.m4 \
> -	import/m4/pathmax.m4 \
> +	import/m4/strdup.m4 \
>  	import/m4/ssize_t.m4 \
> -	import/m4/stdbool.m4 \
> -	import/m4/stddef_h.m4 \
> -	import/m4/stdint.m4 \
> -	import/m4/string_h.m4 \
> -	import/m4/strtok_r.m4 \
> -	import/m4/sys_types_h.m4 \
> +	import/m4/math_h.m4 \
>  	import/m4/unistd_h.m4 \
> -	import/m4/warn-on-use.m4 \
> -	import/m4/wchar_h.m4 \
> +	import/m4/fpieee.m4 \
> +	import/m4/mempcpy.m4 \
> +	import/m4/wint_t.m4 \
> +	import/m4/d-ino.m4 \
> +	import/m4/setenv.m4 \
> +	import/m4/open-cloexec.m4 \
> +	import/m4/longlong.m4 \
> +	import/m4/multiarch.m4 \
> +	import/m4/filenamecat.m4 \
> +	import/m4/gnulib-comp.m4 \
> +	import/m4/mkstemp.m4 \
> +	import/m4/dirfd.m4 \
> +	import/m4/getlogin.m4 \
> +	import/m4/signal_h.m4 \
> +	import/m4/sys_socket_h.m4 \
> +	import/m4/dirname.m4 \
> +	import/m4/00gnulib.m4 \
> +	import/m4/dirent_h.m4 \
> +	import/m4/opendir.m4 \
> +	import/m4/error.m4 \
> +	import/m4/extensions.m4 \
> +	import/m4/fchdir.m4 \
> +	import/m4/mbsinit.m4 \
> +	import/m4/__inline.m4 \
> +	import/m4/extern-inline.m4 \
> +	import/m4/fnmatch.m4 \
> +	import/m4/lstat.m4 \
> +	import/m4/nocrash.m4 \
> +	import/m4/sys_time_h.m4 \
> +	import/m4/localcharset.m4 \
> +	import/m4/open.m4 \
> +	import/m4/localtime-buffer.m4 \
> +	import/m4/getprogname.m4 \
>  	import/m4/wchar_t.m4 \
> -	import/m4/wctype_h.m4 \
> -	import/m4/wint_t.m4
> +	import/m4/isnand.m4 \
> +	import/m4/double-slash-root.m4 \
> +	import/m4/malloca.m4 \
> +	import/m4/fcntl.m4 \
> +	import/m4/frexpl.m4 \
> +	import/m4/strerror.m4 \
> +	import/m4/glob_h.m4 \
> +	import/m4/tempname.m4 \
> +	import/m4/memmem.m4 \
> +	import/m4/mbstate_t.m4
> 
>  $(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps)
>  	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)

This looks good to me, the set of m4 files listed here matches the list 
of actual m4 files in import/m4.  Follow-up question, could we use 
$(wildcard ...) instead of listing them by hand?

Simon
  
Sergio Durigan Junior Aug. 30, 2018, 8 p.m. UTC | #2
On Thursday, August 30 2018, Simon Marchi wrote:

> On 2018-08-30 11:57, Sergio Durigan Junior wrote:
>> It was pointed by Pedro that gnulib/Makefile.in should be updated
>> accordingly after our local gnulib is also updated.  The specific part
>> that needs to be refreshed is the "aclocal_m4_deps" variable, which
>> lists the .m4 files present under the "gnulib/import/m4/" directory.
>> This patch does that.
>>
>> No regressions introduced.
>>
>> gdb/ChangeLog:
>> 2018-08-30  Sergio Durigan Junior  <sergiodj@redhat.com>
>>
>> 	* gnulib/Makefile.in (aclocal_m4_deps): Update according to
>> 	the files present in "gnulib/import/m4/".
>> ---
>>  gdb/ChangeLog          |   5 ++
>>  gdb/gnulib/Makefile.in | 155 ++++++++++++++++++++++++++++++++---------
>>  2 files changed, 128 insertions(+), 32 deletions(-)
>>
>> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
>> index 0d55fd45f5..2ecc4173e8 100644
>> --- a/gdb/ChangeLog
>> +++ b/gdb/ChangeLog
>> @@ -1,3 +1,8 @@
>> +2018-08-30  Sergio Durigan Junior  <sergiodj@redhat.com>
>> +
>> +	* gnulib/Makefile.in (aclocal_m4_deps): Update according to
>> +	the files present in "gnulib/import/m4/".
>> +
>>  2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
>>
>>  	* riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
>> diff --git a/gdb/gnulib/Makefile.in b/gdb/gnulib/Makefile.in
>> index 191ecbda02..1602da54b6 100644
>> --- a/gdb/gnulib/Makefile.in
>> +++ b/gdb/gnulib/Makefile.in
>> @@ -207,49 +207,140 @@ ACLOCAL = aclocal
>>  ACLOCAL_AMFLAGS = -I import/m4 -I ../../config
>>  aclocal_m4_deps = \
>>  	configure.ac \
>> -	import/m4/00gnulib.m4 \
>> -	import/m4/alloca.m4 \
>> -	import/m4/codeset.m4 \
>> -	import/m4/configmake.m4 \
>> -	import/m4/extensions.m4 \
>> -	import/m4/fcntl-o.m4 \
>> -	import/m4/fnmatch.m4 \
>> -	import/m4/glibc21.m4 \
>> -	import/m4/gnulib-cache.m4 \
>> +	import/m4/flexmember.m4 \
>> +	import/m4/eealloc.m4 \
>> +	import/m4/mkdir.m4 \
>> +	import/m4/close.m4 \
>> +	import/m4/unistd-safer.m4 \
>> +	import/m4/inttypes-pri.m4 \
>> +	import/m4/chdir-long.m4 \
>>  	import/m4/gnulib-common.m4 \
>> -	import/m4/gnulib-comp.m4 \
>> +	import/m4/readdir.m4 \
>> +	import/m4/stdlib_h.m4 \
>> +	import/m4/getlogin_r.m4 \
>> +	import/m4/warn-on-use.m4 \
>> +	import/m4/getdtablesize.m4 \
>> +	import/m4/rewinddir.m4 \
>> +	import/m4/string_h.m4 \
>> +	import/m4/closedir.m4 \
>> +	import/m4/canonicalize.m4 \
>> +	import/m4/stdio_h.m4 \
>> +	import/m4/fdopendir.m4 \
>> +	import/m4/getcwd-abort-bug.m4 \
>> +	import/m4/alloca.m4 \
>> +	import/m4/strstr.m4 \
>> +	import/m4/stat-time.m4 \
>> +	import/m4/builtin-expect.m4 \
>> +	import/m4/rawmemchr.m4 \
>> +	import/m4/msvc-nothrow.m4 \
>> +	import/m4/absolute-header.m4 \
>> +	import/m4/isnanl.m4 \
>> +	import/m4/stddef_h.m4 \
>>  	import/m4/gnulib-tool.m4 \
>> -	import/m4/include_next.m4 \
>> -	import/m4/inttypes-pri.m4 \
>> -	import/m4/inttypes.m4 \
>> -	import/m4/localcharset.m4 \
>> -	import/m4/locale-fr.m4 \
>> +	import/m4/realloc.m4 \
>> +	import/m4/d-type.m4 \
>> +	import/m4/frexp.m4 \
>> +	import/m4/getcwd-path-max.m4 \
>> +	import/m4/dup2.m4 \
>> +	import/m4/strtok_r.m4 \
>> +	import/m4/exponentd.m4 \
>> +	import/m4/std-gnu11.m4 \
>>  	import/m4/locale-ja.m4 \
>> +	import/m4/gettimeofday.m4 \
>> +	import/m4/time_h.m4 \
>> +	import/m4/malloc.m4 \
>> +	import/m4/fnmatch_h.m4 \
>> +	import/m4/codeset.m4 \
>> +	import/m4/getcwd.m4 \
>> +	import/m4/readlink.m4 \
>>  	import/m4/locale-zh.m4 \
>> -	import/m4/longlong.m4 \
>> +	import/m4/stdint.m4 \
>> +	import/m4/memrchr.m4 \
>> +	import/m4/onceonly.m4 \
>> +	import/m4/pathmax.m4 \
>> +	import/m4/rename.m4 \
>> +	import/m4/rmdir.m4 \
>> +	import/m4/dup.m4 \
>> +	import/m4/errno_h.m4 \
>>  	import/m4/mbrtowc.m4 \
>> -	import/m4/mbsinit.m4 \
>> +	import/m4/environ.m4 \
>> +	import/m4/wchar_h.m4 \
>> +	import/m4/strchrnul.m4 \
>> +	import/m4/fcntl_h.m4 \
>> +	import/m4/getpagesize.m4 \
>> +	import/m4/largefile.m4 \
>> +	import/m4/openat.m4 \
>> +	import/m4/save-cwd.m4 \
>> +	import/m4/stat.m4 \
>> +	import/m4/include_next.m4 \
>> +	import/m4/mmap-anon.m4 \
>> +	import/m4/mode_t.m4 \
>> +	import/m4/exponentl.m4 \
>> +	import/m4/sys_types_h.m4 \
>> +	import/m4/fcntl-o.m4 \
>> +	import/m4/stdbool.m4 \
>> +	import/m4/float_h.m4 \
>> +	import/m4/msvc-inval.m4 \
>> +	import/m4/wctype_h.m4 \
>> +	import/m4/gnulib-cache.m4 \
>>  	import/m4/mbsrtowcs.m4 \
>> -	import/m4/mbstate_t.m4 \
>> +	import/m4/limits-h.m4 \
>> +	import/m4/locale-fr.m4 \
>> +	import/m4/fstatat.m4 \
>> +	import/m4/inttypes.m4 \
>>  	import/m4/memchr.m4 \
>> -	import/m4/memmem.m4 \
>> -	import/m4/mmap-anon.m4 \
>> -	import/m4/multiarch.m4 \
>> +	import/m4/glob.m4 \
>> +	import/m4/fstat.m4 \
>> +	import/m4/sys_stat_h.m4 \
>>  	import/m4/off_t.m4 \
>> -	import/m4/pathmax.m4 \
>> +	import/m4/strdup.m4 \
>>  	import/m4/ssize_t.m4 \
>> -	import/m4/stdbool.m4 \
>> -	import/m4/stddef_h.m4 \
>> -	import/m4/stdint.m4 \
>> -	import/m4/string_h.m4 \
>> -	import/m4/strtok_r.m4 \
>> -	import/m4/sys_types_h.m4 \
>> +	import/m4/math_h.m4 \
>>  	import/m4/unistd_h.m4 \
>> -	import/m4/warn-on-use.m4 \
>> -	import/m4/wchar_h.m4 \
>> +	import/m4/fpieee.m4 \
>> +	import/m4/mempcpy.m4 \
>> +	import/m4/wint_t.m4 \
>> +	import/m4/d-ino.m4 \
>> +	import/m4/setenv.m4 \
>> +	import/m4/open-cloexec.m4 \
>> +	import/m4/longlong.m4 \
>> +	import/m4/multiarch.m4 \
>> +	import/m4/filenamecat.m4 \
>> +	import/m4/gnulib-comp.m4 \
>> +	import/m4/mkstemp.m4 \
>> +	import/m4/dirfd.m4 \
>> +	import/m4/getlogin.m4 \
>> +	import/m4/signal_h.m4 \
>> +	import/m4/sys_socket_h.m4 \
>> +	import/m4/dirname.m4 \
>> +	import/m4/00gnulib.m4 \
>> +	import/m4/dirent_h.m4 \
>> +	import/m4/opendir.m4 \
>> +	import/m4/error.m4 \
>> +	import/m4/extensions.m4 \
>> +	import/m4/fchdir.m4 \
>> +	import/m4/mbsinit.m4 \
>> +	import/m4/__inline.m4 \
>> +	import/m4/extern-inline.m4 \
>> +	import/m4/fnmatch.m4 \
>> +	import/m4/lstat.m4 \
>> +	import/m4/nocrash.m4 \
>> +	import/m4/sys_time_h.m4 \
>> +	import/m4/localcharset.m4 \
>> +	import/m4/open.m4 \
>> +	import/m4/localtime-buffer.m4 \
>> +	import/m4/getprogname.m4 \
>>  	import/m4/wchar_t.m4 \
>> -	import/m4/wctype_h.m4 \
>> -	import/m4/wint_t.m4
>> +	import/m4/isnand.m4 \
>> +	import/m4/double-slash-root.m4 \
>> +	import/m4/malloca.m4 \
>> +	import/m4/fcntl.m4 \
>> +	import/m4/frexpl.m4 \
>> +	import/m4/strerror.m4 \
>> +	import/m4/glob_h.m4 \
>> +	import/m4/tempname.m4 \
>> +	import/m4/memmem.m4 \
>> +	import/m4/mbstate_t.m4
>>
>>  $(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps)
>>  	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
>
> This looks good to me, the set of m4 files listed here matches the
> list of actual m4 files in import/m4.  Follow-up question, could we
> use $(wildcard ...) instead of listing them by hand?

Yeah, I think that could work.  That's basically what I did to generate
this list: "ls *.m4".  If you want, I can edit the patch and make it use
$(wildcard) before pushing it.
  
Joel Brobecker Aug. 31, 2018, 7:59 a.m. UTC | #3
> > This looks good to me, the set of m4 files listed here matches the
> > list of actual m4 files in import/m4.  Follow-up question, could we
> > use $(wildcard ...) instead of listing them by hand?
> 
> Yeah, I think that could work.  That's basically what I did to generate
> this list: "ls *.m4".  If you want, I can edit the patch and make it use
> $(wildcard) before pushing it.

I would push the patch as is for now, since it is a necessary
improvement on its own that doesn't really make the next step
any more difficult than before; and then, if you are willing,
work on using $(wildcard ...) as a followup.
  
Pedro Alves Aug. 31, 2018, 11:21 a.m. UTC | #4
On 08/30/2018 09:00 PM, Sergio Durigan Junior wrote:
> On Thursday, August 30 2018, Simon Marchi wrote:
> 
>> On 2018-08-30 11:57, Sergio Durigan Junior wrote:

>>>  $(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps)
>>>  	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
>>
>> This looks good to me, the set of m4 files listed here matches the
>> list of actual m4 files in import/m4.  Follow-up question, could we
>> use $(wildcard ...) instead of listing them by hand?
> 
> Yeah, I think that could work.  That's basically what I did to generate
> this list: "ls *.m4".  If you want, I can edit the patch and make it use
> $(wildcard) before pushing it.
> 

Really not sure that's a good idea.  We don't use $wildcard for listing .c files
either, for example, and I think for good reason.  It makes the set of files to build
dependent of what you happen to have or not have locally, instead of determined
statically.  That in general affects development, changing git branches, etc. 
Consider that GDB even links successfully if you miss including/linking some .c file
in the build, given the _initialize_foo registration mechanism.  Maybe not so much
an issue with the m4 files, but I'd think a more principle approach to automate this
would be to make the update-gnulib.sh script generate/update a Makefile fragment
file that contained the aclocal_m4_deps m4 files list, check that file into the
tree, and then gdb/gnulib/Makefile.in would source/include that fragment file.

Thanks,
Pedro Alves
  
Sergio Durigan Junior Aug. 31, 2018, 4:02 p.m. UTC | #5
On Friday, August 31 2018, Joel Brobecker wrote:

>> > This looks good to me, the set of m4 files listed here matches the
>> > list of actual m4 files in import/m4.  Follow-up question, could we
>> > use $(wildcard ...) instead of listing them by hand?
>> 
>> Yeah, I think that could work.  That's basically what I did to generate
>> this list: "ls *.m4".  If you want, I can edit the patch and make it use
>> $(wildcard) before pushing it.
>
> I would push the patch as is for now, since it is a necessary
> improvement on its own that doesn't really make the next step
> any more difficult than before; and then, if you are willing,
> work on using $(wildcard ...) as a followup.

Thanks, Joel and Simon.  I pushed it now:

dab999b116b507ad431c70fab0a28074dfea29df
  
Sergio Durigan Junior Aug. 31, 2018, 4:03 p.m. UTC | #6
On Friday, August 31 2018, Pedro Alves wrote:

> On 08/30/2018 09:00 PM, Sergio Durigan Junior wrote:
>> On Thursday, August 30 2018, Simon Marchi wrote:
>> 
>>> On 2018-08-30 11:57, Sergio Durigan Junior wrote:
>
>>>>  $(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps)
>>>>  	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
>>>
>>> This looks good to me, the set of m4 files listed here matches the
>>> list of actual m4 files in import/m4.  Follow-up question, could we
>>> use $(wildcard ...) instead of listing them by hand?
>> 
>> Yeah, I think that could work.  That's basically what I did to generate
>> this list: "ls *.m4".  If you want, I can edit the patch and make it use
>> $(wildcard) before pushing it.
>> 
>
> Really not sure that's a good idea.  We don't use $wildcard for listing .c files
> either, for example, and I think for good reason.  It makes the set of files to build
> dependent of what you happen to have or not have locally, instead of determined
> statically.  That in general affects development, changing git branches, etc. 
> Consider that GDB even links successfully if you miss including/linking some .c file
> in the build, given the _initialize_foo registration mechanism.

Hm, alright, that's a good point.

> Maybe not so much an issue with the m4 files, but I'd think a more
> principle approach to automate this would be to make the
> update-gnulib.sh script generate/update a Makefile fragment file that
> contained the aclocal_m4_deps m4 files list, check that file into the
> tree, and then gdb/gnulib/Makefile.in would source/include that
> fragment file.

Yeah, that works as well.  I'll work on a patch and submit it soon.

Thanks,
  

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0d55fd45f5..2ecc4173e8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@ 
+2018-08-30  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* gnulib/Makefile.in (aclocal_m4_deps): Update according to
+	the files present in "gnulib/import/m4/".
+
 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
 
 	* riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
diff --git a/gdb/gnulib/Makefile.in b/gdb/gnulib/Makefile.in
index 191ecbda02..1602da54b6 100644
--- a/gdb/gnulib/Makefile.in
+++ b/gdb/gnulib/Makefile.in
@@ -207,49 +207,140 @@  ACLOCAL = aclocal
 ACLOCAL_AMFLAGS = -I import/m4 -I ../../config
 aclocal_m4_deps = \
 	configure.ac \
-	import/m4/00gnulib.m4 \
-	import/m4/alloca.m4 \
-	import/m4/codeset.m4 \
-	import/m4/configmake.m4 \
-	import/m4/extensions.m4 \
-	import/m4/fcntl-o.m4 \
-	import/m4/fnmatch.m4 \
-	import/m4/glibc21.m4 \
-	import/m4/gnulib-cache.m4 \
+	import/m4/flexmember.m4 \
+	import/m4/eealloc.m4 \
+	import/m4/mkdir.m4 \
+	import/m4/close.m4 \
+	import/m4/unistd-safer.m4 \
+	import/m4/inttypes-pri.m4 \
+	import/m4/chdir-long.m4 \
 	import/m4/gnulib-common.m4 \
-	import/m4/gnulib-comp.m4 \
+	import/m4/readdir.m4 \
+	import/m4/stdlib_h.m4 \
+	import/m4/getlogin_r.m4 \
+	import/m4/warn-on-use.m4 \
+	import/m4/getdtablesize.m4 \
+	import/m4/rewinddir.m4 \
+	import/m4/string_h.m4 \
+	import/m4/closedir.m4 \
+	import/m4/canonicalize.m4 \
+	import/m4/stdio_h.m4 \
+	import/m4/fdopendir.m4 \
+	import/m4/getcwd-abort-bug.m4 \
+	import/m4/alloca.m4 \
+	import/m4/strstr.m4 \
+	import/m4/stat-time.m4 \
+	import/m4/builtin-expect.m4 \
+	import/m4/rawmemchr.m4 \
+	import/m4/msvc-nothrow.m4 \
+	import/m4/absolute-header.m4 \
+	import/m4/isnanl.m4 \
+	import/m4/stddef_h.m4 \
 	import/m4/gnulib-tool.m4 \
-	import/m4/include_next.m4 \
-	import/m4/inttypes-pri.m4 \
-	import/m4/inttypes.m4 \
-	import/m4/localcharset.m4 \
-	import/m4/locale-fr.m4 \
+	import/m4/realloc.m4 \
+	import/m4/d-type.m4 \
+	import/m4/frexp.m4 \
+	import/m4/getcwd-path-max.m4 \
+	import/m4/dup2.m4 \
+	import/m4/strtok_r.m4 \
+	import/m4/exponentd.m4 \
+	import/m4/std-gnu11.m4 \
 	import/m4/locale-ja.m4 \
+	import/m4/gettimeofday.m4 \
+	import/m4/time_h.m4 \
+	import/m4/malloc.m4 \
+	import/m4/fnmatch_h.m4 \
+	import/m4/codeset.m4 \
+	import/m4/getcwd.m4 \
+	import/m4/readlink.m4 \
 	import/m4/locale-zh.m4 \
-	import/m4/longlong.m4 \
+	import/m4/stdint.m4 \
+	import/m4/memrchr.m4 \
+	import/m4/onceonly.m4 \
+	import/m4/pathmax.m4 \
+	import/m4/rename.m4 \
+	import/m4/rmdir.m4 \
+	import/m4/dup.m4 \
+	import/m4/errno_h.m4 \
 	import/m4/mbrtowc.m4 \
-	import/m4/mbsinit.m4 \
+	import/m4/environ.m4 \
+	import/m4/wchar_h.m4 \
+	import/m4/strchrnul.m4 \
+	import/m4/fcntl_h.m4 \
+	import/m4/getpagesize.m4 \
+	import/m4/largefile.m4 \
+	import/m4/openat.m4 \
+	import/m4/save-cwd.m4 \
+	import/m4/stat.m4 \
+	import/m4/include_next.m4 \
+	import/m4/mmap-anon.m4 \
+	import/m4/mode_t.m4 \
+	import/m4/exponentl.m4 \
+	import/m4/sys_types_h.m4 \
+	import/m4/fcntl-o.m4 \
+	import/m4/stdbool.m4 \
+	import/m4/float_h.m4 \
+	import/m4/msvc-inval.m4 \
+	import/m4/wctype_h.m4 \
+	import/m4/gnulib-cache.m4 \
 	import/m4/mbsrtowcs.m4 \
-	import/m4/mbstate_t.m4 \
+	import/m4/limits-h.m4 \
+	import/m4/locale-fr.m4 \
+	import/m4/fstatat.m4 \
+	import/m4/inttypes.m4 \
 	import/m4/memchr.m4 \
-	import/m4/memmem.m4 \
-	import/m4/mmap-anon.m4 \
-	import/m4/multiarch.m4 \
+	import/m4/glob.m4 \
+	import/m4/fstat.m4 \
+	import/m4/sys_stat_h.m4 \
 	import/m4/off_t.m4 \
-	import/m4/pathmax.m4 \
+	import/m4/strdup.m4 \
 	import/m4/ssize_t.m4 \
-	import/m4/stdbool.m4 \
-	import/m4/stddef_h.m4 \
-	import/m4/stdint.m4 \
-	import/m4/string_h.m4 \
-	import/m4/strtok_r.m4 \
-	import/m4/sys_types_h.m4 \
+	import/m4/math_h.m4 \
 	import/m4/unistd_h.m4 \
-	import/m4/warn-on-use.m4 \
-	import/m4/wchar_h.m4 \
+	import/m4/fpieee.m4 \
+	import/m4/mempcpy.m4 \
+	import/m4/wint_t.m4 \
+	import/m4/d-ino.m4 \
+	import/m4/setenv.m4 \
+	import/m4/open-cloexec.m4 \
+	import/m4/longlong.m4 \
+	import/m4/multiarch.m4 \
+	import/m4/filenamecat.m4 \
+	import/m4/gnulib-comp.m4 \
+	import/m4/mkstemp.m4 \
+	import/m4/dirfd.m4 \
+	import/m4/getlogin.m4 \
+	import/m4/signal_h.m4 \
+	import/m4/sys_socket_h.m4 \
+	import/m4/dirname.m4 \
+	import/m4/00gnulib.m4 \
+	import/m4/dirent_h.m4 \
+	import/m4/opendir.m4 \
+	import/m4/error.m4 \
+	import/m4/extensions.m4 \
+	import/m4/fchdir.m4 \
+	import/m4/mbsinit.m4 \
+	import/m4/__inline.m4 \
+	import/m4/extern-inline.m4 \
+	import/m4/fnmatch.m4 \
+	import/m4/lstat.m4 \
+	import/m4/nocrash.m4 \
+	import/m4/sys_time_h.m4 \
+	import/m4/localcharset.m4 \
+	import/m4/open.m4 \
+	import/m4/localtime-buffer.m4 \
+	import/m4/getprogname.m4 \
 	import/m4/wchar_t.m4 \
-	import/m4/wctype_h.m4 \
-	import/m4/wint_t.m4
+	import/m4/isnand.m4 \
+	import/m4/double-slash-root.m4 \
+	import/m4/malloca.m4 \
+	import/m4/fcntl.m4 \
+	import/m4/frexpl.m4 \
+	import/m4/strerror.m4 \
+	import/m4/glob_h.m4 \
+	import/m4/tempname.m4 \
+	import/m4/memmem.m4 \
+	import/m4/mbstate_t.m4
 
 $(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps)
 	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)