diff mbox

[v3,2/8] Generate aclocal-m4-deps.mk more deterministically and portably.

Message ID 20180918185444.89533-3-jhb@FreeBSD.org
State New
Headers show

Commit Message

John Baldwin Sept. 18, 2018, 6:54 p.m. UTC
Sort the list of files generated by find to make the order of the
entries deterministic.  When sorting, use explicit "C" collation.  Use
an explicit tab character instead of '\t' as some sed implementations
treat '\t' as an escaped 't' instead of a tab.

gdb/ChangeLog:

	* gnulib/aclocal-m4-deps.mk: New file.
	* gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
	deterministically.
---
 gdb/ChangeLog                 |   6 +
 gdb/gnulib/aclocal-m4-deps.mk | 224 +++++++++++++++++-----------------
 gdb/gnulib/update-gnulib.sh   |   3 +-
 3 files changed, 117 insertions(+), 116 deletions(-)

Comments

Simon Marchi Sept. 18, 2018, 8:27 p.m. UTC | #1
On 2018-09-18 02:54 PM, John Baldwin wrote:
> Sort the list of files generated by find to make the order of the

> entries deterministic.  When sorting, use explicit "C" collation.  Use

> an explicit tab character instead of '\t' as some sed implementations

> treat '\t' as an escaped 't' instead of a tab.

> 

> gdb/ChangeLog:

> 

> 	* gnulib/aclocal-m4-deps.mk: New file.

> 	* gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"

> 	deterministically.

> ---

>  gdb/ChangeLog                 |   6 +

>  gdb/gnulib/aclocal-m4-deps.mk | 224 +++++++++++++++++-----------------

>  gdb/gnulib/update-gnulib.sh   |   3 +-

>  3 files changed, 117 insertions(+), 116 deletions(-)

> 

> diff --git a/gdb/ChangeLog b/gdb/ChangeLog

> index 14ac0dae52..c56e35fb8b 100644

> --- a/gdb/ChangeLog

> +++ b/gdb/ChangeLog

> @@ -1,3 +1,9 @@

> +2018-09-17  John Baldwin  <jhb@FreeBSD.org>

> +

> +	* gnulib/aclocal-m4-deps.mk: New file.

> +	* gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"

> +	deterministically.

> +

>  2018-09-17  John Baldwin  <jhb@FreeBSD.org>

>  

>  	* fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of

> diff --git a/gdb/gnulib/aclocal-m4-deps.mk b/gdb/gnulib/aclocal-m4-deps.mk

> index 52d280db30..8b39aef6ad 100644

> --- a/gdb/gnulib/aclocal-m4-deps.mk

> +++ b/gdb/gnulib/aclocal-m4-deps.mk

> @@ -1,136 +1,130 @@

>  # THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:

>  aclocal_m4_deps = \

> -	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/00gnulib.m4 \

> +	import/m4/absolute-header.m4 \

> +	import/m4/alloca.m4 \

> +	import/m4/canonicalize.m4 \

>  	import/m4/chdir-long.m4 \

> -	import/m4/gnulib-common.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/close.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/realloc.m4 \

> +	import/m4/codeset.m4 \

> +	import/m4/configmake.m4 \

> +	import/m4/d-ino.m4 \

>  	import/m4/d-type.m4 \

> -	import/m4/frexp.m4 \

> -	import/m4/getcwd-path-max.m4 \

> +	import/m4/dirent_h.m4 \

> +	import/m4/dirfd.m4 \

> +	import/m4/dirname.m4 \

> +	import/m4/double-slash-root.m4 \

> +	import/m4/dup.m4 \

>  	import/m4/dup2.m4 \

> -	import/m4/strtok_r.m4 \

> +	import/m4/eealloc.m4 \

> +	import/m4/environ.m4 \

> +	import/m4/errno_h.m4 \

> +	import/m4/error.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/exponentl.m4 \

> +	import/m4/extensions.m4 \

> +	import/m4/extern-inline.m4 \

> +	import/m4/fchdir.m4 \

> +	import/m4/fcntl-o.m4 \

