On 18/10/15 22:33, Pádraig Brady wrote:
> On 18/10/15 05:04, Jim Meyering wrote:
>> I've just pushed the following three patches:
> 
> Nice. Note this improvement triggered new
> syntax check failures on coreutils
> 
>   $ make sc_tight_scope
>   prog_fprintf
>   rm
>   defaultcon
>   restorecon
>   ...
> 
> That's because the gnulib rule was working on an
> invalid blank regular expression extracted from SOURCES,
> thus effectively being ignored, as it was matching all
> extern functions found with nm. with your added ^_?$
> around the expression, this no longer happened, thus
> triggering the above valid issues.
> 
> I've sent a patch to coreutils to fix those,
> and the attached gnulib patch is not strictly required
> after your improvements, though it does remove some
> extraneous unlikely to match expressions.

correct patch attached this time

>From 3ced1e1763c8fb663855edf533b79d1affd006bc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <p...@draigbrady.com>
Date: Sun, 18 Oct 2015 21:15:35 +0100
Subject: [PATCH] maint.mk: sc_tight_scope: remove extraneous expressions

* top/maint.mk (tight_scope): This is not really required since
commit 3ef58f46 as sed_wrap ensures we don't get an empty expression
that matches all nm entries.  But it does remove extraneous entries
that may be confusing or cause issue in future maintenance.
---
 ChangeLog    | 8 ++++++++
 top/maint.mk | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 3a9768e..ae7ec70 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-10-18  Pádraig Brady  <p...@draigbrady.com>
+
+	maint.mk: sc_tight_scope: remove extraneous expressions
+	* top/maint.mk (tight_scope): This is not really required since
+	commit 3ef58f46 as sed_wrap ensures we don't get an empty expression
+	that matches all nm entries.  But it does remove extraneous entries
+	that may be confusing or cause issue in future maintenance.
+
 2015-10-18  Paul Eggert  <egg...@cs.ucla.edu>
 
 	time_rz: return NULL if localtime_r fails
diff --git a/top/maint.mk b/top/maint.mk
index 4887e5d..893874b 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -1645,7 +1645,7 @@ _gl_tight_scope: $(bin_PROGRAMS)
 	       test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`;	\
 	( printf '%s\n' '__.*' $(_gl_TS_unmarked_extern_functions);	\
 	  grep -h -A1 '^extern .*[^;]$$' $$src				\
-	    | grep -vE '^(extern |--)' | $(SED) 's/ .*//';		\
+	    | grep -vE '^(extern |--|#)' | $(SED) 's/ .*//; /^$$/d';	\
 	  perl -lne							\
 	     '$(_gl_TS_function_match) and print $$1' $$hdr;		\
 	) | sort -u | $(SED) "$$sed_wrap" > $$t;			\
-- 
2.5.0

Reply via email to