bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

syntax-checks with names containing the letter w not invoked


From: Simon Josefsson
Subject: syntax-checks with names containing the letter w not invoked
Date: Mon, 04 Jan 2021 23:14:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

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
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: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]