> +	import/m4/fcntl.m4 \

> +	import/m4/fcntl_h.m4 \

> +	import/m4/fdopendir.m4 \

> +	import/m4/filenamecat.m4 \

> +	import/m4/flexmember.m4 \

> +	import/m4/float_h.m4 \

> +	import/m4/fnmatch.m4 \

> +	import/m4/fpieee.m4 \

> +	import/m4/frexp.m4 \

> +	import/m4/frexpl.m4 \

> +	import/m4/fstat.m4 \

> +	import/m4/fstatat.m4 \

> +	import/m4/getcwd-abort-bug.m4 \

> +	import/m4/getcwd-path-max.m4 \

>  	import/m4/getcwd.m4 \

> -	import/m4/readlink.m4 \

> +	import/m4/getdtablesize.m4 \

> +	import/m4/getlogin_r.m4 \

> +	import/m4/getprogname.m4 \

> +	import/m4/gettimeofday.m4 \

> +	import/m4/glibc21.m4 \

> +	import/m4/glob.m4 \

> +	import/m4/gnulib-cache.m4 \

> +	import/m4/gnulib-common.m4 \

> +	import/m4/gnulib-comp.m4 \

> +	import/m4/gnulib-tool.m4 \

> +	import/m4/hard-locale.m4 \

> +	import/m4/include_next.m4 \

> +	import/m4/inttypes-pri.m4 \

> +	import/m4/inttypes.m4 \

> +	import/m4/isnand.m4 \

> +	import/m4/isnanl.m4 \

> +	import/m4/largefile.m4 \

> +	import/m4/limits-h.m4 \

> +	import/m4/localcharset.m4 \

> +	import/m4/locale-fr.m4 \

> +	import/m4/locale-ja.m4 \

>  	import/m4/locale-zh.m4 \

> -	import/m4/stdint.m4 \

> +	import/m4/longlong.m4 \

> +	import/m4/lstat.m4 \

> +	import/m4/malloc.m4 \

> +	import/m4/malloca.m4 \

> +	import/m4/math_h.m4 \

> +	import/m4/mbrtowc.m4 \

> +	import/m4/mbsinit.m4 \

> +	import/m4/mbsrtowcs.m4 \

> +	import/m4/mbstate_t.m4 \

> +	import/m4/memchr.m4 \

> +	import/m4/memmem.m4 \

> +	import/m4/mempcpy.m4 \

>  	import/m4/memrchr.m4 \

> +	import/m4/mkdir.m4 \

> +	import/m4/mkstemp.m4 \

> +	import/m4/mmap-anon.m4 \

> +	import/m4/mode_t.m4 \

> +	import/m4/msvc-inval.m4 \

> +	import/m4/msvc-nothrow.m4 \

> +	import/m4/multiarch.m4 \

> +	import/m4/nocrash.m4 \

> +	import/m4/off_t.m4 \

>  	import/m4/onceonly.m4 \

> +	import/m4/open.m4 \

> +	import/m4/openat.m4 \

> +	import/m4/opendir.m4 \

>  	import/m4/pathmax.m4 \

> +	import/m4/rawmemchr.m4 \

> +	import/m4/readdir.m4 \

> +	import/m4/readlink.m4 \

> +	import/m4/realloc.m4 \

>  	import/m4/rename.m4 \

> +	import/m4/rewinddir.m4 \

>  	import/m4/rmdir.m4 \

> -	import/m4/dup.m4 \

> -	import/m4/errno_h.m4 \

> -	import/m4/mbrtowc.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/secure_getenv.m4 \

> +	import/m4/setenv.m4 \

> +	import/m4/signal_h.m4 \

> +	import/m4/ssize_t.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/limits-h.m4 \

> -	import/m4/locale-fr.m4 \

> -	import/m4/fstatat.m4 \

> -	import/m4/inttypes.m4 \

> -	import/m4/memchr.m4 \

> -	import/m4/glob.m4 \

> -	import/m4/fstat.m4 \

> -	import/m4/sys_stat_h.m4 \

