Paul Eggert wrote:
> > I would propose to rename the files to 'test-*' in Gnulib. They are
> > not likely to be modified frequently in glibc, therefore the gnulib <--> 
> > glibc
> > merge effort is likely zero. And annotate the mapping in config/srclist.txt
> > accordingly.
> 
> Wouldn't we also need to change config/srclist-update to support file 
> renaming?

No; it supports that already. To clarify this, I'm applying the patch 0001 
below.
And patch 0002 modifies srclist.txt to make use of this feature in more places.

> And even then it'd be confusing for the files to have 
> different basenames in gnulib vs glibc.

As you can see from patch 0002, there is already some precedent.

>From cebf29508972f2eb0068f541e6f693bac865e2c9 Mon Sep 17 00:00:00 2001
From: Bruno Haible <br...@clisp.org>
Date: Mon, 13 May 2024 23:03:04 +0200
Subject: [PATCH 1/2] config: Document the update script better.

* config/srclist-update: Improve comments.
---
 ChangeLog             |  5 +++++
 config/srclist-update | 41 +++++++++++++++++++++++------------------
 2 files changed, 28 insertions(+), 18 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 09cdfb44f9..f7298ce08a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-05-13  Bruno Haible  <br...@clisp.org>
+
+	config: Document the update script better.
+	* config/srclist-update: Improve comments.
+
 2024-05-13  Bruno Haible  <br...@clisp.org>
 
 	doc: Document our conventions for *.m4 files.
diff --git a/config/srclist-update b/config/srclist-update
index 2d08bd32e8..3bd6a8bc62 100755
--- a/config/srclist-update
+++ b/config/srclist-update
@@ -1,28 +1,33 @@
 #!/bin/sh
-# Check for files in directory $1 being up to date, according to the
+# Usage: ./srclist-update DIR
+# Check for files in directory DIR being up to date, according to the
 # list on stdin.  Don't actually make any changes, just show the diffs.
-#
+
+# This script is used in gnulib and texinfo; the input files are named
+# srclist.txt.
+
+# Format of srclist.txt:
 # Empty (or only whitespace) input lines are ignored.
 # Lines beginning with # are ignored.
 # Lines with just one word are ignored.
 # Otherwise, the line has two or more whitespace-separated words:
-#   the first word is the source directory, which can be a top-level
-#   directory of source archive,
-#   the second word is the source file name relative to the source
-#   directory, and
-#   the third word is the destination, other optional words are
-#   options.
-# The possible options are "gpl" (to replace the license with the GPL)
-#   and "doclicense" (to replace @include doclicense.texi with fdl.texi)
-#   and "strip-trailing-space" (to strip trailing white space from lines)
-#   and "release" (to use the release version instead of the
-#   development version).
-#   Unrecognized options are ignored.
+#   - the first word is the source directory, which can be a top-level
+#     directory of source archive,
+#   - the second word is the source file name relative to the source
+#     directory,
+#   - the third word is the destination, either as a directory (to be
+#     combined with the basename of the the source file name) or as a
+#     file name that includes the basename, and
+#   - other optional words are options.
+# The possible options are
+#   - "gpl" (to replace the license with the GPL)
+#   - "doclicense" (to replace @include doclicense.texi with fdl.texi)
+#   - "strip-trailing-space" (to strip trailing white space from lines)
+#   - "release" (to use the release version instead of the development
+#     version).
+# Unrecognized options are ignored.
 # $VARIABLE expansions are done (with sh eval).
-#
-# This script is used in gnulib and texinfo; the input files are named
-# srclist.txt.
-#
+
 # Copyright (C) 2002-2003, 2005, 2007-2024 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
-- 
2.34.1

>From d7768ff1c6acf7384a92e8a46cf5836889c7f398 Mon Sep 17 00:00:00 2001
From: Bruno Haible <br...@clisp.org>
Date: Mon, 13 May 2024 23:13:15 +0200
Subject: [PATCH 2/2] config: Clarify which destination files have a different
 basename.

* config/srclist.txt: Specify the gnulib-side basename in the third
column of a few entries.
---
 ChangeLog          |  4 ++++
 config/srclist.txt | 14 +++++++-------
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f7298ce08a..7d60be26fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2024-05-13  Bruno Haible  <br...@clisp.org>
 
+	config: Clarify which destination files have a different basename.
+	* config/srclist.txt: Specify the gnulib-side basename in the third
+	column of a few entries.
+
 	config: Document the update script better.
 	* config/srclist-update: Improve comments.
 
