summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-05-11 08:45:27 +0200
committerJim Meyering <meyering@redhat.com>2008-05-17 12:53:29 +0200
commitff085957e84f5789871521a11b44afa27a48d72d (patch)
treeb2d2c56f61600b057684dc22fa96326a5955be0b /src
parent894af8e4502eaeb8d251900c882c85a74fc72f07 (diff)
downloadidutils-ff085957e84f5789871521a11b44afa27a48d72d.tar.gz
idutils-ff085957e84f5789871521a11b44afa27a48d72d.tar.bz2
idutils-ff085957e84f5789871521a11b44afa27a48d72d.zip
* src/Makefile.am (sc_tight_scope): Improve.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 3b872bb..8b2201b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,16 +22,16 @@ sc_tight_scope: $(all_programs)
@t=exceptions-$$$$; \
trap "s=$$?; rm -f $$t; exit $$s" 0 1 2 13 15; \
( printf '^main$$\n^usage$$\n'; \
- grep -h -A1 '^extern .*[^;]$$' $(SOURCES) \
- | grep -vE '^(extern |--)' |sed 's/^/^/;s/ .*/$$/' ) > $$t; \
+ 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'; \
- sed -n 's/^extern int \([^ ][^ ]*\);$$/^\1$$/p' \
- $(noinst_HEADERS) /dev/null ) > $$t; \
+ 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 && \