> -	import/m4/off_t.m4 \

> +	import/m4/stddef_h.m4 \

> +	import/m4/stdint.m4 \

> +	import/m4/stdio_h.m4 \

> +	import/m4/stdlib_h.m4 \

> +	import/m4/strchrnul.m4 \

>  	import/m4/strdup.m4 \

> -	import/m4/ssize_t.m4 \

> -	import/m4/math_h.m4 \

> -	import/m4/unistd_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/strerror.m4 \

> +	import/m4/string_h.m4 \

> +	import/m4/strstr.m4 \

> +	import/m4/strtok_r.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_stat_h.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/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/sys_types_h.m4 \

>  	import/m4/tempname.m4 \

> -	import/m4/memmem.m4 \

> -	import/m4/mbstate_t.m4

> +	import/m4/time_h.m4 \

> +	import/m4/unistd-safer.m4 \

> +	import/m4/unistd_h.m4 \

> +	import/m4/warn-on-use.m4 \

> +	import/m4/wchar_h.m4 \

> +	import/m4/wchar_t.m4 \

> +	import/m4/wctype_h.m4 \

> +	import/m4/wint_t.m4

> diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh

> index 1bae7e124b..3077424622 100755

> --- a/gdb/gnulib/update-gnulib.sh

> +++ b/gdb/gnulib/update-gnulib.sh

> @@ -172,7 +172,8 @@ ACLOCAL_M4_DEPS_FILE=aclocal-m4-deps.mk

>  cat > ${ACLOCAL_M4_DEPS_FILE}.tmp <<EOF

>  # THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:

>  aclocal_m4_deps = \\

> -$(find import/m4 -type f -name "*.m4" | sed 's/^/\t/; s/$/ \\/; $s/ \\//g')

> +$(find import/m4 -type f -name "*.m4" | LC_COLLATE=C sort | \

> +  sed 's/^/	/; s/$/ \\/; $s/ \\//g')

>  EOF

>  

>  ../../move-if-change ${ACLOCAL_M4_DEPS_FILE}.tmp ${ACLOCAL_M4_DEPS_FILE}

> 


This LGTM.  The new aclocal-m4-deps.mk files has less items, but that's because it currently
contains some m4 files that don't exist.  I think they were added there with the gnulib
update, but were not removed when it was reverted.  An example of this is import/m4/builtin-expect.m4.

Simon
Sergio Durigan Junior Sept. 19, 2018, 3 a.m. UTC | #2
On Tuesday, September 18 2018, Simon Marchi wrote:

