diff options
author | Jim Meyering <meyering@redhat.com> | 2008-03-10 19:23:05 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-03-10 19:23:41 +0100 |
commit | 3c7a6ae340feee50ed6368ff9224aa3a29fff97e (patch) | |
tree | 318760eea3319a6e8a9778b8f6f155fa0a03d5fc /src | |
parent | 381e69eace06d863a3dcd9d9f3a8f61fb449be0b (diff) | |
download | coreutils-3c7a6ae340feee50ed6368ff9224aa3a29fff97e.tar.xz |
make syntax-check: also check src/*.h files for extern functions,
* src/Makefile.am (sc_tight_scope): ... now that there is one.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 008b87de6..c85f85365 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -388,9 +388,12 @@ s2 = '/^\#define AUTHORS \\\\/{;n;$(sed_filter);p;q;}' sc_tight_scope: $(all_programs) @t=exceptions-$$$$; \ trap "s=$$?; rm -f $$t; exit $$s" 0 1 2 13 15; \ - ( printf '^main$$\n^usage$$\n'; \ + ( printf 'main\nusage\n'; \ grep -h -A1 '^extern .*[^;]$$' $(SOURCES) \ - | grep -vE '^(extern |--)' |sed 's/^/^/;s/ .*/$$/' ) > $$t; \ + | grep -vE '^(extern |--)' | sed 's/ .*//'; \ + perl -ne '/^extern \S+ (\S*) \(/ and print "$$1\n"' \ + $(noinst_HEADERS); \ + ) | $(ASSORT) -u | sed 's/^/^/;s/$$/$$/' > $$t; \ nm -e *.$(OBJEXT) \ | sed -n 's/.* T //p' \ | grep -Ev -f $$t && \ |