diff --git a/config/srclist.txt b/config/srclist.txt
index 34ffd63aec..1a254e709d 100644
--- a/config/srclist.txt
+++ b/config/srclist.txt
@@ -70,7 +70,7 @@ $LIBCSRC posix/regex.h			lib
 #$LIBCSRC posix/regex_internal.c	lib
 #$LIBCSRC posix/regex_internal.h	lib
 #$LIBCSRC posix/regexec.c		lib
-#$LIBCSRC stdlib/canonicalize           lib/canonicalize-lgpl.c
+#$LIBCSRC stdlib/canonicalize.c		lib/canonicalize-lgpl.c
 #$LIBCSRC stdlib/tst-stdbit.h			tests
 $LIBCSRC stdlib/tst-stdc_bit_ceil.c		tests
 $LIBCSRC stdlib/tst-stdc_bit_floor.c		tests
@@ -109,7 +109,7 @@ $LIBCSRC time/mktime-internal.h		lib
 #$LIBCSRC argp/argp.h			lib gpl
 #$LIBCSRC stdlib/getsubopt.c		lib gpl
 #$LIBCSRC posix/getopt.c		lib gpl
-#$LIBCSRC posix/getopt.h		lib gpl (getopt.in.h in gnulib)
+#$LIBCSRC posix/getopt.h		lib/getopt.in.h gpl
 #$LIBCSRC posix/getopt1.c		lib gpl
 #$LIBCSRC posix/getopt_int.h		lib gpl
 #
@@ -140,11 +140,11 @@ $LIBCSRC time/mktime-internal.h		lib
 # https://sourceware.org/bugzilla/show_bug.cgi?id=321
 #$LIBCSRC malloc/obstack.h		lib gpl
 #$LIBCSRC misc/error.c			lib gpl
-#$LIBCSRC misc/error.h			lib gpl (error.in.h in gnulib)
+#$LIBCSRC misc/error.h			lib/error.in.h gpl
 #$LIBCSRC misc/getpass.c		lib gpl
 #$LIBCSRC misc/mkstemp.c		lib gpl
 #$LIBCSRC posix/fnmatch.c		lib gpl
-#$LIBCSRC posix/fnmatch.h		lib gpl (fnmatch.in.h in gnulib)
+#$LIBCSRC posix/fnmatch.h		lib/fnmatch.in.h gpl
 #$LIBCSRC posix/fnmatch_loop.c		lib gpl
 #
 # https://sourceware.org/bugzilla/show_bug.cgi?id=1060
@@ -152,7 +152,7 @@ $LIBCSRC time/mktime-internal.h		lib
 #$LIBCSRC posix/glob.c			lib gpl
 #
 # https://sourceware.org/bugzilla/show_bug.cgi?id=1060
-#$LIBCSRC posix/glob.h			lib gpl (glob-libc.h in gnulib)
+#$LIBCSRC posix/glob.h			lib/glob-libc.h gpl
 #
 #$LIBCSRC stdlib/putenv.c		lib gpl
 #$LIBCSRC stdlib/random.c		lib gpl
@@ -171,7 +171,7 @@ $LIBCSRC time/mktime-internal.h		lib
 #$LIBCSRC string/strpbrk.c		lib gpl
 #$LIBCSRC string/strstr.c		lib gpl
 #$LIBCSRC sysdeps/generic/pty-private.h	lib gpl
-#$LIBCSRC sysdeps/ieee754/ieee754.h     lib gpl (ieee754.in.h in gnulib)
+#$LIBCSRC sysdeps/ieee754/ieee754.h     lib/ieee754.in.h gpl
 #$LIBCSRC sysdeps/posix/dup2.c		lib gpl
 #$LIBCSRC sysdeps/posix/euidaccess.c	lib gpl
 #$LIBCSRC sysdeps/posix/tempname.c	lib gpl
@@ -179,7 +179,7 @@ $LIBCSRC time/mktime-internal.h		lib
 #$LIBCSRC sysdeps/unix/dirfd.c		lib gpl
 #$LIBCSRC sysdeps/unix/grantpt.c	lib gpl
 #$LIBCSRC sysdeps/unix/rmdir.c		lib gpl
-#$LIBCSRC time/strftime_l.c		lib gpl (strftime.c)
+#$LIBCSRC time/strftime_l.c		lib/strftime.c gpl
 # These are close, but we are using the gettext versions.
 #$LIBCSRC misc/mkdtemp.c		lib gpl
 #$LIBCSRC stdlib/setenv.c		lib gpl (setenv.c, unsetenv.c)
-- 
2.34.1

Reply via email to