> On 2018-09-18 02:54 PM, John Baldwin wrote:
>> Sort the list of files generated by find to make the order of the
>> entries deterministic.  When sorting, use explicit "C" collation.  Use
>> an explicit tab character instead of '\t' as some sed implementations
>> treat '\t' as an escaped 't' instead of a tab.
>> 
>> gdb/ChangeLog:
>> 
>> 	* gnulib/aclocal-m4-deps.mk: New file.
>> 	* gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
>> 	deterministically.
>> ---
>>  gdb/ChangeLog                 |   6 +
>>  gdb/gnulib/aclocal-m4-deps.mk | 224 +++++++++++++++++-----------------
>>  gdb/gnulib/update-gnulib.sh   |   3 +-
>>  3 files changed, 117 insertions(+), 116 deletions(-)
>> 
>> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
>> index 14ac0dae52..c56e35fb8b 100644
>> --- a/gdb/ChangeLog
>> +++ b/gdb/ChangeLog
>> @@ -1,3 +1,9 @@
>> +2018-09-17  John Baldwin  <jhb@FreeBSD.org>
>> +
>> +	* gnulib/aclocal-m4-deps.mk: New file.
>> +	* gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
>> +	deterministically.
>> +
>>  2018-09-17  John Baldwin  <jhb@FreeBSD.org>
>>  
>>  	* fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
>> diff --git a/gdb/gnulib/aclocal-m4-deps.mk b/gdb/gnulib/aclocal-m4-deps.mk
>> index 52d280db30..8b39aef6ad 100644
>> --- a/gdb/gnulib/aclocal-m4-deps.mk
>> +++ b/gdb/gnulib/aclocal-m4-deps.mk
>> @@ -1,136 +1,130 @@
>>  # THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
>>  aclocal_m4_deps = \
>> -	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/00gnulib.m4 \
>> +	import/m4/absolute-header.m4 \
>> +	import/m4/alloca.m4 \
>> +	import/m4/canonicalize.m4 \
>>  	import/m4/chdir-long.m4 \
>> -	import/m4/gnulib-common.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/close.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/realloc.m4 \
>> +	import/m4/codeset.m4 \
>> +	import/m4/configmake.m4 \
>> +	import/m4/d-ino.m4 \
>>  	import/m4/d-type.m4 \
>> -	import/m4/frexp.m4 \
>> -	import/m4/getcwd-path-max.m4 \
>> +	import/m4/dirent_h.m4 \
>> +	import/m4/dirfd.m4 \
>> +	import/m4/dirname.m4 \
>> +	import/m4/double-slash-root.m4 \
>> +	import/m4/dup.m4 \
>>  	import/m4/dup2.m4 \
>> -	import/m4/strtok_r.m4 \
>> +	import/m4/eealloc.m4 \
>> +	import/m4/environ.m4 \
>> +	import/m4/errno_h.m4 \
>> +	import/m4/error.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/exponentl.m4 \
>> +	import/m4/extensions.m4 \
>> +	import/m4/extern-inline.m4 \
>> +	import/m4/fchdir.m4 \
>> +	import/m4/fcntl-o.m4 \
>> +	import/m4/fcntl.m4 \
>> +	import/m4/fcntl_h.m4 \
>> +	import/m4/fdopendir.m4 \
>> +	import/m4/filenamecat.m4 \
>> +	import/m4/flexmember.m4 \
>> +	import/m4/float_h.m4 \
>> +	import/m4/fnmatch.m4 \
>> +	import/m4/fpieee.m4 \
>> +	import/m4/frexp.m4 \
>> +	import/m4/frexpl.m4 \
>> +	import/m4/fstat.m4 \
>> +	import/m4/fstatat.m4 \
>> +	import/m4/getcwd-abort-bug.m4 \
>> +	import/m4/getcwd-path-max.m4 \
>>  	import/m4/getcwd.m4 \
>> -	import/m4/readlink.m4 \
>> +	import/m4/getdtablesize.m4 \
>> +	import/m4/getlogin_r.m4 \
>> +	import/m4/getprogname.m4 \
>> +	import/m4/gettimeofday.m4 \
>> +	import/m4/glibc21.m4 \
>> +	import/m4/glob.m4 \
>> +	import/m4/gnulib-cache.m4 \
>> +	import/m4/gnulib-common.m4 \
>> +	import/m4/gnulib-comp.m4 \
>> +	import/m4/gnulib-tool.m4 \
>> +	import/m4/hard-locale.m4 \
>> +	import/m4/include_next.m4 \
>> +	import/m4/inttypes-pri.m4 \
>> +	import/m4/inttypes.m4 \
>> +	import/m4/isnand.m4 \
>> +	import/m4/isnanl.m4 \
>> +	import/m4/largefile.m4 \
>> +	import/m4/limits-h.m4 \
>> +	import/m4/localcharset.m4 \
>> +	import/m4/locale-fr.m4 \
>> +	import/m4/locale-ja.m4 \
>>  	import/m4/locale-zh.m4 \
>> -	import/m4/stdint.m4 \
>> +	import/m4/longlong.m4 \
>> +	import/m4/lstat.m4 \
>> +	import/m4/malloc.m4 \
>> +	import/m4/malloca.m4 \
>> +	import/m4/math_h.m4 \
>> +	import/m4/mbrtowc.m4 \
>> +	import/m4/mbsinit.m4 \
>> +	import/m4/mbsrtowcs.m4 \
>> +	import/m4/mbstate_t.m4 \
>> +	import/m4/memchr.m4 \
>> +	import/m4/memmem.m4 \
>> +	import/m4/mempcpy.m4 \
>>  	import/m4/memrchr.m4 \
>> +	import/m4/mkdir.m4 \
>> +	import/m4/mkstemp.m4 \
>> +	import/m4/mmap-anon.m4 \
>> +	import/m4/mode_t.m4 \
>> +	import/m4/msvc-inval.m4 \
>> +	import/m4/msvc-nothrow.m4 \
>> +	import/m4/multiarch.m4 \
>> +	import/m4/nocrash.m4 \
>> +	import/m4/off_t.m4 \
>>  	import/m4/onceonly.m4 \
>> +	import/m4/open.m4 \
>> +	import/m4/openat.m4 \
>> +	import/m4/opendir.m4 \
>>  	import/m4/pathmax.m4 \
>> +	import/m4/rawmemchr.m4 \
>> +	import/m4/readdir.m4 \
>> +	import/m4/readlink.m4 \
>> +	import/m4/realloc.m4 \
>>  	import/m4/rename.m4 \
>> +	import/m4/rewinddir.m4 \
>>  	import/m4/rmdir.m4 \
>> -	import/m4/dup.m4 \
>> -	import/m4/errno_h.m4 \
>> -	import/m4/mbrtowc.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/secure_getenv.m4 \
>> +	import/m4/setenv.m4 \
>> +	import/m4/signal_h.m4 \
>> +	import/m4/ssize_t.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/limits-h.m4 \
>> -	import/m4/locale-fr.m4 \
>> -	import/m4/fstatat.m4 \
>> -	import/m4/inttypes.m4 \
>> -	import/m4/memchr.m4 \
>> -	import/m4/glob.m4 \
>> -	import/m4/fstat.m4 \
>> -	import/m4/sys_stat_h.m4 \
>> -	import/m4/off_t.m4 \
>> +	import/m4/stddef_h.m4 \
>> +	import/m4/stdint.m4 \
>> +	import/m4/stdio_h.m4 \
>> +	import/m4/stdlib_h.m4 \
>> +	import/m4/strchrnul.m4 \
>>  	import/m4/strdup.m4 \
>> -	import/m4/ssize_t.m4 \
>> -	import/m4/math_h.m4 \
>> -	import/m4/unistd_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/strerror.m4 \
>> +	import/m4/string_h.m4 \
>> +	import/m4/strstr.m4 \
>> +	import/m4/strtok_r.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_stat_h.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/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/sys_types_h.m4 \
>>  	import/m4/tempname.m4 \
>> -	import/m4/memmem.m4 \
>> -	import/m4/mbstate_t.m4
>> +	import/m4/time_h.m4 \
>> +	import/m4/unistd-safer.m4 \
>> +	import/m4/unistd_h.m4 \
>> +	import/m4/warn-on-use.m4 \
>> +	import/m4/wchar_h.m4 \
>> +	import/m4/wchar_t.m4 \
>> +	import/m4/wctype_h.m4 \
>> +	import/m4/wint_t.m4
>> diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh
>> index 1bae7e124b..3077424622 100755
>> --- a/gdb/gnulib/update-gnulib.sh
>> +++ b/gdb/gnulib/update-gnulib.sh
>> @@ -172,7 +172,8 @@ ACLOCAL_M4_DEPS_FILE=aclocal-m4-deps.mk
>>  cat > ${ACLOCAL_M4_DEPS_FILE}.tmp <<EOF
>>  # THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
>>  aclocal_m4_deps = \\
>> -$(find import/m4 -type f -name "*.m4" | sed 's/^/\t/; s/$/ \\/; $s/ \\//g')
>> +$(find import/m4 -type f -name "*.m4" | LC_COLLATE=C sort | \
>> +  sed 's/^/	/; s/$/ \\/; $s/ \\//g')
>>  EOF
>>  
>>  ../../move-if-change ${ACLOCAL_M4_DEPS_FILE}.tmp ${ACLOCAL_M4_DEPS_FILE}
>> 
>
> This LGTM.  The new aclocal-m4-deps.mk files has less items, but that's because it currently
> contains some m4 files that don't exist.  I think they were added there with the gnulib
> update, but were not removed when it was reverted.  An example of this is import/m4/builtin-expect.m4.

