summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-04-27 19:01:00 +0000
committerJim Meyering <jim@meyering.net>2004-04-27 19:01:00 +0000
commit173f088735d2ae536abd012eeec1fee5bc1a9bf6 (patch)
treed628898ce3e5db60bbc549f0011aed2f2fc0df45 /src
parent372762d891ee38749e3fcb8e13281273f3e2a5f9 (diff)
downloadcoreutils-173f088735d2ae536abd012eeec1fee5bc1a9bf6.tar.xz
.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 0f2048664..f9bca9909 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1724,7 +1724,9 @@ check-misc:
# 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.
-sc_src_functions_have_static_scope: $(all_programs)
+#
+# The second nm|grep checks for file-scope variables with `extern' 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'; \
@@ -1734,6 +1736,12 @@ sc_src_functions_have_static_scope: $(all_programs)
| 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' > $$t; \
+ nm -e *.$(OBJEXT) \
+ | sed -n 's/.* B //p' \
+ | grep -Ev -f $$t && \
+ { echo 'the above variables should have static scope' 1>&2; \
exit 1; } || :
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.