FYI, >From de2a27a3e9ebc768042af8ade75fb92b966e2424 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@redhat.com> Date: Mon, 23 May 2011 09:15:20 +0200 Subject: [PATCH] maint: adapt to use gnulib's tight-scope rule; update gnulib to latest
* cfg.mk (_gl_TS_headers): Define. (_gl_TS_obj_files): Likewise. * src/Makefile.am (sc_tight_scope): Remove rule. * gnulib: Update to latest. --- cfg.mk | 6 +++--- gnulib | 2 +- src/Makefile.am | 27 --------------------------- 3 files changed, 4 insertions(+), 31 deletions(-) diff --git a/cfg.mk b/cfg.mk index 9be2819..397078e 100644 --- a/cfg.mk +++ b/cfg.mk @@ -25,9 +25,6 @@ local-checks-to-skip = \ old_NEWS_hash = 7c42fc431cadd9164dde6f9a7113b920 -sc_tight_scope: - $(MAKE) -C src $@ - include $(srcdir)/dist-check.mk update-copyright-env = \ @@ -44,3 +41,6 @@ exclude_file_name_regexp--sc_prohibit_strcmp = ^libidu/iduglobal\.h$$ config_h_exempt = ^(testsuite/single_file_token_bug\.c|src/lid-[aegl]id\.c)$$ exclude_file_name_regexp--sc_require_config_h = $(config_h_exempt) exclude_file_name_regexp--sc_require_config_h_first = $(config_h_exempt) + +export _gl_TS_headers = lid.h $(srcdir)/../libidu/*.h +export _gl_TS_obj_files = *.$(OBJEXT) ../libidu/*.$(OBJEXT) diff --git a/gnulib b/gnulib index 739321e..9df761e 160000 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 739321ef60661c7b51a4c7a3fa23957a4d9dbbc3 +Subproject commit 9df761edc6b29dbe2b7009b15dfe26a296d50a92 diff --git a/src/Makefile.am b/src/Makefile.am index c3f7a65..b1afb47 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -16,30 +16,3 @@ AM_CPPFLAGS = -I$(top_srcdir)/lib \ AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS) LDADD = ../libidu/libidu.a ../lib/libgnu.a $(LIBINTL) ../lib/libgnu.a - -# Most functions in src/*.c should have static scope. -# Any that don't must be marked with `extern', but `main' -# and `usage' are exceptions. They're always extern, but -# don't need to be marked. -# -# The second nm|grep checks for file-scope variables with `extern' scope. -.PHONY: sc_tight_scope -sc_tight_scope: $(all_programs) - @t=exceptions-$$$$; \ - trap "s=$$?; rm -f $$t; exit $$s" 0 1 2 13 15; \ - ( printf '^main$$\n^usage$$\n'; \ - perl -ne '/^extern .*?\**(\w+) *\(/ and print "^$$1\$$\n"' \ - $(noinst_HEADERS) $(srcdir)/../libidu/*.h ) > $$t; \ - nm -e *.$(OBJEXT) ../libidu/*.$(OBJEXT) \ - | sed -n 's/.* T //p' \ - | grep -Ev -f $$t && \ - { echo 'the above functions should have static scope' 1>&2; \ - exit 1; } || : ; \ - ( printf '^program_name$$\n'; \ - perl -ne '/^extern .*?\**(\w+);/ and print "^$$1\$$\n"' \ - $(noinst_HEADERS) $(srcdir)/../libidu/*.h ) > $$t; \ - nm -e *.$(OBJEXT) ../libidu/*.$(OBJEXT) \ - | sed -n 's/.* [BD] //p' \ - | grep -Ev -f $$t && \ - { echo 'the above variables should have static scope' 1>&2; \ - exit 1; } || : -- 1.7.5.2.1.g56b30 _______________________________________________ bug-idutils mailing list bug-idutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-idutils