Yeah, I forgot to update it, sorry about that.

FWIW, the patch looks good to me as well.
diff mbox

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 14ac0dae52..c56e35fb8b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@ 
+2018-09-17  John Baldwin  <jhb@FreeBSD.org>
+
+	* gnulib/aclocal-m4-deps.mk: New file.
+	* gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
+	deterministically.
+
 2018-09-17  John Baldwin  <jhb@FreeBSD.org>
 
 	* fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
diff --git a/gdb/gnulib/aclocal-m4-deps.mk b/gdb/gnulib/aclocal-m4-deps.mk
index 52d280db30..8b39aef6ad 100644
--- a/gdb/gnulib/aclocal-m4-deps.mk
+++ b/gdb/gnulib/aclocal-m4-deps.mk
@@ -1,136 +1,130 @@ 
 # THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
 aclocal_m4_deps = \
-	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/00gnulib.m4 \
+	import/m4/absolute-header.m4 \
+	import/m4/alloca.m4 \
+	import/m4/canonicalize.m4 \
 	import/m4/chdir-long.m4 \
-	import/m4/gnulib-common.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/close.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/realloc.m4 \
+	import/m4/codeset.m4 \
+	import/m4/configmake.m4 \
+	import/m4/d-ino.m4 \
 	import/m4/d-type.m4 \
