make syntax-check: also check src/*.h files for extern functions,
authorJim Meyering <meyering@redhat.com>
Mon, 10 Mar 2008 18:23:05 +0000 (19:23 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 10 Mar 2008 18:23:41 +0000 (19:23 +0100)
* src/Makefile.am (sc_tight_scope): ... now that there is one.

src/Makefile.am

index 008b87d..c85f853 100644 (file)
@@ -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 &&                                        \