maint.mk: generalize _gl_tight_scope for non-recursive make
authorJim Meyering <meyering@redhat.com>
Tue, 18 Sep 2012 14:25:19 +0000 (16:25 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 18 Sep 2012 14:25:19 +0000 (16:25 +0200)
* top/maint.mk (_gl_tight_scope): Remove a hard-coded assumption
that *.h would describe additional .h files in the directory
specified by $(_gl_TS_dir).  I.e., add this...
(_gl_TS_other_headers): New variable.

ChangeLog
top/maint.mk

index 38ad080..55ef86b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2012-09-18  Jim Meyering  <meyering@redhat.com>
 
+       maint.mk: generalize _gl_tight_scope for non-recursive make
+       * top/maint.mk (_gl_tight_scope): Remove a hard-coded assumption
+       that *.h would describe additional .h files in the directory
+       specified by $(_gl_TS_dir).  I.e., add this...
+       (_gl_TS_other_headers): New variable.
+
        maint.mk: exempt trailing blanks found in "binary" files
        * top/maint.mk (sc_trailing_blank): Filter out any matches found in
        "binary" files, as reported by grep.  Suggested by Richard W.M. Jones
index ccf09a2..5d63b49 100644 (file)
@@ -1576,6 +1576,7 @@ _gl_TS_obj_files ?= *.$(OBJEXT)
 # Files in which to search for the one-line style extern declarations.
 # $(_gl_TS_dir)-relative.
 _gl_TS_headers ?= $(noinst_HEADERS)
+_gl_TS_other_headers ?= *.h
 
 .PHONY: _gl_tight_scope
 _gl_tight_scope: $(bin_PROGRAMS)
@@ -1598,7 +1599,8 @@ _gl_tight_scope: $(bin_PROGRAMS)
          && { echo the above functions should have static scope >&2;   \
               exit 1; } || : ;                                         \
        ( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_vars);       \
-         perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"' $$hdr *.h \
+         perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"'           \
+               $$hdr $(_gl_TS_other_headers)                           \
        ) | sort -u > $$t;                                              \
        nm -e $(_gl_TS_obj_files) | sed -n 's/.* [BCDGRS] //p'          \
             | sort -u | grep -Ev -f $$t                                        \