-	import/m4/frexp.m4 \
-	import/m4/getcwd-path-max.m4 \
+	import/m4/dirent_h.m4 \
+	import/m4/dirfd.m4 \
+	import/m4/dirname.m4 \
+	import/m4/double-slash-root.m4 \
+	import/m4/dup.m4 \
 	import/m4/dup2.m4 \
-	import/m4/strtok_r.m4 \
+	import/m4/eealloc.m4 \
+	import/m4/environ.m4 \
+	import/m4/errno_h.m4 \
+	import/m4/error.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/exponentl.m4 \
+	import/m4/extensions.m4 \
+	import/m4/extern-inline.m4 \
+	import/m4/fchdir.m4 \
+	import/m4/fcntl-o.m4 \
+	import/m4/fcntl.m4 \
+	import/m4/fcntl_h.m4 \
+	import/m4/fdopendir.m4 \
+	import/m4/filenamecat.m4 \
+	import/m4/flexmember.m4 \
+	import/m4/float_h.m4 \
+	import/m4/fnmatch.m4 \
+	import/m4/fpieee.m4 \
+	import/m4/frexp.m4 \
+	import/m4/frexpl.m4 \
+	import/m4/fstat.m4 \
+	import/m4/fstatat.m4 \
+	import/m4/getcwd-abort-bug.m4 \
+	import/m4/getcwd-path-max.m4 \
 	import/m4/getcwd.m4 \
-	import/m4/readlink.m4 \
+	import/m4/getdtablesize.m4 \
+	import/m4/getlogin_r.m4 \
+	import/m4/getprogname.m4 \
+	import/m4/gettimeofday.m4 \
+	import/m4/glibc21.m4 \
+	import/m4/glob.m4 \
+	import/m4/gnulib-cache.m4 \
+	import/m4/gnulib-common.m4 \
+	import/m4/gnulib-comp.m4 \
+	import/m4/gnulib-tool.m4 \
+	import/m4/hard-locale.m4 \
+	import/m4/include_next.m4 \
+	import/m4/inttypes-pri.m4 \
+	import/m4/inttypes.m4 \
+	import/m4/isnand.m4 \
+	import/m4/isnanl.m4 \
+	import/m4/largefile.m4 \
+	import/m4/limits-h.m4 \
+	import/m4/localcharset.m4 \
+	import/m4/locale-fr.m4 \
+	import/m4/locale-ja.m4 \
 	import/m4/locale-zh.m4 \
