On 14/10/2024 10:23, Bruno Haible via GNU coreutils General Discussion wrote:
Michael Pratt wrote:
adding the "gl" directory from source to EXTRA_DIST or however
you all would do it
I agree with the suggestion: In GNU gettext, I have a couple of
local gnulib modules as well, and since gnulib-tool takes them as
input, I view them as source code. Since the GCS [1] say that the
tarball should contain the source code, I bundle them in the tarball.
Pádraig Brady replied:
then we'd have two copies of these files in the release tarball.
Yes, but so what?
1. File size is cheap nowadays. Disks are large, and download speeds ≥
1 MB/sec are very common.
2. With block-based compression, like .bz2 and .xz, the second copy does
hardly cost any size, since it is identical to the first copy.
Right. gz is 33390 bigger, xz is 6172 bigger
Michael Pratt wrote:
What's needed is just the "modules" files which are missing
No, the gl/lib/ and gl/tests/ subdirectories are input to gnulib-tool as well.
Not only gl/modules/.
And you should list the *files* to add to the tarball, not directories.
See [2] or [3], point 3.
So, what I would propose is the attached patch.
Bruno
[1] https://www.gnu.org/prep/standards/html_node/Managing-Releases.html
[2]
https://www.gnu.org/software/automake/manual/html_node/Basics-of-Distribution.html
[3] https://lists.gnu.org/archive/html/automake-patches/2024-10/msg00003.html
I applied that.
I also applied the attached to keep this list in sync automatically.
thanks!
Pádraig
From 58a88f30f802dc9b150b86c4763992c0d74b83e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <p...@draigbrady.com>
Date: Mon, 14 Oct 2024 13:06:44 +0100
Subject: [PATCH] maint: add syntax-check to ensure all gl/ files are
distributed
* cfg.mk (sc_gldist_missing): Add a new target to ensure we don't
forget to distribute any new gl/ files.
* gl/local.mk: Remove generation comment since it's
now encapsulated in the syntax-check, which outputs a consumable
diff to make any future adjustments.
Also adjust ordering to that of the C locale used in the syntax check.
---
cfg.mk | 15 +++++++++++++++
gl/local.mk | 10 ++++------
2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index 1ce5d17f9..70b5a2620 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -819,6 +819,21 @@ sc_gitignore_missing:
# sort | uniq -d | grep . && { echo '$(ME): Remove above' \
# 'entries from .gitignore' >&2; exit 1; } || :
+# Ensure gl/ files are distributed
+sc_gldist_missing:
+ @cd $(srcdir); \
+ grep '^gl/' gl/local.mk > $@.a; \
+ find gl '(' -name Makefile.am ')' -prune -o -type f \
+ '!' '(' -name '*.orig' -or -name '*~' -or \
+ -name 'ChangeLog.*' ')' -printf '%p\n' | \
+ LC_ALL=C sort | tr '\012' @ | sed 's/@$$/%/;s/@/ \\@/g' | \
+ tr @% '\012\012' > $@.e; \
+ diff -u $@.a $@.e; diff=$$?; \
+ rm -f $@.a $@.e; \
+ test "$$diff" = 0 \
+ || { echo '$(ME): Inconsistent EXTRA_DIST in gl/local.mk'>&2; \
+ exit 1; }
+
sc_prohibit-form-feed:
@prohibit=$$'\f' \
in_vc_files='\.[chly]$$' \
diff --git a/gl/local.mk b/gl/local.mk
index 85b8e2b9e..34a90def6 100644
--- a/gl/local.mk
+++ b/gl/local.mk
@@ -1,7 +1,7 @@
# Make coreutils programs. -*-Makefile-*-
# This is included by the top-level Makefile.am.
-## Copyright (C) 2006-2024 Free Software Foundation, Inc.
+## Copyright (C) 2024 Free Software Foundation, Inc.
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -16,8 +16,6 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Generate this list with
-# find gl '(' -name Makefile.am ')' -prune -o -type f '!' '(' -name '*.orig' -or -name '*~' -or -name 'ChangeLog.*' ')' -printf '%p\n' | sort | tr '\012' @ | sed 's/@$/%/;s/@/ \\@/g' | tr @% '\012\012'
EXTRA_DIST += \
gl/lib/buffer-lcm.c \
gl/lib/buffer-lcm.h \
@@ -30,10 +28,10 @@ gl/lib/fd-reopen.c \
gl/lib/fd-reopen.h \
gl/lib/heap.c \
gl/lib/heap.h \
-gl/lib/randint.c \
-gl/lib/randint.h \
gl/lib/rand-isaac.c \
gl/lib/rand-isaac.h \
+gl/lib/randint.c \
+gl/lib/randint.h \
gl/lib/randperm.c \
gl/lib/randperm.h \
gl/lib/randread.c \
@@ -44,9 +42,9 @@ gl/lib/skipchars.c \
gl/lib/skipchars.h \
gl/lib/smack.h \
gl/lib/strintcmp.c \
+gl/lib/strnumcmp-in.h \
gl/lib/strnumcmp.c \
gl/lib/strnumcmp.h \
-gl/lib/strnumcmp-in.h \
gl/lib/targetdir.c \
gl/lib/targetdir.h \
gl/lib/xdectoimax.c \
--
2.47.0