From: Simon Josefsson via Gnulib discussion list <bug-gnulib@gnu.org>
To: bug-gnulib@gnu.org
Subject: syntax-checks with names containing the letter w not invoked
Date: Mon, 04 Jan 2021 23:14:12 +0100 [thread overview]
Message-ID: <87y2h82vuz.fsf@latte.josefsson.org> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 529 bytes --]
Hi. I noticed that 'make syntax-check' never ran syntax checks whose
name contained 'w' on my local machine, but did so on CICD builds. I
tracked it down due to this:
jas@latte:~/src/gsasl$ echo $LANG
sv_SE.UTF-8
jas@latte:~/src/gsasl$ echo foowbar: | sed -n 's/^\([a-z]*\):/\1/p'
jas@latte:~/src/gsasl$ echo foowbar: | LANG=C sed -n 's/^\([a-z]*\):/\1/p'
foowbar
jas@latte:~/src/gsasl$
The following patch (installed) fixes this for me, although I suspect
other uses in maint.mk may be affected too.
/Simon
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-maintainer-makefile-Invoke-syntax-checks-regardless-.patch --]
[-- Type: text/x-diff, Size: 1450 bytes --]
From cc4e07d3e8405e8cdf887d840fca6dc52b9e12fe Mon Sep 17 00:00:00 2001
From: Simon Josefsson <simon@josefsson.org>
Date: Mon, 4 Jan 2021 23:12:46 +0100
Subject: [PATCH] maintainer-makefile: Invoke syntax-checks regardless of
locale.
* top/maint.mk (syntax-check-rules): Invoke sed with LANG=C
environment because [a-z] may not include 'w' in all locales.
---
ChangeLog | 6 ++++++
top/maint.mk | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index c86fb7888..9ebc32bea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-04 Simon Josefsson <simon@josefsson.org>
+
+ maintainer-makefile: Invoke syntax-checks regardless of locale.
+ * top/maint.mk (syntax-check-rules): Invoke sed with LANG=C
+ environment because [a-z] may not include 'w' in all locales.
+
2021-01-04 Bruno Haible <bruno@clisp.org>
nstrftime, time_rz: Avoid using an obsolete Autoconf macro.
diff --git a/top/maint.mk b/top/maint.mk
index ee8c5ebd1..87f65c7e0 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -163,7 +163,7 @@ ifneq ($(_gl-Makefile),)
_cfg_mk := $(wildcard $(srcdir)/cfg.mk)
# Collect the names of rules starting with 'sc_'.
-syntax-check-rules := $(sort $(shell $(SED) -n \
+syntax-check-rules := $(sort $(shell env LANG=C $(SED) -n \
's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' $(srcdir)/$(ME) $(_cfg_mk)))
.PHONY: $(syntax-check-rules)
--
2.20.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
next reply other threads:[~2021-01-04 22:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-04 22:14 Simon Josefsson via Gnulib discussion list [this message]
2021-01-04 22:44 ` syntax-checks with names containing the letter w not invoked Jim Meyering
2021-01-05 20:52 ` Jim Meyering
2021-01-06 11:39 ` Simon Josefsson via Gnulib discussion list
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y2h82vuz.fsf@latte.josefsson.org \
--to=bug-gnulib@gnu.org \
--cc=simon@josefsson.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).