-	import/m4/stdint.m4 \
+	import/m4/longlong.m4 \
+	import/m4/lstat.m4 \
+	import/m4/malloc.m4 \
+	import/m4/malloca.m4 \
+	import/m4/math_h.m4 \
+	import/m4/mbrtowc.m4 \
+	import/m4/mbsinit.m4 \
+	import/m4/mbsrtowcs.m4 \
+	import/m4/mbstate_t.m4 \
+	import/m4/memchr.m4 \
+	import/m4/memmem.m4 \
+	import/m4/mempcpy.m4 \
 	import/m4/memrchr.m4 \
+	import/m4/mkdir.m4 \
+	import/m4/mkstemp.m4 \
+	import/m4/mmap-anon.m4 \
+	import/m4/mode_t.m4 \
+	import/m4/msvc-inval.m4 \
+	import/m4/msvc-nothrow.m4 \
+	import/m4/multiarch.m4 \
+	import/m4/nocrash.m4 \
+	import/m4/off_t.m4 \
 	import/m4/onceonly.m4 \
+	import/m4/open.m4 \
+	import/m4/openat.m4 \
+	import/m4/opendir.m4 \
 	import/m4/pathmax.m4 \
+	import/m4/rawmemchr.m4 \
+	import/m4/readdir.m4 \
+	import/m4/readlink.m4 \
+	import/m4/realloc.m4 \
 	import/m4/rename.m4 \
+	import/m4/rewinddir.m4 \
 	import/m4/rmdir.m4 \
-	import/m4/dup.m4 \
-	import/m4/errno_h.m4 \
-	import/m4/mbrtowc.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/secure_getenv.m4 \
+	import/m4/setenv.m4 \
+	import/m4/signal_h.m4 \
+	import/m4/ssize_t.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/limits-h.m4 \
-	import/m4/locale-fr.m4 \
-	import/m4/fstatat.m4 \
-	import/m4/inttypes.m4 \
-	import/m4/memchr.m4 \
-	import/m4/glob.m4 \
-	import/m4/fstat.m4 \
-	import/m4/sys_stat_h.m4 \
-	import/m4/off_t.m4 \
+	import/m4/stddef_h.m4 \
+	import/m4/stdint.m4 \
+	import/m4/stdio_h.m4 \
+	import/m4/stdlib_h.m4 \
+	import/m4/strchrnul.m4 \
 	import/m4/strdup.m4 \
-	import/m4/ssize_t.m4 \
-	import/m4/math_h.m4 \
-	import/m4/unistd_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/strerror.m4 \
+	import/m4/string_h.m4 \
+	import/m4/strstr.m4 \
+	import/m4/strtok_r.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_stat_h.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/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/sys_types_h.m4 \
 	import/m4/tempname.m4 \
-	import/m4/memmem.m4 \
-	import/m4/mbstate_t.m4
+	import/m4/time_h.m4 \
+	import/m4/unistd-safer.m4 \
+	import/m4/unistd_h.m4 \
+	import/m4/warn-on-use.m4 \
+	import/m4/wchar_h.m4 \
+	import/m4/wchar_t.m4 \
+	import/m4/wctype_h.m4 \
+	import/m4/wint_t.m4
diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh
index 1bae7e124b..3077424622 100755
--- a/gdb/gnulib/update-gnulib.sh
+++ b/gdb/gnulib/update-gnulib.sh
@@ -172,7 +172,8 @@  ACLOCAL_M4_DEPS_FILE=aclocal-m4-deps.mk
 cat > ${ACLOCAL_M4_DEPS_FILE}.tmp <<EOF
 # THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi :set ro:
 aclocal_m4_deps = \\
-$(find import/m4 -type f -name "*.m4" | sed 's/^/\t/; s/$/ \\/; $s/ \\//g')
+$(find import/m4 -type f -name "*.m4" | LC_COLLATE=C sort | \
+  sed 's/^/	/; s/$/ \\/; $s/ \\//g')
 EOF
 
 ../../move-if-change ${ACLOCAL_M4_DEPS_FILE}.tmp ${ACLOCAL_M4_DEPS_FILE}